Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 10:44 AM, Andres Freund wrote: > On 2014-09-03 09:31:50 -0400, Robert Haas wrote: >> On Fri, Aug 29, 2014 at 1:26 PM, Andres Freund >> wrote: >> > We have pg_get_serial_sequence() mapping (relation, colum) to the >> > sequence. What I'm missing right now is the inverse. I.

Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-09-03 Thread Andres Freund
On 2014-09-03 09:31:50 -0400, Robert Haas wrote: > On Fri, Aug 29, 2014 at 1:26 PM, Andres Freund 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

Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-09-03 Thread Robert Haas
On Fri, Aug 29, 2014 at 1:26 PM, Andres Freund 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 > st

Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-08-29 Thread David G Johnston
Andres Freund-3 wrote > On 2014-08-29 17:55:38 -0700, David G Johnston wrote: >> Andres Freund-3 wrote > >> >> pg_get_sequence_ownedby(...) > > My problem is that that possibly be confused with the user owning the > sequence :/ Though as soon as that person reads the output their misunderstandi

Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-08-29 Thread Andres Freund
On 2014-08-29 17:55:38 -0700, David G Johnston wrote: > Andres Freund-3 wrote > > Hi, > > > > 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,

Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-08-29 Thread David G Johnston
Andres Freund-3 wrote > Hi, > > 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' n