From: | Maximilian Tyrtania <mty(at)fischerappelt(dot)de> |
---|---|
To: | Postgres Newbie <pgsql-novice(at)postgresql(dot)org> |
Subject: | Using column references in default expression |
Date: | 2007-09-05 14:43:16 |
Message-ID: | C3048D24.2943A%mty@fischerappelt.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi there,
I'm in the process of moving a rather large OpenBase database to PG 8.2.3.
In Openbase it was allowed to use column references in default expression,
which seems to be forbidden in PG.
You know, like that:
create table Mitarbeiter_Benutzergruppen (
_rowid longlong PRIMARY KEY DEFAULT nextval('serial') ,
Mitarbeiter_id longlong index,
Benutzergruppe_id longlong INDEX ,
Unique_id varchar(1023) INDEX derived Benutzergruppe_id+':'+Mitarbeiter_id
)
That's OB Syntax, btw.
I bet PG has honorable reasons to restrict access to column references in
default expressions, i'm just wondering how to achieve that now. Do I really
have to write a rule or trigger?
Tia,
Maximilian Tyrtania | IT-Entwickler
Mty(at)fischerAppelt(dot)de
fischerAppelt Kommunikation GmbH
Friedichstr. 149 | D-10117 Berlin | Germany
Tel. ++49-30-726146-728 | Fax ++49-30-726146-710
www.fischerAppelt.de
From | Date | Subject | |
---|---|---|---|
Next Message | Maximilian Tyrtania | 2007-09-06 09:06:47 | Re: Using column references in default expression |
Previous Message | Sean Davis | 2007-09-05 02:48:15 | Re: Copy from and serial columns |