pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
libpgtcl and passwords
4+ messages / 2 participants
[nested] [flat]

* libpgtcl and passwords
@ 2001-04-28 03:02  Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 4+ messages in thread

From: Bruce Momjian @ 2001-04-28 03:02 UTC (permalink / raw)
  To: pgsql-interfaces


Is there a way to user username/passwords with libpgtcl?  I don't see
any options in pg_connect.  Is it pg_connect -conninfo conninfoString? 
Does conninfoString match libpq's PQconnectdb?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: libpgtcl and passwords
@ 2001-04-28 03:18  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2001-04-28 03:18 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-interfaces

> 
> Is there a way to user username/passwords with libpgtcl?  I don't see
> any options in pg_connect.  Is it pg_connect -conninfo conninfoString? 
> Does conninfoString match libpq's PQconnectdb?

I think I found the answer:

        /*
         * Establish a connection using the new PQconnectdb() interface
         */
        if (argc != 3)
        {
            Tcl_AppendResult(interp, "pg_connect: syntax error\n", 0);
            Tcl_AppendResult(interp, "pg_connect -conninfo conninfoString", 0);
            return TCL_ERROR;
        }

It wasn't clear to me that -conninfo is the standard PQconnectdb string
from the manual.  Let me see if I can clear that up.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: libpgtcl and passwords
@ 2001-04-30 08:48  Sandro Dentella <sandro.dentella@tin.it>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 1 reply; 4+ messages in thread

From: Sandro Dentella @ 2001-04-30 08:48 UTC (permalink / raw)
  To: pgsql-interfaces

On Fri, Apr 27, 2001 at 11:02:53PM -0400, Bruce Momjian wrote:
> 
> Is there a way to user username/passwords with libpgtcl?  I don't see
> any options in pg_connect.  Is it pg_connect -conninfo conninfoString? 
> Does conninfoString match libpq's PQconnectdb?

set p [pg_connect -conninfo "user=postgres host=localhost dbname=erm \
             password=xxx"]

is this what you are asking for?

ciao
sandro
*:-)

-- 
Sandro Dentella  *:-)
e-mail: sandro@ermit.it sandro.dentella@mi.infn.it 



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: libpgtcl and passwords
@ 2001-04-30 15:58  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Sandro Dentella <sandro.dentella@tin.it>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2001-04-30 15:58 UTC (permalink / raw)
  To: Sandro Dentella <sandro.dentella@tin.it>; +Cc: pgsql-interfaces

> On Fri, Apr 27, 2001 at 11:02:53PM -0400, Bruce Momjian wrote:
> > 
> > Is there a way to user username/passwords with libpgtcl?  I don't see
> > any options in pg_connect.  Is it pg_connect -conninfo conninfoString? 
> > Does conninfoString match libpq's PQconnectdb?
> 
> set p [pg_connect -conninfo "user=postgres host=localhost dbname=erm \
>              password=xxx"]
> 
> is this what you are asking for?

Yes, I later found -conninfo, and updated the SGML to mention that the
flags supported are those of libpq's PQconnectdb.  Thanks.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2001-04-30 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-28 03:02 libpgtcl and passwords Bruce Momjian <pgman@candle.pha.pa.us>
2001-04-28 03:18 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-04-30 08:48 ` Sandro Dentella <sandro.dentella@tin.it>
2001-04-30 15:58   ` Bruce Momjian <pgman@candle.pha.pa.us>

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