Thread: invalid command name "pg_connect" on tcl/tk script

invalid command name "pg_connect" on tcl/tk script

From
Ahmad Munif
Date:
hi,

i'm using redhat 6.0, postgresql 6.5 and libpgtcl.
i'm really confused, i can't make connection script
with tcl/tk to postgresql back end.

the script always wrong, and always appear
error  " invalid command name "pg_connect" 

why couldn't i write pg_connect command properly ?

what's going on ?

any one can help me to give me sample script to connect
to postgresql back end with tcl/tk ?

thanks


Re: [INTERFACES] invalid command name "pg_connect" on tcl/tk script

From
Thomas Lockhart
Date:
> any one can help me to give me sample script to connect
> to postgresql back end with tcl/tk ?

Look at pgaccess. A version is distributed with the Postgres source
tree, and is included in our recent beta-quality rpms.
                  - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


Re: [INTERFACES] invalid command name "pg_connect" on tcl/tk script

From
Lamar Owen
Date:
Ahmad Munif wrote:
> what's going on ?
> 
> any one can help me to give me sample script to connect
> to postgresql back end with tcl/tk ?

Read the pgaccess script -- in particular, the section that loads
libpgtcl.so. This whole script is an excellent example of accessing
PostgreSQL from tcl/tk. If you do not have the pgaccess script, download
the pgaccess tarball from ftp://www.flex.ro/pub/pgaccess, or from my
server at http://206.74.232.196/postgres.  You will be glad you looked
over this script.

Something like:

load libpgtcl.so

THEN you can use pg_connect et al.

Lamar Owen
WGCR Internet Radio