Re: Show sequences owned by - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Show sequences owned by
Date
Msg-id 20111104142936.GH24234@tamriel.snowman.net
Whole thread Raw
In response to Re: Show sequences owned by  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Show sequences owned by
Re: Show sequences owned by
List pgsql-hackers
* Magnus Hagander (magnus@hagander.net) wrote:
> If there is noone owning it at all, it just falls through the if/else
> block and ignores it if that happens (PQntuples() returns 0).

Ah, right, but 'result' is still non-zero, ok.

> Is there really a case for multiple sequences to own it? How would you
> go about making that happen? ALTER SEQUENCE.. OWNED BY.. only takes
> one table, afaics?

I just noticed it was pulling from pg_depend and we could be creating
multiple dependencies on a single sequence by having two tables use it
as a default value.  If that situation doesn't cause a problem for this,
then that's fine. :)  Couldn't remember if we distinguished 'owned by'
from 'dependend upon' for seqeunces.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: removing =>(text, text) in 9.2
Next
From: Tom Lane
Date:
Subject: Re: IDLE in transaction introspection