Re: Inverse of pg_get_serial_sequence? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Inverse of pg_get_serial_sequence?
Date
Msg-id CA+Tgmob6XVWPZ-GWs_5vEov5LVq5whtbS-MRHc5ZodoFq8QDQQ@mail.gmail.com
Whole thread Raw
In response to Inverse of pg_get_serial_sequence?  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Inverse of pg_get_serial_sequence?  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Fri, Aug 29, 2014 at 1:26 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> We have pg_get_serial_sequence() mapping (relation, colum) to the
> sequence. What I'm missing right now is the inverse. I.e. given a
> sequence tell me the owner.
> describe.c has a query for that, and it's not too hard to write, but it
> still seems 'unfriendly' not to provide it.
>
> Does anybody dislike adding a function for that?

I'll go out on a limb and say that it sounds like pointless catalog
bloat to me.  I am all in favor of adding things like this where the
SQL query is painful to write (e.g. things involving pg_depend) but if
it's a simple SELECT query then, eh, not really excited about it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Joel Jacobson
Date:
Subject: Re: PL/pgSQL 2
Next
From: Robert Haas
Date:
Subject: Re: Misleading error message in logical decoding for binary plugins