]> granicus.if.org Git - postgresql/commit
Expose the "*VALUES*" alias that we generate for a stand-alone VALUES list.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Jun 2011 19:48:31 +0000 (15:48 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Jun 2011 19:48:31 +0000 (15:48 -0400)
commit1c2af01b98c3aece7e5f6978137effcf06e8b81d
treece137b1e2ed40836e7a28694d5cda8a213ed1c1a
parent918eb0f34f2af3e0d2823a164d22b6906d46dfcd
Expose the "*VALUES*" alias that we generate for a stand-alone VALUES list.

We were trying to make that strictly an internal implementation detail,
but it turns out that it's exposed anyway when dumping a view defined
like
CREATE VIEW test_view AS VALUES (1), (2), (3) ORDER BY 1;
This comes out as
CREATE VIEW ... ORDER BY "*VALUES*".column1;
which fails to parse when reloading the dump.

Hacking ruleutils.c to suppress the column qualification looks like it'd
be a risky business, so instead promote the RTE alias to full-fledged
usability.

Per bug #6049 from Dylan Adams.  Back-patch to all supported branches.
src/backend/parser/analyze.c