Forum OpenACS Development: Getting PG driver ready for ACS 4.0
supporting openACS 4.0. What comes first to my mind is bind variable
support which should be done either on Tcl or driver level.
Where should it be put?
Next, PG7.1 can apparently handle unlimited chunks of text - can
current driver cope with that?
PG has been able to return large select results since PG 7.0. In other words, though tuple size has been limited to 16KB (in a typical OpenACS installation), you can do:
select foo.*, bar.*, fubar.* from foo, bar, fubar;
where each of foo, bar, fubar contain rows of 16KB (or 8KB or 32KB) in size. The tuple size limit only applies to tuples in tables, not to the result of a "select".
So in this area the driver should require no change.
set foo "some value" set selection [ns_pg_bind select $db "select bar from baz where foo = :foo"] - or - set bind_vars [ns_set create] ns_set put $bind_vars foo "some value" set selection [ns_pg_bind select $db -bind $bind_vars "select bar from baz where foo = :foo"]
Supported subcommands include select, dml, 1row, 0or1row, and exec.
The changes are checked into cvs.