From: Constantin Teodorescu <teo@flex.ro>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgreSQL.org>
Cc: pgsql-hackers@postgreSQL.org <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] libpgtcl and array fields return format - PROPOSAL
Date: Wed, 11 Aug 1999 13:06:29 +0000
Message-ID: <37B17555.8FEDF23D@flex.ro> (raw)
References: <37B1178F.1BDFB003@flex.ro>
<37B16B29.D12E32A7@alumni.caltech.edu>
<37B16D68.11B91C64@flex.ro>
<37B16D5A.999F0A43@alumni.caltech.edu>
Thomas Lockhart wrote:
>
> > > > I think it would be better to return the string as:
> > > > "red" "blue" "green"
> > > > and tcl users could directly process the array as an ordinary tcl list.
>
> Would it be also possible to use simple lists for arrays on *input* as
> well as output? The implementation would be symmetric and (presumably)
> easier to use...
I am note sure that I am understanding the problem.
There is no *input* format in Tcl.
The only way for adding data to a table is:
pg_exec $dbc "insert into ....." and that's the PostgreSQL syntax.
There's no "living" snapshots in Tcl as in JDBC 2 (updatable
recordsets).
For the moment, the current syntax helps PgAccess. It returns exactly
the same format as it would be used to INSERT INTO queries so if you
would try to define a table with an array field of strings for example
you are able to add records and update them directly from PgAccess.
From that point of view, the new array field return format would give me
headaches for Pgaccess in order to restore the {"..","..",".."} format
used for updating records.
Am I missing something about the *input* format?
On the other hand, I have discovered in the libpgtcl source that there
is a TCL_ARRAYS that if defined, would return array fields format
exactly as a tcl list. But it is not defined anywhere. I think that the
behaviour of libpgtcl should be consistent so should we define
TCL_ARRAYS by default in the next release?
--
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: teo@flex.ro, lockhart@alumni.caltech.edu, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] libpgtcl and array fields return format - PROPOSAL
In-Reply-To: <37B17555.8FEDF23D@flex.ro>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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