BUG #3227: ODBC driver with subqueries destroy transaction context - Mailing list pgsql-bugs

From sean song
Subject BUG #3227: ODBC driver with subqueries destroy transaction context
Date
Msg-id 200704131449.l3DEnJ2Z044381@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3227
Logged by:          sean song
Email address:      seanpssong@yahoo.com
PostgreSQL version: 8.2.3
Operating system:   Windows XP sp2 (happen on all versions of Windows OS)
Description:        ODBC driver with subqueries destroy transaction context
Details:

1. begin;  (start transaction)

2. insert into table1(...) values(...)

   (first column in table1 is a sequence: id1)
   (this step is done through a recordset)

3. select table1.*, sub.col1 from table1
left join
(select col1 from table2) as sub

4. insert into table3(col0, id1, ...) ...
   (this step is done as an query string)

here id1 is foreign key reference to table1. it is new sequence value just
created in sequence step 2.

I am using OLEDB on top of ODBC, but I don't think it matters.

Problem happen on step 4. saying value of id1 do not exist. But if I am not
using subquery in step 2. Everything is fine. The problem is in ODBC as it
runs on pgAdmin.

pgsql-bugs by date:

Previous
From: "sean song"
Date:
Subject: BUG #3226: ODBC driver 8.02.02 parses subqueries incorrectly
Next
From: "Gabriele Bartolini"
Date:
Subject: R: BUG #3224: Dump: missing schema name for sequence in a "DEFAULT nextval" specification