Re: postgres not allowing new database?

From: "Len Morgan" <len-morgan(at)crcom(dot)net>
To: "lee johnson" <lee(at)imyourhandiman(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgres not allowing new database?
Date: 2000-09-06 14:24:40
Message-ID: 00a401c0180e$35e6c9a0$0908a8c0@H233.bstx.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----Original Message-----
From: lee johnson <lee(at)imyourhandiman(dot)com>
Cc: pgsql-general(at)postgresql(dot)org <pgsql-general(at)postgresql(dot)org>
Date: Wednesday, September 06, 2000 8:52 AM
Subject: [GENERAL] postgres not allowing new database?

>hi ..
>new user to postgresql access..
>
>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"

Hope this helps.

>
>well first off i'm not on network is that reason for error..
>i haven't done much reading yet but just in case i wanted to post this for
>time sake
>
>if this error is mentioned in readme somewhere either in docs or website
>i'll find it and just ignore this
>otherwise any help appreciated......
>
>lee
>----------------
>
>
>
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michelle Murrain 2000-09-06 14:35:27 "Unrecognized variable client_encoding"
Previous Message Tom Lane 2000-09-06 14:14:14 Re: pq_recvbuf: unexpected EOF on client connection