Re: [HACKERS] Re: Notation for nextval() (was Re: Several small patches)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Re: Notation for nextval() (was Re: Several small patches)
Дата
Msg-id 7437.945412633@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Notation for nextval() (was Re: Several small patches)  (Jeroen van Vianen <jeroen@design.nl>)
Список pgsql-hackers
Jeroen van Vianen <jeroen@design.nl> writes:
>> What I was hoping for was something that would *first* determine whether
>> foo is a sequence and *then* do the transformation only if so.

> I thought about this, but couldn't figure out how to test for foo being a 
> sequence.

IIRC, foo is a sequence if it has relkind 'S'.  You can check the
relkind by looking into the struct returned by heap_open.  The main
thing that needs to be thought about is how to ensure that the sequence
object won't be added to the query's rangetable list if it is used in
a way that looks like a table reference.  It may be that hacking up
ParseFuncOrColumn will be enough to prevent that, or it may not...
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small patches)
Следующее
От: Rahul Ravindrudu
Дата:
Сообщение: pointer to a table