Re: Adding a pg_get_owned_sequence function?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Adding a pg_get_owned_sequence function?
Дата
Msg-id 2797313.1694529622@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Adding a pg_get_owned_sequence function?  (Peter Eisentraut <peter@eisentraut.org>)
Ответы Re: Adding a pg_get_owned_sequence function?
Список pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> Would it work to just overload pg_get_serial_sequence with regclass 
> argument types?

Probably not; the parser would have no principled way to resolve
pg_get_serial_sequence('foo', 'bar') as one or the other.  I'm
not sure offhand if it would throw error or just choose one, but
if it just chooses one it'd likely be the text variant.

It's possible that we could get away with just summarily changing
the argument type from text to regclass.  ISTR that we did exactly
that with nextval() years ago, and didn't get too much push-back.
But we couldn't do the same for the return type.  Also, this
approach does nothing for the concern about the name being
misleading.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Document that PG_TRY block cannot have a return statement
Следующее
От: Tom Lane
Дата:
Сообщение: Re: remaining sql/json patches