Re: [SQL] trigger/for key help

2004-04-13 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: >>> Is there a reason postgres goes out of its way to pick names that >>> will be harder to work with than necessary? > I don't see an unseverable link between "user name space" and "identifiers > that don't need to be quoted". Mixed case names for instance s

Re: [SQL] trigger/for key help

2004-04-13 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > Is there a reason postgres goes out of its way to pick names that > > will be harder to work with than necessary? > > If we use ordinary identifiers for system-generated names then we will > be infringing on user na

Re: [SQL] trigger/for key help

2004-04-13 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Is there a reason postgres goes out of its way to pick names that > will be harder to work with than necessary? If we use ordinary identifiers for system-generated names then we will be infringing on user name space --- ie, there's a potential for conflict.

Re: [SQL] trigger/for key help

2004-04-12 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Bret Hughes <[EMAIL PROTECTED]> writes: > > FWIW I tried to use alter table but could never get the parser to accept > > $1 as a constraint name. I used single and double quotes as well as a > > lame attempt \$1. > > Hm, "$1" works for me ... Hm, this rem

Re: [SQL] trigger/for key help

2004-04-12 Thread Bret Hughes
On Sun, 2004-04-11 at 21:27, Tom Lane wrote: > Bret Hughes <[EMAIL PROTECTED]> writes: > > FWIW I tried to use alter table but could never get the parser to accept > > $1 as a constraint name. I used single and double quotes as well as a > > lame attempt \$1. > > Hm, "$1" works for me ... > > re

Re: [SQL] trigger/for key help

2004-04-11 Thread Tom Lane
Bret Hughes <[EMAIL PROTECTED]> writes: > FWIW I tried to use alter table but could never get the parser to accept > $1 as a constraint name. I used single and double quotes as well as a > lame attempt \$1. Hm, "$1" works for me ... regression=# create table foo (f1 int primary key); NOTICE: CR

Re: [SQL] trigger/for key help

2004-04-11 Thread Bret Hughes
On Sun, 2004-04-11 at 17:00, Tom Lane wrote: > Bret Hughes <[EMAIL PROTECTED]> writes: > > elevating=# drop table test_types; > > ERROR: could not find tuple for constraint 2041971 > > > I can find no reference to these oids anywhere. > > You haven't looked very hard then ;-). I expect this is

Re: [SQL] trigger/for key help

2004-04-11 Thread Tom Lane
Bret Hughes <[EMAIL PROTECTED]> writes: > elevating=# drop table test_types; > ERROR: could not find tuple for constraint 2041971 > I can find no reference to these oids anywhere. You haven't looked very hard then ;-). I expect this is because pg_depend has links from the table to the constrain

Re: [SQL] trigger/for key help

2004-04-11 Thread Bret Hughes
On Sun, 2004-04-11 at 10:17, Stephan Szabo wrote: > > On Sat, 11 Apr 2004, Bret Hughes wrote: > > > S*t s*t s*t. I have managed to screw up the system tables trying to > > delete a foreign key on a new table I was going to start using tomorrow. > > > > > > > elevating=# drop table diag_logs; >

Re: [SQL] trigger/for key help

2004-04-11 Thread Stephan Szabo
On Sat, 11 Apr 2004, Bret Hughes wrote: > S*t s*t s*t. I have managed to screw up the system tables trying to > delete a foreign key on a new table I was going to start using tomorrow. > > > elevating-# \d diag_logs > Table "diag_logs" > Column |

[SQL] trigger/for key help

2004-04-10 Thread Bret Hughes
S*t s*t s*t. I have managed to screw up the system tables trying to delete a foreign key on a new table I was going to start using tomorrow. elevating-# \d diag_logs Table "diag_logs" Column | Type | Modifiers