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

new RETURNING clause and Pg.pm

From: "Brandon Metcalf" <bmetcalf(at)nortel(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: new RETURNING clause and Pg.pm
Date: 2008-06-26 15:32:26
Message-ID: Pine.LNX.4.58L.0806261024110.9186@cash.us.nortel.com (view raw or flat)
Thread:
Lists: pgsql-general
I just upgraded to 8.3.3 and taking advantage of the RETURNING clause
which is really cool.  I've found that with Pg.pm $r->resultStatus
returns the integer "2" when the RETURNING clause is used on an
insert.

Of course, without using RETURNING the status is the constant
PGRES_COMMAND_OK.

Is checking for "2" my best option?

-- 
Brandon

Responses

pgsql-general by date

Next:From: Aswani KumarDate: 2008-06-26 15:38:49
Subject: problem getting postgres 8.3.1 with xml support to work on Redhat Enterprise Linux 4
Previous:From: Michael ShulmanDate: 2008-06-26 15:29:30
Subject: Re: what are rules for?

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