Re: Creating unique or "internal-use-only" column names (ColumnRef) - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Creating unique or "internal-use-only" column names (ColumnRef)
Date
Msg-id 55ED9A10.5030207@dunslane.net
Whole thread Raw
In response to Re: Creating unique or "internal-use-only" column names (ColumnRef)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Creating unique or "internal-use-only" column names (ColumnRef)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

On 09/07/2015 09:28 AM, Alvaro Herrera wrote:
> Peter Moser wrote:
>> Good afternoon,
>> is it possible to create unique column names or to give column names inside
>> the parser phase that do not interfer with the outside world, i.e. with
>> column names from tables or aliases given by the user.
>>
>> Some short background:
>> I created my own from-clause-item, that gets rewritten into a sub-query. I
>> do this because I want to re-use existing code as much as possible. The
>> rewritten sub-query gets transformed with "transformRangeSubselect"...
>> Within this sub-query I need 3 columns that shouldn't interfer with columns
>> from the input. We refer to them from a JOIN-ON clause and an ORDER-BY
>> clause.
> This seems pretty much the same as a junk attribute, if I understand you
> correctly.  I suggest given a look at how those work.
>



Is that actually documented anywhere much? I had to use one recently for 
the Redis FDW and looked in vain for some docco - not saying it's not 
there, just that I didn't find it.

cheers

andrew



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Making tab-complete.c easier to maintain
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Move DTK_ISODOW DTK_DOW and DTK_DOY to be type UNITS rather than