Re: Representing a SRF return column in catalogs

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Representing a SRF return column in catalogs
Дата
Msg-id CA+TgmobtT-a7vp7bghwDViVA6LVGOtvxnYPL=zu1ro-FCRxcmg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Representing a SRF return column in catalogs  (Atri Sharma <atri.jiit@gmail.com>)
Ответы Re: Representing a SRF return column in catalogs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Nov 7, 2014 at 11:31 AM, Atri Sharma <atri.jiit@gmail.com> wrote:
> Let me give an example:
>
> Consider an user defined SRF (or an inbuilt one (generate_series)). I am
> working on a path keys tracking project (more details on it in a separate
> email). I am interested in one of the columns of the result of the SRF and
> want to store it in catalogs in a manner that allows me to refer it later
> when executing the SRF.
>
> One way can be to store the raw column name. However, I am not sure how will
> that work around aliases without a considerable fiddling with Alias nodes in
> parsetime.
>
> Can I store relattnos or something? I need to get the stored att in planner
> and build pathkeys from it.

I still can't really follow.  The columns returned by an SRF can't
change after the function is created, so the column number ought to be
stable.  The name probably will be too, though.  On the other hand,
either could get dropped and created, so then where are you?  I don't
know, because I still can't understand what you're trying to do.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: row_to_json bug with index only scans: empty keys!
Следующее
От: Robert Haas
Дата:
Сообщение: Re: On partitioning