Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA64990 for ; Sun, 12 Sep 1999 23:28:22 -0400 (EDT) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1]) by localhost (8.8.7/8.8.7) with ESMTP id DAA20147; Mon, 13 Sep 1999 03:27:33 GMT Sender: lockhart@hub.org Message-ID: <37DC6F24.D50422A9@alumni.caltech.edu> Date: Mon, 13 Sep 1999 03:27:32 +0000 From: Thomas Lockhart X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en MIME-Version: 1.0 To: rodneyr@embratel.com.br CC: pgsql-interfaces@hub.org Subject: Re: [INTERFACES] Embedded SQL in C References: <032567E9.007591D0.00@ntrjo008.nt.embratel.com.br> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > What is the best way to work with embedded SQL in C for PostgreSQL? > I've tried the "ecpg" but I wasn't able to develop a simple program with the > documentation in the "PostgreSQL Programmer's Guide". Where can I find a better > documentation for beginners and, what is more important, examples? As for most of our work, the documentation lags the implementation. afaik there is no other specific documentation for ecpg. I would suggest two paths to take: 1) Get a generic book on SQL which covers embedded C. ecpg tries to follow published standards and common conventions. 2) Look at embedded code examples in the Postgres source tree. There are several in src/interfaces/ecpg/test/ And, when you understand how to do it, consider writing a "HowTo" doc! I'd be very happy to include it in the Programmer's Guide, and will help to edit and format it. The content (or lack thereof, as you have discovered) is the most important thing. Good luck. - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California