Fix for invalid input syntax for type tid: '(,)' - Jose' Cruanyes
authorDave Page <dpage@pgadmin.org>
Mon, 5 Apr 2004 13:07:08 +0000 (13:07 +0000)
committerDave Page <dpage@pgadmin.org>
Mon, 5 Apr 2004 13:07:08 +0000 (13:07 +0000)
convert.c
results.c

index da8818bb4bbd443df6aeffd7bd36f084a367299b..b8a0e5e7cf083ea006a92928e2b7393a9d3c5dd5 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -2115,7 +2115,7 @@ copy_statement_with_parameters(StatementClass *stmt, BOOL buildPrepareStatement)
                 * 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);
            }
        }
@@ -2158,7 +2158,7 @@ inner_process_tokens(QueryParse *qp, QueryBuild *qb)
        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);
        }
    }
index a79c097836aedcecf2e315f148f4a8094491a3f4..3b39472f688c3646ec11219e3a977bc4c13780c7 100644 (file)
--- a/results.c
+++ b/results.c
@@ -1848,7 +1848,7 @@ positioned_load(StatementClass *stmt, UInt4 flag, UInt4 oid, const char *tidval)
            sprintf(selstr, "%s where ctid = '%s' and oid = %u", stmt->load_statement, tidval, oid); 
    }
    else if ((flag & USE_INSERTED_TID) != 0)
-       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
        sprintf(selstr, "%s where oid = %u", stmt->load_statement, oid);