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

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

From
"Dave Page"
Date:
Thanks Jose, patch applied.

Regards, Dave.

> -----Original Message-----
> From: Jose' Cruanyes [mailto:cruanyes@cegroup.it]
> Sent: 05 April 2004 12:21
> To: Dave Page
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] invalid input syntax for type tid: '(,)'
>
>
> 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
>
>