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

From Tom Lane
Subject Re: pg_stat_database shows userid as OID
Date
Msg-id 1629.1037556989@sss.pgh.pa.us
Whole thread Raw
In response to pg_stat_database shows userid as OID  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: pg_stat_database shows userid as OID  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: pg_stat_database shows userid as OID  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Patrick Welche
Date:
Subject: Re: Debian build prob
Next
From: Tom Lane
Date:
Subject: Re: btree shrinking again