Re: Representing a SRF return column in catalogs

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Representing a SRF return column in catalogs
Date: 2014-11-07 13:45:06
Message-ID: CA+TgmoaSvo0Yjoq2a4k9RDUc8sF=wARk0SQ5kh5nhkqPAqYYjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 5, 2014 at 8:24 AM, Atri Sharma <atri(dot)jiit(at)gmail(dot)com> wrote:
> I am working on something that requires representing a SRF return column in
> pg_proc and being able to retrieve it, retrieve the name of the column and
> make a ColumnRef node from it.
>
> The catch here are aliases:
>
> SELECT generate_series(1,100) AS a ORDER BY a;
>
> I need to know that the return column of generate_series is being referred
> as a in this query (hence tlist, sortClause will have 'c').
>
> I discussed and think that a way can be to have position of column rather
> than the actual name but that raises the question of the functionality
> needed for back resolving position to name (to make a ColumnRef node) and
> then infer that the column is being referred as an alias in this query.

It's not clear to me what you are trying to do, so I can't give you any advice.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-11-07 15:30:11 Re: Sequence Access Method WIP
Previous Message Alvaro Herrera 2014-11-07 13:32:03 Re: Proposal: Log inability to lock pages during vacuum