Re: Getting information about sequences

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting information about sequences
Дата
Msg-id 3178.1147705870@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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 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:
> [ ideas snipped ]

Yeah (actually the point about the update-in-place code being relevant
had just occurred to me too).  However, none of these are really
desirable solutions from psql's point of view, because they could only
work in 8.2 and later (or whenever we implemented them).  It'd be nicer
if \ds still worked against back-rev servers, which means we need a
solution that works with the current server API.  I'm thinking that psql
will need to pull the main \ds query result, and then manually issue a
select against each of the sequences (ick).  On the other hand this may
be the best thing anyway, since it's entirely likely that some of those
selects would fail for permissions reasons, and we don't want the whole
\ds operation to go down in flames just because you don't have select
rights on one sequence.

            regards, tom lane

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Getting information about sequences
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PORTS] Compiling on 8.1.3 on Openserver 5.05