Search Postgresql Archives

Re: pg_get_serial_sequence Strangeness/Unreliable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alvaro Herrera <alvherre@xxxxxxxxxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux