* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.297 2005/11/28 04:35:32 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.298 2005/12/07 15:20:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
typedef enum ContainsOids
{
- MUST_HAVE_OIDS, /* WITH OIDS explicitely specified */
- MUST_NOT_HAVE_OIDS, /* WITHOUT OIDS explicitely specified */
+ MUST_HAVE_OIDS, /* WITH OIDS explicitly specified */
+ MUST_NOT_HAVE_OIDS, /* WITHOUT OIDS explicitly specified */
DEFAULT_OIDS /* neither specified; use the default, which
* is the value of the default_with_oids GUC
* var */
-- Deferrable constraints
-- (right now, only FOREIGN KEY constraints can be deferred)
--
--- deferrable, explicitely deferred
+-- deferrable, explicitly deferred
CREATE TABLE pktable (
id INT4 PRIMARY KEY,
other INT4
INSERT INTO fktable VALUES (5, 10);
ERROR: insert or update on table "fktable" violates foreign key constraint "fktable_fk_fkey"
DETAIL: Key (fk)=(10) is not present in table "pktable".
--- explicitely defer the constraint
+-- explicitly defer the constraint
BEGIN;
SET CONSTRAINTS ALL DEFERRED;
INSERT INTO fktable VALUES (10, 15);
INSERT INTO fktable VALUES (100, 200);
INSERT INTO pktable VALUES (200, 500); -- make the FK insert valid
COMMIT;
--- default to deferred, explicitely make immediate
+-- default to deferred, explicitly make immediate
BEGIN;
SET CONSTRAINTS ALL IMMEDIATE;
-- should fail
-- (right now, only FOREIGN KEY constraints can be deferred)
--
--- deferrable, explicitely deferred
+-- deferrable, explicitly deferred
CREATE TABLE pktable (
id INT4 PRIMARY KEY,
other INT4
-- default to immediate: should fail
INSERT INTO fktable VALUES (5, 10);
--- explicitely defer the constraint
+-- explicitly defer the constraint
BEGIN;
SET CONSTRAINTS ALL DEFERRED;
COMMIT;
--- default to deferred, explicitely make immediate
+-- default to deferred, explicitly make immediate
BEGIN;
SET CONSTRAINTS ALL IMMEDIATE;