Re: Problem in 'select' from temp table with Perl/DBI

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem in 'select' from temp table with Perl/DBI
Дата
Msg-id 18414.1007046171@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem in 'select' from temp table with Perl/DBI  (samik@cae.wisc.edu (Samik Raychaudhuri))
Список pgsql-general
samik@cae.wisc.edu (Samik Raychaudhuri) writes:
> $query="select date_part('month', date) as month, date_part('year',
> date) as year into temp counter from weblogs;
>         select month || '-' || year, count(*) from counter group by
> month, year;
>         ";

> When I run this code, I get the following error message:
> DBD::Pg::st execute failed: ERROR:  Relation 'counter' does not exist
> at counter.pl line 56.

You didn't say what postgres version you are using, but on older
versions I think it'd be necessary to issue those commands as two
separate statements.  PG used to try to parse all the commands in
a querystring before executing any of them.

            regards, tom lane

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

Предыдущее
От: Sanjay Bhatia
Дата:
Сообщение: DEBUG messages
Следующее
От: qradius@qnet.com.pe
Дата:
Сообщение: time calculation