Received: from pc63.meskes.de (root@as14-039.rp-plus.de [149.221.92.39]) by hub.org (8.9.2/8.9.1) with ESMTP id NAA34417 for ; Sat, 20 Feb 1999 13:12:33 -0500 (EST) (envelope-from Michael.Meskes@gmx.net) Received: (from meskes@localhost) by pc63.meskes.de (8.9.3/8.9.3/Debian/GNU) id TAA00956 for pgsql-interfaces@postgresql.org; Sat, 20 Feb 1999 19:07:34 +0100 Date: Sat, 20 Feb 1999 19:07:34 +0100 From: Michael Meskes To: PostgreSQL Interfaces Subject: ecpg idea Message-ID: <19990220190734.A896@gmx.net> Mail-Followup-To: PostgreSQL Interfaces Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i James just asked me about a new feature in ecpg that I certainly not heard about yet. However, I think it is a good idea. Let's say we have the following statement: exec sql select name into :stringvar from address; Then stringvar has to be a variable with enough room to store the string. In contrast to Oracle we allow stringvar to be either an array of char or a pointer (and the varchar alternatives). However, if you provide a char * you have to make sure it has memory allocated yourself. James now asked me to to the correct malloc() inside libecpg if that poointer is NULL. I never heard about a feature like this on other DBMS but I like the idea. It should be pretty easy to implement too. Unless it is strictly against standard I would like to implement it. Comments anyone? Michael -- Michael Meskes | Go SF 49ers! Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire! Tel.: (+49) 2431/72651 | Use Debian GNU/Linux! Email: Michael.Meskes@gmx.net | Use PostgreSQL!