From aharrah@springrock.com Sun Jan 16 16:27:26 2000 Received: from lake.springrock.com (cj46448-a.reston1.va.home.com [24.15.185.40]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA75335 for ; Sun, 16 Jan 2000 11:27:26 -0500 (EST) (envelope-from aharrah@springrock.com) Received: from abh.springrock.com ([192.168.1.177]) by lake.springrock.com (8.9.3/8.9.3) with SMTP id LAA06387 for ; Sun, 16 Jan 2000 11:26:32 -0500 Message-ID: <000301bf603e$7628fde0$b101a8c0@abh.springrock.com> From: "Andy Harrah" To: Subject: info Date: Sun, 16 Jan 2000 11:26:36 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 info From rino.79@inwind.it Fri Jun 13 18:17:58 2003 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id E120530DE1E for ; Fri, 13 Jun 2003 18:17:58 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 73665-09 for ; Fri, 13 Jun 2003 15:17:48 -0300 (ADT) Received: from smtp2.libero.it (smtp2.libero.it [193.70.192.52]) by svr1.postgresql.org (Postfix) with ESMTP id 63C1330DD76 for ; Fri, 13 Jun 2003 15:17:48 -0300 (ADT) Received: from rino (62.98.244.13) by smtp2.libero.it (7.0.012) id 3E9BEBC30149128A for pgsql-interfaces@postgresql.org; Fri, 13 Jun 2003 20:17:48 +0200 Message-ID: <000a01c331d8$edd28680$0df4623e@79> From: "rino.79" To: Subject: Info Date: Fri, 13 Jun 2003 20:23:45 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C331E9.B0798200" X-Priority: 1 X-MSMail-Priority: High X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Spam-Status: No, hits=3.9 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS, HTML_60_70, RCVD_IN_NJABL, X_MSMAIL_PRIORITY_HIGH, X_PRIORITY_HIGH X-Spam-Level: **** X-Archive-Number: 200306/48 X-Sequence-Number: 4259 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C331E9.B0798200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm Rino. My question is: How I can connect postgres database whit tcl/tk interface? Thanks ! ------=_NextPart_000_0007_01C331E9.B0798200 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi, I'm Rino.
My question is:
How I can connect postgres database whit t= cl/tk=20 interface?
Thanks !
<= /HTML> ------=_NextPart_000_0007_01C331E9.B0798200-- From JanWieck@Yahoo.com Mon Jun 16 17:36:40 2003 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 7722D30EC9E for ; Mon, 16 Jun 2003 17:36:40 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 22960-05 for ; Mon, 16 Jun 2003 14:36:30 -0300 (ADT) Received: from europa.janwieck.net (h00045a2e4e7c.ne.client2.attbi.com [24.131.181.55]) by svr1.postgresql.org (Postfix) with ESMTP id 5206F30EF60 for ; Mon, 16 Jun 2003 14:36:29 -0300 (ADT) Received: from Yahoo.com (linksys.janwieck.net [192.168.192.1]) (authenticated) by europa.janwieck.net (8.11.6/8.11.6) with ESMTP id h5GHaRc16884; Mon, 16 Jun 2003 13:36:27 -0400 Message-ID: <3EEDFFCC.8050204@Yahoo.com> Date: Mon, 16 Jun 2003 13:35:08 -0400 From: Jan Wieck Organization: Unorganized User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "rino.79" Cc: pgsql-interfaces@postgresql.org Subject: Re: Info References: <000a01c331d8$edd28680$0df4623e@79> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200306/51 X-Sequence-Number: 4262 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 # From JLT@WVInter.Net Mon Jun 16 17:58:38 2003 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id DE7AF30ED84 for ; Mon, 16 Jun 2003 17:58:38 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 16368-10 for ; Mon, 16 Jun 2003 14:58:28 -0300 (ADT) Received: from mailrtr04.ntelos.net (mailrtr04.ntelos.net [216.12.0.104]) by svr1.postgresql.org (Postfix) with ESMTP id 1CFB730E358 for ; Mon, 16 Jun 2003 14:58:28 -0300 (ADT) Received: from wsogmm2.com (chas-108-70.access.ntelos.net [216.12.108.70]) by mailrtr04.ntelos.net (8.12.9/8.12.9) with ESMTP id h5GHwOP2011026; Mon, 16 Jun 2003 13:58:25 -0400 From: JL Organization: JCI To: "rino.79" , Subject: Re: Info Date: Mon, 16 Jun 2003 13:57:20 -0400 User-Agent: KMail/1.5.1 References: <000a01c331d8$edd28680$0df4623e@79> In-Reply-To: <000a01c331d8$edd28680$0df4623e@79> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306161357.20600.JLT@WVInter.Net> X-Archive-Number: 200306/52 X-Sequence-Number: 4263 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}