pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Octavio Alvarez <alvarezp@alvarezp.ods.org>
To: pgsql-general@postgresql.org, "c k" <shreeseva.learning@gmail.com>
Subject: Re: getting list of columns from a query
Date: Sun, 22 Aug 2010 13:18:00 -0700
Message-ID: <op.vhuvz6hd4oyyg1@localhost.localdomain> (raw)
In-Reply-To: <AANLkTinV9TbfsaKa2cgVJdLBG500OaeyeoH=bKqOwA6f@mail.gmail.com>
References: <AANLkTinV9TbfsaKa2cgVJdLBG500OaeyeoH=bKqOwA6f@mail.gmail.com>

On Sun, 22 Aug 2010 10:27:52 -0700, c k <shreeseva.learning@gmail.com>  
wrote:

> Hi all,
> As I am using MS Access for a long time, many tools like ms access  
> provides
> a way to get the list of columns from a query. (using filed list in combo
> boxes in ms access). But is it possible to get such list of columns from  
> a
> query where it is not known to the user, that which columns are defined  
> in
> the base 'SELECT' statement? How? I dynamically created SQL statements  
> many
> times this situation occurs where the columns are not fixed and we have  
> to
> get the list of columns from such a query.
> Thanks in advance.

I am removing psql-admin from the Cc to avoid crossposting. Besides, I
am not sure if it is on-topic there or not.

Which version of PostgreSQL? Anyway, if you create the SELECT statement
dynamically you could know a priori what columns would result, AFAIU.

-- 
Octavio.



view thread (6+ messages)  latest in thread

Message-ID: <op.vhuvz6hd4oyyg1@localhost.localdomain>
Permalink:  ../op.vhuvz6hd4oyyg1@localhost.localdomain/
Also on:    postgresql.org/message-id/op.vhuvz6hd4oyyg1@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alvarezp@alvarezp.ods.org, shreeseva.learning@gmail.com
  Subject: Re: getting list of columns from a query
  In-Reply-To: <op.vhuvz6hd4oyyg1@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox