pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedinfo
4+ messages / 4 participants
[nested] [flat]
* info
@ 2000-01-16 16:26 Andy Harrah <aharrah@springrock.com>
0 siblings, 0 replies; 4+ messages in thread
From: Andy Harrah @ 2000-01-16 16:26 UTC (permalink / raw)
To: pgsql-interfaces
info
^ permalink raw reply [nested|flat] 4+ messages in thread
* Info
@ 2003-06-13 18:23 rino.79 <rino.79@inwind.it>
2003-06-16 17:35 ` Re: Info Jan Wieck <JanWieck@Yahoo.com>
2003-06-16 17:57 ` Re: Info JL <JLT@WVInter.Net>
0 siblings, 2 replies; 4+ messages in thread
From: rino.79 @ 2003-06-13 18:23 UTC (permalink / raw)
To: pgsql-interfaces
Hi, I'm Rino.
My question is:
How I can connect postgres database whit tcl/tk interface?
Thanks !
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Info
2003-06-13 18:23 Info rino.79 <rino.79@inwind.it>
@ 2003-06-16 17:35 ` Jan Wieck <JanWieck@Yahoo.com>
1 sibling, 0 replies; 4+ messages in thread
From: Jan Wieck @ 2003-06-16 17:35 UTC (permalink / raw)
To: rino.79 <rino.79@inwind.it>; +Cc: pgsql-interfaces
rino.79 wrote:
> Hi, I'm Rino.
> My question is:
> How I can connect postgres database whit tcl/tk interface?
> Thanks !
I use to have a subdirectory ./pgtcl in the Tcl package area, containing
a symlink to the actual libpgtcl.so file in $PGLIB. In that directory I
run pkg_mkIndex and then I can simply put
package require Pgtcl
into the scripts to load the interface.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Info
2003-06-13 18:23 Info rino.79 <rino.79@inwind.it>
@ 2003-06-16 17:57 ` JL <JLT@WVInter.Net>
1 sibling, 0 replies; 4+ messages in thread
From: JL @ 2003-06-16 17:57 UTC (permalink / raw)
To: rino.79 <rino.79@inwind.it>; pgsql-interfaces
On Fri June 13 2003 14:23, rino.79 wrote:
> Hi, I'm Rino.
> My question is:
> How I can connect postgres database whit tcl/tk interface?
creates a new *.tcl file
__________________________
#!/usr/bin/tclsh
# Test of access to a database after install
# Table: customers
# One Field used in test: lname
#
# GRANT ALL customers TO user_whom_ever ;
#
# libarary for postgresQL 7.3.2
# /usr/lib/libpgtcl.so -> /usr/lib/pgtcl1.4/libpgtcl1.4.so
load /usr/lib/libpgtcl.so
set pgsetup "user=user_whom_ever dbname=mydatabase psic password='mypassword_if_any'"
# above used in the following way...
# pg_connect -conninfo "user=user_whom_ever dbname=mydatabase psic password='mypassword_if_any'"
set pgconn [pg_connect -conninfo $pgsetup]
puts "Connection string $pgsetup"
puts "__ Uppercase first character of customers last name ___\n"
pg_select $pgconn "Select DISTINCT substr(upper(lname),1,1) AS cid From customers LIMIT 18" arr {
puts [format "%s" $arr(cid) ]
}
pg_select $pgconn "SELECT count(*) AS cnt FROM customers" arr {
puts [format "First 18 DISTINCT 1st characters, from a total of: %s customers" $arr(cnt) ]
}
pg_disconnect $pgconn
Note: below, you may find a tar package with
more code and database for a in works project
for Linux
--
John Turner
http://Members.Ntelos.Net/~JLT
"Just because you do not know the answer,
does not mean that someone else does"
Sephen J. Gould {RIP}
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-06-16 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-01-16 16:26 info Andy Harrah <aharrah@springrock.com>
2003-06-13 18:23 Info rino.79 <rino.79@inwind.it>
2003-06-16 17:35 ` Re: Info Jan Wieck <JanWieck@Yahoo.com>
2003-06-16 17:57 ` Re: Info JL <JLT@WVInter.Net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox