Re: pg_get_serial_sequence Strangeness/Unreliable?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_get_serial_sequence Strangeness/Unreliable?
Дата
Msg-id 24823.1227732804@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_get_serial_sequence Strangeness/Unreliable?  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: pg_get_serial_sequence Strangeness/Unreliable?  ("Jaime Casanova" <jcasanov@systemguards.com.ec>)
Список pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Jeff MacDonald wrote:
>> Hi Tom, so far as I know the table "owns" the serial in so much as when i
>> do a \d of the table it says this

> He means ALTER SEQUENCE ... OWNED BY
> I don't know how you can ensure that it is, short of

Well, actually, I think the fact that pg_get_serial_sequence isn't
working is the most direct way of knowing that the ownership link
isn't there ;-).  You could grovel around in pg_depend manually but
I'm pretty sure of what the outcome will be.

I'd try doing an ALTER SEQUENCE OWNED BY and see if that changes the
results.  The worst that could happen is it takes ownership away from
whichever table actually created the sequence, if there was a different
one.

(My bet is that you got into this state as a result of using some weird
combination of pg_dump and server versions.)

            regards, tom lane

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

Предыдущее
От: Karina Guardado
Дата:
Сообщение: problems with special characters
Следующее
От: "Jaime Casanova"
Дата:
Сообщение: Re: pg_get_serial_sequence Strangeness/Unreliable?