Re: [HACKERS] interesting observatation regarding views and V7.0 - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] interesting observatation regarding views and V7.0
Date
Msg-id 38BB6A77.53DEDA9D@alumni.caltech.edu
Whole thread Raw
In response to interesting observatation regarding views and V7.0  (Don Baccus <dhogaza@pacifier.com>)
Responses Re: [HACKERS] interesting observatation regarding views and V7.0
List pgsql-hackers
> When you finish catching up on your mail, you'll find lztext is already
> back in ;-).  At this point, whether you change the representation is
> pretty much irrelevant for rule size, I think.  However, I am still
> concerned by the hack I had to put into ruleutils.c to get pg_dump
> to produce valid output for cases like
>         create view foo as select * from int8_tbl;
> See the note and code at about line 1000 of utils/adt/ruleutils.c.
> Ideally we want to be able to tell from the parsetree whether the user
> wrote any column aliases or not (and if possible, distinguish the ones
> he wrote from any that got added by the system).  So that may force
> a representation change anyway.

Well, if I add another field/list to the RangeTblEntry structure to
hold my working aliases, and if I keep the ref structure as a pristine
copy of the parameters specified by the user, then everything will go
back to working as expected. There may be other places in the code
which really want one or the other of the fields, but as a first cut
I'll isolate the changes to just the parser directory, more or less.
                      - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: RE: [HACKERS] Re: ALTER TABLE DROP COLUMN
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Re: [SQL] prob with aggregate and group by - returns multiplesh