[SQL] Boolean without default declared

2007-08-15 Thread Jon Collette
If a column with a boolean datatype doesn't have a default value. What type of value is set if nothing is inserted into that column? Here is my test table and the queries I have tried. I can't seem to be able to select the rows where happy has no value. Table "public.users" Colum

[SQL] Make a SQL statement not run trigger

2007-08-21 Thread Jon Collette
Is it possible to run an insert,update, or delete and have it not launch a trigger like it normally would? For example could I set a value DONOTRUN = True; insert into contacts Where the trigger on contacts would call a function that would have an IF statment for that DONOTRUN value? Or

Re: [SQL] Make a SQL statement not run trigger

2007-08-21 Thread Jon Collette
21/07, Jon Collette <[EMAIL PROTECTED]> wrote: Is it possible to run an insert,update, or delete and have it not launch a trigger like it normally would? alter table disable trigger ... http://www.postgresql.org/docs/8.2/static/sql-altertable.html ---(end o

Re: [SQL] Make a SQL statement not run trigger

2007-08-21 Thread Jon Collette
Good Idea. However some of my triggers use the DELETE action as well. So I can't use this method. Thomas Kellerer wrote: Jon Collette wrote on 21.08.2007 23:26: Is it possible to run an insert,update, or delete and have it not launch a trigger like it normally would? For example co

Re: [SQL] Make a SQL statement not run trigger

2007-08-21 Thread Jon Collette
table_trigger_name; return boolean; end; $$ LANGUAGE plpgsql; / Which of course will error when there is no table_trigger_name made for that session. I couldn't find an exception in the exceptions list for table not found errors. Scott Marlowe wrote: On 8/21/07, Jon Collette <[EMAIL P