Oversight?

Started by Rod Taylorover 22 years ago7 messages
#1Rod Taylor
rbt@rbt.ca

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rod Taylor (#1)
Re: Oversight?

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

#3Rod Taylor
rbt@rbt.ca
In reply to: Tom Lane (#2)
Re: Oversight?

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.

#4Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Rod Taylor (#1)
Re: Oversight?

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

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#4)
Re: Oversight?

"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

#6scott.marlowe
scott.marlowe@ihs.com
In reply to: Christopher Kings-Lynne (#4)
Re: Oversight?

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.

#7Stephan Szabo
sszabo@megazone.bigpanda.com
In reply to: Christopher Kings-Lynne (#4)
Re: Oversight?

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).