Re: Connection string

From: "Harpreet Dhaliwal" <harpreet(dot)dhaliwal01(at)gmail(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Connection string
Date: 2006-08-11 21:32:04
Message-ID: d86a77ef0608111432q4310ea6dy21897e32a518f57a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

LOl..that ';' is quite obvious. Though i forgot to include that in the mail.
Sorry about that.
Also, do u think that while starting the postgresql server using 'pg_ctl
start', there is some -i option that needs to be included with it so that
the DB server accepts tcp connections?
One of the guys in the postgres community was talking about it. don't know
how true is that because there's no such option like that for pg_ctl start
in the postgres manual.
Can you please comment on that?
~Harpreet.

On 8/11/06, Michael Meskes <meskes(at)postgresql(dot)org> wrote:
>
> On Thu, Aug 10, 2006 at 11:57:14AM -0400, Harpreet Dhaliwal wrote:
> > This is a simple code snippet that i've written to check if i can
> connect to
> > the postgres database server residing at IP 192.168.0.123. DB name is
> xyz
> > Also, user account jsb has the access to the database xyz.
> > ------------------------------------------------------------
> > #include <stdio.h>
> >
> > EXEC SQL INCLUDE sqlca
>
> I take it you did not copy the file verbatim because this seem to lack
> the ';'.
>
> > EXEC SQL CONNECT TO 'tcp:postgresql://192.168.0.123/xyz' USER jsb
>
> The correct syntax would be:
>
> EXEC SQL CONNECT TO tcp:postgresql://192.168.0.123/xyz USER jsb;
>
> This should work at least it does for me. :-)
>
> Michael
>
> --
> Michael Meskes
> Email: Michael at Fam-Meskes dot De, Michael at Meskes dot
> (De|Com|Net|Org)
> ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
> Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2006-08-11 21:47:14 Re: Connection string
Previous Message marcelo Cortez 2006-08-11 20:32:10 table space for temporal tables