Thread: Oversight?
rbt=# ALTER USER rbt SET CONSTRAINTS ALL DEFERRED; ERROR: syntax error at or near "ALL" at character 32 rbt=# ALTER USER rbt SET CONSTRAINTS = DEFERRED; ERROR: "constraints" is not a recognized option
Rod Taylor <rbt@rbt.ca> writes: > rbt=3D# ALTER USER rbt SET CONSTRAINTS ALL DEFERRED; > ERROR: syntax error at or near "ALL" at character 32 > rbt=3D# ALTER USER rbt SET CONSTRAINTS =3D DEFERRED; > ERROR: "constraints" is not a recognized option "SET CONSTRAINTS ALL DEFERRED" is a SQL-spec-mandated command syntax. Any similarity to Postgres' "SET var = value" syntax ends with the initial keyword. regards, tom lane
On Mon, 2003-08-11 at 19:16, Tom Lane wrote: > Rod Taylor <rbt@rbt.ca> writes: > > rbt=# ALTER USER rbt SET CONSTRAINTS ALL DEFERRED; > > ERROR: syntax error at or near "ALL" at character 32 > > rbt=# ALTER USER rbt SET CONSTRAINTS = DEFERRED; > > ERROR: "constraints" is not a recognized option > > "SET CONSTRAINTS ALL DEFERRED" is a SQL-spec-mandated command syntax. > Any similarity to Postgres' "SET var = value" syntax ends with the > initial keyword. Yes, but we don't support 'SET constraints = deferred' either.
> > rbt=3D# ALTER USER rbt SET CONSTRAINTS ALL DEFERRED; > > ERROR: syntax error at or near "ALL" at character 32 > > rbt=3D# ALTER USER rbt SET CONSTRAINTS =3D DEFERRED; > > ERROR: "constraints" is not a recognized option > > "SET CONSTRAINTS ALL DEFERRED" is a SQL-spec-mandated command syntax. > Any similarity to Postgres' "SET var = value" syntax ends with the > initial keyword. I assume his point is "how do we set all of a user's constraints deferred by default"? Chris
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes: > I assume his point is "how do we set all of a user's constraints deferred by > default"? [shrug] We tell the user to create 'em that way in the first place. regards, tom lane
On Tue, 12 Aug 2003, Christopher Kings-Lynne wrote: > > > rbt=3D# ALTER USER rbt SET CONSTRAINTS ALL DEFERRED; > > > ERROR: syntax error at or near "ALL" at character 32 > > > rbt=3D# ALTER USER rbt SET CONSTRAINTS =3D DEFERRED; > > > ERROR: "constraints" is not a recognized option > > > > "SET CONSTRAINTS ALL DEFERRED" is a SQL-spec-mandated command syntax. > > Any similarity to Postgres' "SET var = value" syntax ends with the > > initial keyword. > > I assume his point is "how do we set all of a user's constraints deferred by > default"? But constraints aren't really per user, are they? I can see wanting to set all of a table's contraints / dependent table constraints to deferred, but a user's constraints doesn't make much sense to me.
On Tue, 12 Aug 2003, Christopher Kings-Lynne wrote: > > > rbt=3D# ALTER USER rbt SET CONSTRAINTS ALL DEFERRED; > > > ERROR: syntax error at or near "ALL" at character 32 > > > rbt=3D# ALTER USER rbt SET CONSTRAINTS =3D DEFERRED; > > > ERROR: "constraints" is not a recognized option > > > > "SET CONSTRAINTS ALL DEFERRED" is a SQL-spec-mandated command syntax. > > Any similarity to Postgres' "SET var = value" syntax ends with the > > initial keyword. > > I assume his point is "how do we set all of a user's constraints deferred by > default"? I don't think that'd make all of a user's constraints deferred, I'd think it would make all constraints that are deferrable deferred for that user's transactions (as if the user did a set constraints all deferred at the beginning of every transaction).