Re: count record in plpgsql

From: Richard Huxton <dev(at)archonet(dot)com>
To: Nurdin <dja(dot)mnurdin(at)cma-cgm(dot)com>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: count record in plpgsql
Date: 2004-11-29 09:42:58
Message-ID: 41AAEF22.10804@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Nurdin wrote:
> how can i know the count of record in plpgsql.example if i'm query
> with query komponent from delphi i will know the record count of
> record.but how with plpgsql.

GET DIAGNOSTICS integer_var = ROW_COUNT;

See the manual for details (plpgsql section, "Obtaining the result status").

HTH
--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2004-11-29 09:47:21 version 7.4 autocommit removed
Previous Message Tomasz Myrta 2004-11-29 09:30:33 Re: count record in plpgsql