psql: SELECT INTO with FETCH_COUNT enabled

Поиск
Список
Период
Сортировка
От Josh Williams
Тема psql: SELECT INTO with FETCH_COUNT enabled
Дата
Msg-id 1274761885.4261.233.camel@minidragon
обсуждение исходный текст
Ответы Re: psql: SELECT INTO with FETCH_COUNT enabled  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
While tinkering with some psql settings on 9.0beta1...

[local]:5432|postgres=# \set FETCH_COUNT 1
[local]:5432|postgres=# SELECT foo INTO bar FROM baz;
ERROR:  DECLARE CURSOR cannot specify INTO
LINE 2: SELECT foo INTO bar FROM baz;
                        ^
[local]:5432|postgres=#!

If I'm reading it right its using src/bin/psql/common.c's
is_select_command() to determine if the query is cursor-able, and that
function is just looking to see that the query starts with 'select' (or
'values'.)

I'm not sure catching a non-alias use of INTO will be all that easy here
without adding undue complexity.  So considering no one else has
reported it at least than I've been able to find, +1 for leaving it as
is.  Just thought I'd post it in case anyone has any better ideas for
tackling it.

- Josh

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

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: xml data type implications of no =
Следующее
От: "Christopher Hotchkiss"
Дата:
Сообщение: BUG #5471: Postgres License Url is Misspelled