pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Ligia Pimentel <lmpimentel@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Error when selecting rows from a temporary table in ODBC
Date: Thu, 22 Mar 2001 10:42:00 +0900
Message-ID: <3AB95868.AD204C08@tpf.co.jp> (raw)
References: <99ao69$25ul$1@news.tht.net>

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



view thread (3+ messages)  latest in thread

Message-ID: <3AB95868.AD204C08@tpf.co.jp>
Permalink:  ../3AB95868.AD204C08@tpf.co.jp/
Also on:    postgresql.org/message-id/3AB95868.AD204C08@tpf.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: Inoue@tpf.co.jp, lmpimentel@yahoo.com
  Subject: Re: Error when selecting rows from a temporary table in ODBC
  In-Reply-To: <3AB95868.AD204C08@tpf.co.jp>
  References: <99ao69$25ul$1@news.tht.net> <3AB95868.AD204C08@tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox