Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 067359FB83A for ; Thu, 19 Apr 2007 16:26:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 47001-03 for ; Thu, 19 Apr 2007 16:25:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by postgresql.org (Postfix) with ESMTP id 7B3E99FB504 for ; Thu, 19 Apr 2007 16:25:59 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c24so645260ana for ; Thu, 19 Apr 2007 12:25:58 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Sg6wDCfu2fe0Hmsfe8wF19fixMRKatAuzEsYhncnGtoFrx+N3VRrz2+fVrkRjWYgd2W/QvDt99IKSGPLCqdFbZwUTayXIslzSG/OWB6CwpOzyPbHEr9BeO2QxZmtITW6g+uMaA6rujrgKpnIksgN9nBb1r5CiaMHvpFeR8kGves= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=eV4Eqz+FtoAkrH5MZ4MSHo1ptG8AsVwBWc5lUsbDxtBsmirMiz2TA4cxms6mAuP6fEv12GMgWfs4+gPf1kaHwJDQwVY2mb+0stztUI2ZrlpbrCS1Uzkwnfksq4sgfQT7j5clIkRfFNArWJUNV+fjFLgYKjQJy2oMsaF7FLus4hc= Received: by 10.100.139.9 with SMTP id m9mr1144842and.1177010758362; Thu, 19 Apr 2007 12:25:58 -0700 (PDT) Received: by 10.100.134.10 with HTTP; Thu, 19 Apr 2007 12:25:58 -0700 (PDT) Message-ID: Date: Thu, 19 Apr 2007 15:25:58 -0400 From: "Michael Dengler" To: "Jon Sime" Subject: Re: how to output column names Cc: pgsql-performance In-Reply-To: <4627ABB7.8060306@mediamatters.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_127834_20934615.1177010758251" References: <4627ABB7.8060306@mediamatters.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/349 X-Sequence-Number: 24226 ------=_Part_127834_20934615.1177010758251 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Perfect! thanks for the help!. Mike On 4/19/07, Jon Sime wrote: > > Michael Dengler wrote: > > Hi, > > > > Is there a query I can perform (perhaps on a system table) to return all > > of the column names (ONLY the column names) for a given DB? (I seem to > > remember doing this before but cant remember how) > > > > Thanks > > > > Mike > > > > The 'columns' view in information_schema should do the trick for you. > > -Jon > > -- > Senior Systems Developer > Media Matters for America > http://mediamatters.org/ > ------=_Part_127834_20934615.1177010758251 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Perfect! thanks for the help!.

Mike


On 4/19/07, Jon Sime <jsime@mediamatters.org> wrote:
Michael Dengler wrote:
> Hi,
>
> Is there a query I can perform (perhaps on a system table) to return all
> of the column names  (ONLY the column names) for a given DB? (I seem to
> remember doing this before but cant remember how)
>
> Thanks
>
> Mike
>

The 'columns' view in information_schema should do the trick for you.

-Jon

--
Senior Systems Developer
Media Matters for America
http://mediamatters.org/

------=_Part_127834_20934615.1177010758251--