Re: postgres not allowing new database? - Mailing list pgsql-general

From lee johnson
Subject Re: postgres not allowing new database?
Date
Msg-id 39B8F78E.42246959@imyourhandiman.com
Whole thread Raw
In response to Re: postgres not allowing new database?  ("Len Morgan" <len-morgan@crcom.net>)
List pgsql-general
> >upon trying to create new database getting error as below:
>
> >tcl error executing pg_exec
> >create database handiman
> >is not a valid postgresql
> >connection
>
> You don't have a connection to the database yet (like the message says).
> You must first do a pg_connect and use the returned handle in the pg_exec
> call:
>
> % set c [pg_connect template1]
> pg_exec $c "create database handiman"
> pg_disconnect $c
>
> set c [pg_connect handiman]
> pg_exec $c "Whatever query you want to do on the handiman DB"

not sure i completely understood ( i am new to postgres AND this kind of
software...........) and end user to boot........not on network just local...
I can find NO documentation of how to get postermaster going for
newbies............

i can only get above commands to work ( which was likely the orig. posters
intent ) if I
type in  set c in front of them all.........I did NOT try the last line
Pg_exec as i just started pgaccess after
set c pg_connect handiman

that line produced no errors so i thought i was ready to go.....
but once inside pgaccess i was unable to connect to handiman database........
i was gettting unable to connect to localhost/is postmaster running with -i
and accepint connections on tcp/ip at 5432 .........????

thanks for any help
lee


getting


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq problem with inserts
Next
From: "Kevin Sorensen"
Date:
Subject: RE: libpq problem with inserts