Re: pg_dump/restore problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump/restore problem
Дата
Msg-id 18816.1150250936@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump/restore problem  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-admin
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> On Tue, Jun 13, 2006 at 04:28:47PM -0400, renneyt@yahoo.com wrote:
>> Does  pg_get_serial_sequence()  exist as plpgsql code? Where may I find
>> it? I would like to retrofit it into a 7.4.8 PG database.

> No, but it shouldn't be terribly hard to do it in plpgsql; you just need
> to build the right sequence name (assuming you haven't been messing with
> the sequence names).

You could actually do it 100% correctly in plpgsql; it's really just a
query into pg_depend to find the sequence dependent on the column.

But if your need is just to restore one specific dump, I'd be inclined
to edit the dump file.  Most of the time, pg_get_serial_sequence('foo',
'bar') just results in 'foo_bar_seq'.

            regards, tom lane

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: pg_dump/restore problem
Следующее
От: "Jaime Casanova"
Дата:
Сообщение: Re: PLPGSQL/EXCEPTION HANDLING