From: | Thomas Guettler <hv(at)tbz-pariv(dot)de> |
---|---|
To: | pgsql-de-allgemein(at)postgresql(dot)org |
Subject: | Spalte mit not null und deferrable hinzufügen |
Date: | 2008-06-17 09:36:26 |
Message-ID: | 4857859A.7080808@tbz-pariv.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-de-allgemein |
Hallo,
ich möchte eine Spalte mit einem initially deferred not null constraint
hinzufügen.
db=# alter table mytable add column "time" timestamp with time zone not
null deferrable initially deferred;
FEHLER: falsch platzierte DEFERRABLE-Klausel
Laut Doku müsste der Befehl eigentlich funktionieren:
alter table Doku
ADD [ COLUMN ] /column/ /type/ [ /column_constraint/ [ ... ] ]
create table Doku:
where /column_constraint/ is:
[ CONSTRAINT /constraint_name/ ]
{ NOT NULL |
NULL |
UNIQUE /index_parameters/ |
PRIMARY KEY /index_parameters/ |
CHECK ( /expression/ ) |
REFERENCES /reftable/ [ ( /refcolumn/ ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE /action/ ] [ ON UPDATE /action/ ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
select version();
version
--------------------------------------------------------------------------------------------
PostgreSQL 8.2.6 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
4.2.1 (SUSE Linux)
Hat jemand Hinweise?
Thomas
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
From | Date | Subject | |
---|---|---|---|
Next Message | A. Kretschmer | 2008-06-17 10:00:28 | Re: Spalte mit not null und deferrable hinzufügen |
Previous Message | Susanne Ebrecht | 2008-06-16 15:03:38 | PostgreSQL auf der FrOSCon |