Re: dblink bug fix - please apply prior to wrapping up beta

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: dblink bug fix - please apply prior to wrapping up beta
Date: 2002-09-03 03:48:41
Message-ID: 200209030348.g833mff22416@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://207.106.42.251/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Joe Conway wrote:
> This fixes dblink for breakage related to the last minute
> CreateTemplateTupleDesc changes (elimination of WITHOUTOID in favor of
> true/false).
>
> Please apply.
>
> Thanks,
>
> Joe

> Index: contrib/dblink/dblink.c
> ===================================================================
> RCS file: /opt/src/cvs/pgsql-server/contrib/dblink/dblink.c,v
> retrieving revision 1.10
> diff -c -r1.10 dblink.c
> *** contrib/dblink/dblink.c 2 Sep 2002 06:13:31 -0000 1.10
> --- contrib/dblink/dblink.c 3 Sep 2002 03:05:12 -0000
> ***************
> *** 463,469 ****
> is_sql_cmd = true;
>
> /* need a tuple descriptor representing one TEXT column */
> ! tupdesc = CreateTemplateTupleDesc(1, WITHOUTOID);
> TupleDescInitEntry(tupdesc, (AttrNumber) 1, "status",
> TEXTOID, -1, 0, false);
>
> --- 463,469 ----
> is_sql_cmd = true;
>
> /* need a tuple descriptor representing one TEXT column */
> ! tupdesc = CreateTemplateTupleDesc(1, false);
> TupleDescInitEntry(tupdesc, (AttrNumber) 1, "status",
> TEXTOID, -1, 0, false);
>
> ***************
> *** 628,634 ****
> if (PQresultStatus(res) == PGRES_COMMAND_OK)
> {
> /* need a tuple descriptor representing one TEXT column */
> ! tupdesc = CreateTemplateTupleDesc(1, WITHOUTOID);
> TupleDescInitEntry(tupdesc, (AttrNumber) 1, "status",
> TEXTOID, -1, 0, false);
>
> --- 628,634 ----
> if (PQresultStatus(res) == PGRES_COMMAND_OK)
> {
> /* need a tuple descriptor representing one TEXT column */
> ! tupdesc = CreateTemplateTupleDesc(1, false);
> TupleDescInitEntry(tupdesc, (AttrNumber) 1, "status",
> TEXTOID, -1, 0, false);
>
> ***************
> *** 883,889 ****
> elog(ERROR, "dblink_get_pkey: relation does not exist");
>
> /* need a tuple descriptor representing one INT and one TEXT column */
> ! tupdesc = CreateTemplateTupleDesc(2, WITHOUTOID);
> TupleDescInitEntry(tupdesc, (AttrNumber) 1, "position",
> INT4OID, -1, 0, false);
> TupleDescInitEntry(tupdesc, (AttrNumber) 2, "colname",
> --- 883,889 ----
> elog(ERROR, "dblink_get_pkey: relation does not exist");
>
> /* need a tuple descriptor representing one INT and one TEXT column */
> ! tupdesc = CreateTemplateTupleDesc(2, false);
> TupleDescInitEntry(tupdesc, (AttrNumber) 1, "position",
> INT4OID, -1, 0, false);
> TupleDescInitEntry(tupdesc, (AttrNumber) 2, "colname",
> ***************
> *** 1936,1942 ****
> if (natts < 1)
> elog(ERROR, "cannot create a description for empty results");
>
> ! desc = CreateTemplateTupleDesc(natts, WITHOUTOID);
>
> attnum = 0;
>
> --- 1936,1942 ----
> if (natts < 1)
> elog(ERROR, "cannot create a description for empty results");
>
> ! desc = CreateTemplateTupleDesc(natts, false);
>
> attnum = 0;
>

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Serguei Mokhov 2002-09-03 04:01:36 Re: fix for palloc() of user-supplied length
Previous Message Joe Conway 2002-09-03 03:41:26 dblink bug fix - please apply prior to wrapping up beta tarball