Re: Getting result set metadata without executing query?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting result set metadata without executing query?
Дата
Msg-id 17760.1026398265@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Getting result set metadata without executing query?  (Tom Ansley <tansley@law.du.edu>)
Список pgsql-novice
Tom Ansley <tansley@law.du.edu> writes:
> I have.....
> SELECT * FROM foo where true = false;
> Is this as good as the answer below or does it do an entire table scan?

Yeah, that will work (actually you could simplify it to "WHERE false").

However the "LIMIT 0" variant might be a little easier to attach to a
prespecified query, which might already have some WHERE clauses.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Ansley
Дата:
Сообщение: Re: Getting result set metadata without executing query?
Следующее
От: Masaru Sugawara
Дата:
Сообщение: Re: views and rules