Re: Getting result set metadata without executing query?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marc Ramirez <mrami(at)mrami(dot)homeunix(dot)org>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Getting result set metadata without executing query?
Date: 2002-07-10 13:45:27
Message-ID: 16686.1026308727@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Marc Ramirez <mrami(at)mrami(dot)homeunix(dot)org> writes:
> Is this possible with PostgreSQL?

SELECT * FROM foo LIMIT 0

works in recent releases, though I think not before 7.1 or so.

You'd want to avoid anything that involves a SORT step, though,
since it's not truly "not executing the query", just abandoning
it as soon as the first output row has been generated internally.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Pam Wampler 2002-07-10 13:55:22 Re: oid2name
Previous Message Mourad EL HADJ MIMOUNE 2002-07-10 13:28:54 Shared table across all databases