Re: [SQL] create default

2001-01-08 Thread Jens Hartwig
Sorry, there is a "bug" in my statement (according to debug issues), the correct statement should be: CREATE FUNCTION test() RETURNS opaque AS 'BEGIN IF new.cno1 IS NULL THEN IF new.cno2 IS NULL THEN new.cno1 := trim(new.cno3); ELSIF new.cn

Re: [SQL] create default

2001-01-07 Thread Jens Hartwig
> hi,how to set default filed+field > > create table "table1"( > "cno1" char(10) default NEW.cno2+NEW.cno3, > "cno2" char(10) , > "cno3" char(10) > ); > > I try pl/pgsql and pl/tcl NOT RUN, > > thanks Try the following: CREATE FUNCTION test() RETURNS opaque AS 'BEGIN IF ne

[SQL] create default

2001-01-07 Thread guard
hi,how to set default filed+field create table "table1"( "cno1" char(10) default NEW.cno2+NEW.cno3, "cno2" char(10) , "cno3" char(10) ); I try pl/pgsql and pl/tcl NOT RUN, thanks