Re: [SQL] Default on update

2005-11-23 Thread Richard Huxton
[EMAIL PROTECTED] wrote: I would want to replace "bv" values with FALSE when insert/update NULL value for this field. You could do this by having the application insert to a view with a rule that replaces null bv values before redirecting to the base table. Is more functional to create a Ru

Re: [SQL] Default on update

2005-11-23 Thread lucas
Quoting Richard Huxton : [EMAIL PROTECTED] wrote: Hi. Is there a way to create "default" constraint on UPDATE query. It's becouse I have a bool field that may NOT support NULL value, but the Front-End calls null for FALSE values. Sounds like your frontend is broken. Yes, it is. But I have no

Re: [SQL] Default on update

2005-11-23 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Hi. Is there a way to create "default" constraint on UPDATE query. It's becouse I have a bool field that may NOT support NULL value, but the Front-End calls null for FALSE values. Sounds like your frontend is broken. I was thinking something like: create table table1

[SQL] Default on update

2005-11-23 Thread lucas
Hi. Is there a way to create "default" constraint on UPDATE query. It's becouse I have a bool field that may NOT support NULL value, but the Front-End calls null for FALSE values. I was thinking something like: create table table1 ( id serial primary key, bv bool default false not null ); I w