X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B945DD1B1D3 for ; Sun, 16 May 2004 22:35:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 98184-06 for ; Sun, 16 May 2004 22:35:36 -0300 (ADT) Received: from ms-smtp-02.tampabay.rr.com (ms-smtp-02-smtplb.tampabay.rr.com [65.32.5.132]) by svr1.postgresql.org (Postfix) with ESMTP id 9697ED1B261 for ; Sun, 16 May 2004 22:35:31 -0300 (ADT) Received: from joiner (155.14.33.65.cfl.rr.com [65.33.14.155]) by ms-smtp-02.tampabay.rr.com (8.12.10/8.12.7) with ESMTP id i4H1ZW82015521; Sun, 16 May 2004 21:35:32 -0400 (EDT) Subject: Re: table column information From: "Scot L. Harris" To: ljb Cc: pgsql-php@postgresql.org In-Reply-To: References: <1084749506.2056.148.camel@lathe> Content-Type: text/plain Message-Id: <1084757732.17065.150.camel@lathe> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sun, 16 May 2004 21:35:32 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200405/27 X-Sequence-Number: 2746 On Sun, 2004-05-16 at 20:19, ljb wrote: > You almost got it - just do "select * from tablename where 0=1", which returns > no rows but will give you the fieldnames. A portable and (I think) > efficient way to get table column names. Thanks. That should do it. I was not able to get to the list archives earlier. -- Scot L. Harris