Re: [HACKERS] plpgsql: Checking status on a 'INSERT INTO ...'

2001-07-25 Thread Reinoud van Leeuwen
> I'm porting some stored procedures from a MSSQL server, and thought I'd > use PL/pgSQL. > > The original code is checking the insert with the line: > >if (@@Error != 0) You might want to use something like: SELECT INTO variable_name * FROM table WHERE field = some_value; IF FOUND

[HACKERS] plpgsql: Checking status on a 'INSERT INTO ...'

2001-07-25 Thread Turbo Fredriksson
I'm porting some stored procedures from a MSSQL server, and thought I'd use PL/pgSQL. The original code is checking the insert with the line: if (@@Error != 0) How do I do the same thing in PL/pgSQL? -- Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just ^