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
> 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
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