Skip site navigation (1) Skip section navigation (2)

plpgsql: Checking status on a 'INSERT INTO ...'

From: Turbo Fredriksson <turbo(at)bayour(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: plpgsql: Checking status on a 'INSERT INTO ...'
Date: 2001-07-25 09:59:21
Message-ID: 87ae1tz5vq.fsf@papadoc.bayour.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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 
 ^^^^^    / /(_)_ __  _   ___  __  selective about who its friends are 
         / / | | '_ \| | | \ \/ /   Debian Certified Linux Developer  
  _ /// / /__| | | | | |_| |>  <  Turbo Fredriksson   turbo(at)tripnet(dot)se
  \\\/  \____/_|_| |_|\__,_/_/\_\ Stockholm/Sweden

explosion ammonium ammunition iodine strategic Rule Psix NORAD FBI
fissionable Treasury cryptographic killed AK-47 Nazi Waco, Texas
[See http://www.aclu.org/echelonwatch/index.html for more about this]

Responses

pgsql-hackers by date

Next:From: Reinoud van LeeuwenDate: 2001-07-25 10:09:07
Subject: Re: plpgsql: Checking status on a 'INSERT INTO ...'
Previous:From: Tom LaneDate: 2001-07-25 07:01:30
Subject: Re: Question about porting the PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group