Re: pg_stat_database shows userid as OID

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_stat_database shows userid as OID
Дата
Msg-id 200211172124.gAHLOnS14795@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: pg_stat_database shows userid as OID  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_stat_database shows userid as OID  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Getting float8 data into cube?
Следующее
От: Bruce Momjian
Дата:
Сообщение: CLUSTER ALL syntax