Re: exception with a temporary table

From: "Pablo Araujo" <ferarap(at)gmail(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "Dave Cramer" <pg(at)fastcrypt(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: exception with a temporary table
Date: 2006-11-20 15:12:19
Message-ID: b8e724640611200712i3466d488kb8addeafa2d23713@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

well i got a trace of the SQL commands sent to the server:

2006-11-20 16:06:51 LOG: statement: PREPARE <unnamed> AS create local
temporary table HT_item (ID BIGINT not null) on commit drop
2006-11-20 16:06:51 LOG: PARSE MESSAGE STATISTICS
2006-11-20 16:06:51 LOG: statement: <BIND>
2006-11-20 16:06:51 LOG: statement: EXECUTE <unnamed> [PREPARE: create
local temporary table HT_item (ID BIGINT not null) on commit drop]
2006-11-20 16:06:51 LOG: QUERY STATISTICS
2006-11-20 16:06:51 LOG: statement: PREPARE <unnamed> AS insert into
HT_item select itemimpl0_.ID as ID from item itemimpl0_ where ID in ($1)
2006-11-20 16:06:51 ERROR: relation "ht_item" does not exist
2006-11-20 16:06:51 LOG: statement: PREPARE <unnamed> AS drop table HT_item
2006-11-20 16:06:51 LOG: PARSE MESSAGE STATISTICS
2006-11-20 16:06:51 LOG: statement: <BIND>
2006-11-20 16:06:51 LOG: statement: EXECUTE <unnamed> [PREPARE: drop
table HT_item]
2006-11-20 16:06:51 ERROR: table "ht_item" does not exist

I think that the problem is in "on commit drop", because i excecute this
statment in the query browse of pgAdmin III and happens the same, What I
must modify?

2006/11/20, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>:
>
> Pablo Araujo wrote:
> > ok, but this assumes that being created everything in the same session.
> >
> > that is to say, it creates it, it inserts data and it destroys it in the
> > same session.
>
> Can you get a trace of the SQL commands sent to the server? One way to
> get that is to set the log_statement configuration parameter in your
> postgresql.conf file to "all".
>
> That would help diagnosing the problem.
>
> --
> Heikki Linnakangas
> EnterpriseDB http://www.enterprisedb.com
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Heikki Linnakangas 2006-11-20 16:15:38 Re: exception with a temporary table
Previous Message Heikki Linnakangas 2006-11-20 12:30:50 Re: exception with a temporary table