pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedcount record in plpgsql
3+ messages / 3 participants
[nested] [flat]
* count record in plpgsql
@ 2004-11-29 02:31 Nurdin <dja.mnurdin@cma-cgm.com>
2004-11-29 09:30 ` Re: count record in plpgsql Tomasz Myrta <jasiek@klaster.net>
2004-11-29 09:42 ` Re: count record in plpgsql Richard Huxton <dev@archonet.com>
0 siblings, 2 replies; 3+ messages in thread
From: Nurdin @ 2004-11-29 02:31 UTC (permalink / raw)
To: pgsql-sql
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.
any ideas?
thnx
best and regard
nurdin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: count record in plpgsql
2004-11-29 02:31 count record in plpgsql Nurdin <dja.mnurdin@cma-cgm.com>
@ 2004-11-29 09:30 ` Tomasz Myrta <jasiek@klaster.net>
1 sibling, 0 replies; 3+ messages in thread
From: Tomasz Myrta @ 2004-11-29 09:30 UTC (permalink / raw)
To: Nurdin <dja.mnurdin@cma-cgm.com>; +Cc: pgsql-sql
> 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.
>
> any ideas?
Is it what you need:
GET DIAGNOSTICS n = ROW_COUNT;
after executing query ?
Regards,
Tomasz Myrta
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: count record in plpgsql
2004-11-29 02:31 count record in plpgsql Nurdin <dja.mnurdin@cma-cgm.com>
@ 2004-11-29 09:42 ` Richard Huxton <dev@archonet.com>
1 sibling, 0 replies; 3+ messages in thread
From: Richard Huxton @ 2004-11-29 09:42 UTC (permalink / raw)
To: Nurdin <dja.mnurdin@cma-cgm.com>; +Cc: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-11-29 09:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 02:31 count record in plpgsql Nurdin <dja.mnurdin@cma-cgm.com>
2004-11-29 09:30 ` Tomasz Myrta <jasiek@klaster.net>
2004-11-29 09:42 ` Richard Huxton <dev@archonet.com>
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