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

From Len Morgan
Subject Re: postgres not allowing new database?
Date
Msg-id 00a401c0180e$35e6c9a0$0908a8c0@H233.bstx.cc
Whole thread Raw
In response to postgres not allowing new database?  (lee johnson <lee@imyourhandiman.com>)
Responses Compilator Postgres
List pgsql-general
-----Original Message-----
From: lee johnson <lee@imyourhandiman.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.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
>----------------
>
>
>
>


pgsql-general by date:

Previous
From: Michelle Murrain
Date:
Subject: "Unrecognized variable client_encoding"
Next
From: "Adam Lang"
Date:
Subject: Re: install 7.0.2 host