Received: from nmr.varian.com (cobra.nmr.varian.com [132.190.40.5]) by hub.org (8.8.8/8.8.8) with ESMTP id NAA03305 for ; Tue, 29 Sep 1998 13:54:52 -0400 (EDT) (envelope-from glenn.sullivan@nmr.varian.com) Received: from vail.nmr.varian.com (vail [132.190.213.195]) by nmr.varian.com (8.9.1/8.9.1) with SMTP id KAA22329 for ; Tue, 29 Sep 1998 10:01:17 -0700 (PDT) Received: from nmr.varian.com by vail.nmr.varian.com (SMI-8.6/SMI-SVR4) id LAA18023; Tue, 29 Sep 1998 11:06:20 -0600 Sender: glenns@nmr.varian.com Message-ID: <3611135E.491D2598@nmr.varian.com> Date: Tue, 29 Sep 1998 11:05:34 -0600 From: Glenn Sullivan Organization: Chemagnetics/Varian NMR X-Mailer: Mozilla 4.06 [en] (X11; U; SunOS 5.6 sun4m) MIME-Version: 1.0 To: pgsql-sql@hub.org Subject: Getting datatype before SELECT References: <199809230300.XAA12144@hub.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit In my C code which communicates with the Postgres database, I have the need to determine the datatype of a column, before I have done a SELECT command. I have the name of the column, but I cannot seem to figure out how to get the datatype information until after I have done a SELECT. Then I can call PQfnumber() and PQftype() to get the type. Does anyone know how to do this? Thanks, Glenn