pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: sqllist <pgsql-sql@postgresql.org>
Subject: Re: Some questions about PLpgSql
Date: Thu, 15 Mar 2001 08:23:50 -0800
Message-ID: <3AB0EC96.236515D4@agliodbs.com> (raw)
References: <002801c0ad3f$a2c77760$2400a8c0@hnjack>

Jack,

> 2) check if an INSERT/UPDATE/ DELETE has done successfully?

This happens automatically, within a PL/pgSQL function.  If the
INSERT/UPDATE errors out, the function automatically halts.  Actually,
this kind of behaviour can be annoying the other way (sometimes one
doesn't care about the error).  

Now, testing how many rows were inserted/updated/deleted ... that I'm
not sure about.  It would be nice to have a ROWS_AFFECTED returned from
a data manipulation query in PL/pgSQL, but I don't believe that that has
been implemented.

> Is there some more documents or samples for PLpgsql except  USER GUIDE and
> PostgreSQL Introduction & concept?

No. Some of us user-types are working on expanded documentation; until
then, you'll just have to muddle through.

-Josh Berkus

-- 
______AGLIO DATABASE SOLUTIONS___________________________
                                        Josh Berkus
   Complete information technology      josh@agliodbs.com
    and data management solutions       (415) 565-7293
   for law firms, small businesses       fax  621-2533
    and non-profit organizations.       San Francisco



view thread (4+ messages)  latest in thread

Message-ID: <3AB0EC96.236515D4@agliodbs.com>
Permalink:  ../3AB0EC96.236515D4@agliodbs.com/
Also on:    postgresql.org/message-id/3AB0EC96.236515D4@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com
  Subject: Re: Some questions about PLpgSql
  In-Reply-To: <3AB0EC96.236515D4@agliodbs.com>
  References: <002801c0ad3f$a2c77760$2400a8c0@hnjack> <3AB0EC96.236515D4@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox