Hi Frank
I use the following constructs to generate an objectid's in my database:
CREATE SEQUENCE public.tsfraction MAXVALUE 999999;
CREATE FUNCTION getobjectid() RETURNS text
AS '
select((select(to_char(current_timestamp, \'yyyy-mm-dd-hh-mm-ss\'))) ||
(select(to_char((nextval(\'tsfraction\')),\'-FM000000MI\'))))as return;
'
LANGUAGE 'sql';
CREATE TABLE public.object
(
objectid text NOT NULL DEFAULT getobjectid(),
-- other columns omited
CONSTRAINT pk_object PRIMARY KEY (objectid)
) WITH OIDS;
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl