Re: [HACKERS] libpq and SPI

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Clark Evans <clark(dot)evans(at)manhattanproject(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] libpq and SPI
Date: 1999-03-14 18:20:59
Message-ID: 29785.921435659@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> What is the problem? I'll research a SPI patch.

Check the hackers thread (last month I think) titled "libpq and SPI";
the problem occurs when one submits a utility statement rather than
a plannable query via SPI. Apparently what is happening is that the
backend emits a 'T' message before it invokes the called statement
and then emits a 'D' message afterwards --- so if the called statement
causes a 'C' message to come out, libpq gets unhappy. This seems
to be clearly a violation of the FE/BE protocol to me, so I don't think
it's libpq's fault.

Reasonable fixes might be to postpone the sending of 'T' till after
the invoked statement is executed, or to modify the traffic cop so
that a utility statement invoked from SPI doesn't send 'C'.

I know a little bit about the parts of the backend that communicate with
the frontend, but nothing about SPI, so I'm not well prepared to solve
the problem by myself.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-03-14 18:49:00 Re: [HACKERS] libpq and SPI
Previous Message Bruce Momjian 1999-03-14 18:10:32 Re: [HACKERS] libpq and SPI