Re: invalid input syntax for type tid: '(,)'

From: Jose' Cruanyes <cruanyes(at)cegroup(dot)it>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: invalid input syntax for type tid: '(,)'
Date: 2004-04-05 11:21:05
Message-ID: 53FA1120-86F3-11D8-A231-0003935B359C@cegroup.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-odbc pgsql-ports


On Apr 5, 2004, at 11:32 AM, Dave Page wrote:

> It's rumoured that Jose Cruanyes once said:
>>
>> I've found three, two on "convert.c" and one on "results.c"
>>
>> now if some one can put the changes upstream...
>>
>
> Can you post a patch?
>
--------------<cut>--------------8<----------------8<-------------
-8<------------------
diff -Naur psqlodbc-old/convert.c psqlodbc-new/convert.c
--- psqlodbc-old/convert.c Mon Oct 20 02:37:42 2003
+++ psqlodbc-new/convert.c Sun Apr 4 19:39:39 2004
@@ -2059,7 +2059,7 @@
* 1st query is for field information
* 2nd query is keyset gathering
*/
- CVT_APPEND_STR(qb, " where ctid =
'(,)';select ctid, oid from ");
+ CVT_APPEND_STR(qb, " where ctid =
'(0,0)';select ctid, oid from ");
CVT_APPEND_DATA(qb, qp->statement +
qp->from_pos + 5, npos - qp->from_pos - 5);
}
}
@@ -2102,7 +2102,7 @@
qb->load_stmt_len = qb->npos;
if (0 != (qb->flags & FLGB_KEYSET_DRIVEN))
{
- CVT_APPEND_STR(qb, "where ctid = '(,)';select
CTID, OID from ");
+ CVT_APPEND_STR(qb, "where ctid = '(0,0)';select
CTID, OID from ");
CVT_APPEND_DATA(qb, qp->statement +
qp->from_pos + 5, qp->where_pos - qp->from_pos - 5);
}
}
diff -Naur psqlodbc-old/results.c psqlodbc-new/results.c
--- psqlodbc-old/results.c Mon Oct 20 02:37:42 2003
+++ psqlodbc-new/results.c Sun Apr 4 20:33:47 2004
@@ -1827,7 +1827,7 @@
{
len += 50;
selstr = malloc(len);
- sprintf(selstr, "%s where ctid = currtid(0, '(,)') and
oid = %u", stmt->load_statement, oid);
+ sprintf(selstr, "%s where ctid = currtid(0, '(0,0)')
and oid = %u", stmt->load_statement, oid);
}
else
{
--------------<cut>--------------8<----------------8<-------------
-8<------------------

Pax et Bonum

# dott. Jose' Cruanyes Aguilar - C.E. Soft srl
# Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA
# 02,33603122 0372,460602

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Edoardo Ceccarelli 2004-04-05 12:55:12 blob without largeobject api
Previous Message Dave Page 2004-04-05 09:32:39 Re: invalid input syntax for type tid: '(,)'

Browse pgsql-odbc by date

  From Date Subject
Next Message Theodore Petrosky 2004-04-05 12:15:45 odbc and mac os x
Previous Message Dave Page 2004-04-05 09:32:39 Re: invalid input syntax for type tid: '(,)'

Browse pgsql-ports by date

  From Date Subject
Next Message Peter Eisentraut 2004-04-06 00:20:17 Re:
Previous Message Dave Page 2004-04-05 09:32:39 Re: invalid input syntax for type tid: '(,)'