Re: [HACKERS] Beta for 4:30AST ... ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Beta for 4:30AST ... ?
Date
Msg-id 23462.951161228@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Beta for 4:30AST ... ?  (Don Baccus <dhogaza@pacifier.com>)
Responses Re: [HACKERS] Beta for 4:30AST ... ?  (Don Baccus <dhogaza@pacifier.com>)
List pgsql-hackers
Don Baccus <dhogaza@pacifier.com> writes:
> I was able to fix my views by changing:
> create view foo as select * from bar;
> to:
> ...select * from bar bar;

Hmm, I think I see it.

create view foo as select * from int8_tbl;

$ pg_dump -t foo regression
\connect - postgres
CREATE TABLE "foo" (       "q1" int8,       "q2" int8
);
CREATE RULE "_RETfoo" AS ON SELECT TO foo DO INSTEAD SELECT int8_tbl.q1,
int8_tbl.q2 FROM int8_tbl (q1, q2);

IIRC, Thomas explained that the ANSI syntax says you *must* supply a
table alias if you are going to supply any column aliases in FROM.
The regurgitated rule violates that.

I guess this is another manifestation of the issue about the system
shoving in column "aliases" that the user never typed.  pg_dump is
probably repeating what the backend told it.  Think we'll have to
leave it unfixed till Thomas gets back.

It's also a reminder that the regress tests don't exercise pg_dump :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Beta for 4:30AST ... ?
Next
From: Don Baccus
Date:
Subject: Re: [HACKERS] Beta for 4:30AST ... ?