Re: [SQL] Removing a constraint?
Michael Davis wrote: > Does anyone know how to completely and accurately remove or drop a > constraint, specifically a foreign key constraint? I tried to remove a > constraint by deleting it's trigger from pg_triggers. This caused some > undesirable side effects with other tables involved with the constraint. I > have several tables that I need to change the column constraints and > foreign key constraints on. Recreating (drop and create) the table every > time I need to change a column constraint is a pain because all the objects > that reference the table would also need to be recreated (i.e. views and > triggers). How do production DBAs successfully make changes to their > tables? > > FYI, I was able to alter table add the same constraint many times. Is this > a problem? This created a new trigger in pg_triggers every time. A bug in "cluster" will do this, if you cluster a table it will drop all constraints and indexes. One could use pg_dump, as: pg_dump -a -t table database > table_data.sql pg_dump -s -t table database > table_schema.sql (edit table_schema.sql to remove constraint) psql database < table_schema.sql psql database < table_data.sql
[SQL] pg_recvbuf : unexpected EOF on client
I have found the same problem in my database. Have you any solution for this problem, please?? Mahesh Guleria
[SQL] Re: Casting
Yes. Casts are done like this: SomeFiled::int4 or SomeField::text Double colons is the key '::' --rob - Original Message - From: "Thomas SMETS" <[EMAIL PROTECTED]> To: "psql novice" <[EMAIL PROTECTED]>; "psql sql" <[EMAIL PROTECTED]> Sent: Thursday, January 04, 2001 7:31 PM Subject: Casting > > > Hi, > > In pgsql > > I'm removing charaters from a String which should be numbers. > I then want to make calculations on these numbers (calculate the ISBN > number). > > Do I have to cast the char into int's before I can do the calulations. > > Also I looked in the User manual but could not find the modulo function > where is it ? > > tx, > > Thomas, > > > > > > > > > > > > > > -- > Thu Jan 4 20:19:03 CET 2001 > > Thomas SMETSe-mail : [EMAIL PROTECTED] > Av. de la Brabançonne 133 / 3 Tel. : +32 (0)2 742. 05. 94. > 1030 Bruxelles > === Quote of the Day = > Jealousy is all the fun you think they have. > = End of Quote === >
