Re: pg_stat_database shows userid as OID - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_stat_database shows userid as OID
Date
Msg-id 200211172124.gAHLOnS14795@candle.pha.pa.us
Whole thread Raw
In response to Re: pg_stat_database shows userid as OID  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_stat_database shows userid as OID  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> > In the pg_stat_activity view, the usesysid is shown as having type Oid.
> > However pg_shadow says it's an integer.  Is there a reason?
> 
> There's been disagreement for a long time over whether userids should be
> OIDs or ints.  If you want to introduce consistency then it's going to
> take a lot more than a one-line patch.  (First you'll need to convince
> the partisans involved which answer is the right one.)
> 
> > Looks like a bug.
> 
> Not as long as OID is 4 bytes.
> 
> I'd recommend not making any piecemeal changes, especially not when
> there's not yet a consensus which way to converge.

Well, seems we should make it consistent at least.  Let's decide and
make it done.  I think some wanted it to be an int so they could use the
same unix uid for pg_shadow, but I think we aren't using that idea much
anymore.  However, right now, it looks like the super user is '1', and
other users start numbering from 100.  That at least suggests int rather
than oid.

I am not particular in what we choose, but I do think there is a good
argument to make it consistent.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting float8 data into cube?
Next
From: Bruce Momjian
Date:
Subject: CLUSTER ALL syntax