Re: [GENERAL] select max(oid)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: soundar rajan <psrajan(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] select max(oid)
Date: 1999-10-24 01:57:33
Message-ID: Pine.LNX.4.10.9910240355150.1284-100000@peter-e.yi.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Oct 22, soundar rajan mentioned:

> How do I
>
> select max(oid) from table;
>
> I'm able to to
> select max(fieldname) from tablename;
> but not max(oid).

There is no max function for the type oid. (Interestingly, casting it to
an int doesn't work either.) You could try to write your own (see help for
create aggregate). There appear to be < and > operators for the type, so
it shouldn't be too complicated.

--
Peter Eisentraut Sernanders vaeg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 1999-10-24 02:22:29 Re: [GENERAL] UPDATE cell from text file
Previous Message Bob Kline 1999-10-24 00:37:44 Re: [GENERAL] UPDATE cell from text file