Re: [GENERAL] PostgreSQL connect options?

From: Maarten Boekhold <maartenb(at)dutepp0(dot)et(dot)tudelft(dot)nl>
To: Roland Roberts <roberts(at)panix(dot)com>
Cc: PostgreSQL-documentation <docs(at)postgreSQL(dot)org>, "pgsql-general(at)postgreSQL(dot)org" <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] PostgreSQL connect options?
Date: 1998-08-01 21:36:11
Message-ID: Pine.SUN.3.91.980801233433.970A-100000@dutepp0.et.tudelft.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 1 Aug 1998, Roland Roberts wrote:

> Once upon a time, I know I saw an example of using connect options to
> specify things like a user name. I can't find any examples in any of
> the references now. So what are some of the options and how does one
> specify them?

You want to do this from within a program? libpq has PQconnectdb(). You
can use it like

PQconnectdb("dbname=database user=username password=pwd authtype=password");

The perl module has PQconnectdb() too, works the same way. I suppose the
other interfaces have similar named functions.

Maarten

_____________________________________________________________________________
| TU Delft, The Netherlands, Faculty of Information Technology and Systems |
| Department of Electrical Engineering |
| Computer Architecture and Digital Technique section |
| M(dot)Boekhold(at)et(dot)tudelft(dot)nl |
-----------------------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roland Roberts 1998-08-01 21:53:32 Re: [GENERAL] PostgreSQL connect options?
Previous Message Roland Roberts 1998-08-01 19:23:46 PHP and keystone (formerly PTS)