Re: About OID and the commands/operators STRING( ... )..AS and + - Mailing list pgsql-general

From Stephan Szabo
Subject Re: About OID and the commands/operators STRING( ... )..AS and +
Date
Msg-id Pine.BSF.4.10.10009231441470.74037-100000@megazone23.bigpanda.com
Whole thread Raw
In response to About OID and the commands/operators STRING( ... )..AS and +  ("Jarmo Paavilainen" <netletter@comder.com>)
List pgsql-general
On Sat, 23 Sep 2000, Jarmo Paavilainen wrote:

>
> ...
> > > I suspect that OID are reused, but how fast are they reused?
> >
> > IIRC, they are not reused at all.
>
> Not even if a row is deleted?
> Wont PostgreSQL run out of OID after a while (maybe long time, but anyway).

Theoretically yes.  I think they will theoretically rollover, but
it's not going to fill holes, it'll attempt reuse (except oid=0 i think)

> ...
> > > And does PostgreSQL support the STRING and AS command?
> ...
> > What does STRING do?  I don't see a function with that name, but
> > it's possible we have it with a different name.
> > If it's just cast value to a string, then use text(field) or
>
> Cast to string... Exactly what I was looking for, thanx. (Maybe STRING(...)
> is Sybase stuff).

You'll also need to coalesce to handle nulls (unless nulls are not
allowed), and that construct could be dangerous,
(int, string, numeric) being (1, '2', '1.0') vs (12, '', '1.0')



pgsql-general by date:

Previous
From: "Jarmo Paavilainen"
Date:
Subject: About OID and the commands/operators STRING( ... )..AS and +
Next
From: Philip Warner
Date:
Subject: RFC - change of behaviour of pg_get_userbyid & pg_get_viewdef?