Re: Getting information about sequences

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Getting information about sequences
Дата
Msg-id 20060515150353.GD21506@svana.org
обсуждение исходный текст
Ответ на Re: Getting information about sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Getting information about sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, May 15, 2006 at 10:44:15AM -0400, Tom Lane wrote:
> I haven't been able to think of a way to do that, unless you want to
> assume the existence of a plpgsql helper function.  There's an open
> request to list last_values in psql's "\ds", and it'd be real nice
> to be able to do it all in one query for that.

Long term I see a few ways of dealing with this:

- Pull that idea of storing all sequences in one table off the
shelf and implement it. The new heap up-date-in-place function may come
in handy there.

- Find a way of allowing functions to be declared inline, to avoid
creating system functions continuously. I don't know if there's
precedent for this.

- Create a function called: gettable(reloid) returns record, that takes
a relation OID and returns all the records in it. If all the tables
you're dealing with have a similar structure, you can use this to
iteratoe over, sequences just being a special case.

There's probably more, but that's all I can think of right now.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Getting information about sequences
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Getting information about sequences