Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA10775; Tue, 21 Jul 92 11:05:38 -0700
Message-Id: <9207211805.AA10775@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: Password Protection
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: mer@postgres.berkeley.edu
In-Reply-To: Your message of "Tue, 14 Jul 92 15:23:42 PDT."
             <9207142217.AA22703@postgres.Berkeley.EDU> 
Date: Tue, 21 Jul 92 11:05:22 PDT

you write:

> Could someone tell me how I attach a passwd to a database?  I'm using
> version 3.1 of postgres.

This isn't possible in either 3.1 or 4.0.  Security in postgres is minimal
to non-existent.

> Also, I'm writting an application using C and X-windows talking to a
> database using the libpq routines.  Am I right in assuming that you
> have to open and close a portal for every retrieve command issued to
> the database?

No.  For example you can have several portals open within a transaction block,
keep them open and do fetches from each as you need to.

	begin \g
	retrieve portal foo (pg_class.all) \g
	retrieve portal bar (pg_type.all) \g
	fetch 10 in foo \g
	fetch 8  in bar \g
	close foo \g
	close bar \g
	end \g

They can remain open inside the xaction block.

Also, it might be worth mentioning here, that if you don't specify a portal,
results are returned all at once in the "blank" portal.


Jeff Meredith
mer@postgres.berkeley.edu
