Subject: Re: clarification on PQgetvalue()

From: [email-masked] (Alfredo Sanchez)
Date: Sat, 11 Jan 92 15:15:20 -0800

mao says:

> for the record, the program pgstats.c in the sample/ directory includes
> code that manages portal buffers, tuples, and attributes.  this program
> was written so that folks could use it as a template.

in said program, in function count_users() e. g., why isn't
retrieve portal used, but rather just retrieve? is it because
you won't need to fetch the actual tuples?
why do you check for 'E' in case of error from PQexec?
the ref manual says that, for historical reasons, an 'R'
is returned.

btw, my program is now working well, thanx a lot.

J Alfredo Sanchez H
-------------------
Hypertext Research Lab
Department of Computer Science
Texas A&M University

---

From: [email-masked] (Mike Olson)
Date: Sat, 11 Jan 92 16:57:32 PST

> you won't need to fetch the actual tuples?

yes.

> the ref manual says that, for historical reasons, an 'R'

'R' is returned in the case of no error (it stands for RESULTS).  if
the command fails for some reason (you removed pg_user, for example),
then the return code is 'E', signifying error.  the string following
the 'E' token gives details.
					mike olson
					[email-masked]