Re: postgres not allowing new database?

From: lee johnson <lee(at)imyourhandiman(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres not allowing new database?
Date: 2000-09-08 14:28:30
Message-ID: 39B8F78E.42246959@imyourhandiman.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 2000-09-08 14:44:32 Re: That killer 3rd join...
Previous Message Tom Lane 2000-09-08 14:12:16 Re: libpq problem with inserts