Re: Getting information about sequences

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting information about sequences
Дата
Msg-id 2909.1147704255@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Getting information about sequences  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Getting information about sequences  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Mon, May 15, 2006 at 03:55:49PM +0300, Forums @ Existanze wrote:
>> I have been able to get the sequence names, but I can get their values all
>> in one query.

> Select sequence.last_value;

The hard part of the request is to do it "all in one query", though,
ie somehow show
    select relname, last_value from pg_class where relkind = 'S';

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.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug in ordered views?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Getting information about sequences