Skip site navigation (1) Skip section navigation (2)

Re: getting rid of CTIDs

From: Margus Va"li <m(dot)vali(at)aprote(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: getting rid of CTIDs
Date: 2002-05-14 14:07:44
Message-ID: 3CE11A30.8020100@aprote.com (view raw or flat)
Thread:
Lists: pgsql-odbc
Now I have a problem with 7.1.2, psqlodbc-07_02_0001
<http://odbc.postgresql.org/ftpsite/odbc/versions/msi/psqlodbc-07_02_0001.zip>,
server-side updateable
cursor, I'm updating a row, then trying to update it another time but
will get a locking error
since it doesn't seem to fetch the new CTID (fetched 0 rows)

conn=71988336, query='select * , CTID, OID from a'
[ fetched 4 rows ]
conn=71988336, query='update "a" set "nimi" = 'kuus-uus' where ctid =
'(0, 53)' and oid = 1104111'
conn=71988336, query='select * , CTID, OID from a where ctid =
currtid2('a', '(0, 53)') and oid = 1104111'
[ fetched 0 rows ]
conn=71988336, query='COMMIT'
conn=71988336, query='update "a" set "nimi" = 'kuus' where ctid = '(0,
53)' and oid = 1104111'
conn=71988336, query='COMMIT'
conn=71988336, PGAPI_Disconnect

This is from psql session after the odbc one:
mvali=> select *, ctid, oid from a;
a_id | b_b_id | nimi | ctid | oid
------+--------+----------+--------+---------
10 | 1 | kymme | (0,54) | 1104114
8 | 2 | kaheksa | (0,55) | 1104112
1 | 123 | a1 | (0,56) | 1104065
6 | 2 | kuus-uus | (0,57) | 1104111
(4 rows)

mvali=> select *, ctid, oid from a where ctid = currtid2('a', '(0,53)')
and oid=1104111;
a_id | b_b_id | nimi | ctid | oid
------+--------+----------+--------+---------
6 | 2 | kuus-uus | (0,57) | 1104111
(1 row)

thanks
mv


>I've posted pgsql-hackers a proposal that allows
>
>   CREATE VIEW .. AS SELECT CTID, ...
>which is currently rejected.
>Please wait for a while to see if I can do it.
>
>  
>




In response to

Responses

pgsql-odbc by date

Next:From: Tom LaneDate: 2002-05-14 14:38:50
Subject: Re: Trouble with Connection
Previous:From: Hiroshi InoueDate: 2002-05-14 06:37:26
Subject: Re: Trouble with Connection

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group