Re: libpq Describe Extension [WAS: Bytea and perl]

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: libpq Describe Extension [WAS: Bytea and perl]
Date: 2006-06-16 20:00:58
Message-ID: 200606162000.k5GK0wO27800@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice

Volkan YAZICI wrote:
> To mention about the followed implementation, it needed some hack on
> pqParseInput3() code to make it understand if a received message is
> a reponse to a Describe ('D') query or to another tuple returning
> query. To summarize problem, there're two possible forms of a 'D'
> response:
>
> 1. Description of a prepared statement: t, T, Z
> 2. Description of a portal: T, Z
>
> The problem is, AFAICS, it's not possible to distinguish between a tuple
> returning query (T, ..., C, Z or T, E) and a description of a portal (T,
> Z). Therefore, I've created a global flag (parsing_row_desc) which is
> turned on when we receive a 'T' and turned off if we receive a 'C' or
> 'E'. It's a kind of ugly method but the only solution I could come up
> with.

The problem with this solution is that it is not thread-safe. Perhaps
you can use a per-PGconn boolean?

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-16 20:06:46 Re: [COMMITTERS] pgsql: Add STRICT to PL/pgSQL SELECT INTO, so exceptions are thrown if
Previous Message Bruce Momjian 2006-06-16 19:57:58 Re: A real currency type

Browse pgsql-novice by date

  From Date Subject
Next Message Frances Collier 2006-06-16 20:03:51 Re: windows update screwed up PostgreSQL -- Problem solved
Previous Message Charlie 2006-06-16 19:10:44 cannot access directory /pg_tblspc/*