pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: jimmy.olsen <jimmy.olsen@ig.com.br>
Cc: pgsql-sql@postgresql.org
Subject: Re: getting back autonumber ... Another MsSQL Comparation Question
Date: Fri, 8 Jul 2005 06:32:30 -0600
Message-ID: <20050708123230.GA60834@winnie.fuhr.org> (raw)
In-Reply-To: <003c01c583b4$3e20b510$230a0a0a@ligaone.com.br>
References: <42CD6B58.6060508@techevolution.be>
	<20050707180329.GA11332@alvh.no-ip.org>
	<003c01c583b4$3e20b510$230a0a0a@ligaone.com.br>

[Please start a new thread when asking new questions.]

On Fri, Jul 08, 2005 at 08:56:56AM -0300, jimmy.olsen wrote:
>         I need to know the number of affected (Inserted, deleted, updated)
> rows by a Query. In MsSQL I use SELECT @@ROWCOUNT, similar to SELECT
> @@IDENTITY. Is there any @@RowCount similar statement in PostGres??

Your client interface should have a function to get the row count.
In libpq, for example, you can call PQcmdTuples(); in PL/pgSQL you
can use GET DIAGNOSTICS.  See the documentation for whatever interface
you're using.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (2+ messages)

Message-ID: <20050708123230.GA60834@winnie.fuhr.org>
Permalink:  ../20050708123230.GA60834@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050708123230.GA60834@winnie.fuhr.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, jimmy.olsen@ig.com.br
  Subject: Re: getting back autonumber ... Another MsSQL Comparation Question
  In-Reply-To: <20050708123230.GA60834@winnie.fuhr.org>

* 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