Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (8.11.3/8.11.1) with SMTP id f2M1eMt54732 for ; Wed, 21 Mar 2001 20:40:22 -0500 (EST) (envelope-from Inoue@tpf.co.jp) Received: (qmail 4760 invoked from network); 22 Mar 2001 01:40:17 -0000 Received: from unknown (HELO viscomail.tpf.co.jp) (100.0.0.108) by sd2.10.0.100.in-addr.arpa with SMTP; 22 Mar 2001 01:40:17 -0000 Received: from tpf.co.jp (3d_note1 [126.0.1.61]) by viscomail.tpf.co.jp (8.8.8+Sun/8.8.8) with ESMTP id KAA28128; Thu, 22 Mar 2001 10:40:15 +0900 (JST) Message-ID: <3AB95868.AD204C08@tpf.co.jp> Date: Thu, 22 Mar 2001 10:42:00 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: Ligia Pimentel CC: pgsql-sql@postgresql.org Subject: Re: Error when selecting rows from a temporary table in ODBC References: <99ao69$25ul$1@news.tht.net> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/431 X-Sequence-Number: 2099 Ligia Pimentel wrote: > > When we execute this query in psql over linux, we don't get any errors > > select sum(valor) as totalCR, count(correlativo) as docsCR, caja into tmp_cr > from transaccion as t, codigocaja as c > where c.codigo = t. codigo > and c.tipomov = 'CR' > group by caja; > > select sum(valor) as totalDB, count(correlativo) as docsDB, caja into tmp_db > from transaccion t, codigocaja c > where c.codigo = t. codigo > and c.tipomov = 'DB' > group by caja; > > select db.caja, totalcr, totaldb, docsdb, docscr > from tmp_db db, tmp_cr cr > where cr.caja = db.caja; > > But when we execute it on PGAdmin (Windows via ODBC) we get the following > error message: ERROR from backend during clear: 'ERROR: relation_info: > Relation 2300301 not found > > Following is the message in psqlodbc.log, > > conn=57295424, query='drop table tmp_cr; drop table tmp_db; select > sum(valor) as totalCR, count(correlativo) as docsCR, caja into tmp_cr from > transaccion as t, codigocaja as c where c.codigo = t. codigo and c.tipomov = > 'CR' group by caja; select sum(valor) as totalDB, count(correlativo) as > docsDB, caja into tmp_db from transaccion t, codigocaja c where c.codigo = > t. codigo and c.tipomov = 'DB' group by caja; select db.caja, totalcr, > totaldb, docsdb, docscr from tmp_db db, tmp_cr cr where cr.caja = db.caja; ' Seems a chained query is issued. Queries in a chained query are parse and analyzed all together before the chained query's execution. Therefore SELECT couldn't see tables which didn't exist before the execution. regards, Hiroshi Inoue