Skip site navigation (1) Skip section navigation (2)

Re: Can the backend return more than one error message per PQexec?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Can the backend return more than one error message per PQexec?
Date: 2001-06-06 15:00:54
Message-ID: Pine.LNX.4.30.0106061649160.757-100000@peter.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane writes:

> Since there will always be asynchronous conditions to deal with, it'd
> be pretty foolish to design a protocol that assumes that exactly one
> 'E' message will arrive during a PQexec cycle.


> > I am currently looking into extending the protocol so that more fields can
> > be in an ErrorResponse (e.g., error codes).  If this were to happen then
> > we'd need a smarter way of handling more than one error message per cycle.
> Only if you want to overload ErrorResponse so that successive 'E'
> messages mean different things.  I do not think that would be a good
> design.  It'd be better to allow ErrorResponse to carry multiple fields.

That's the idea.  But I can hardly concatenate the error codes, can I?  I
looks as though we need an API where all the messages (errors + notices)
from each query cycle are collected and can be cycled through after

> This'd imply a protocol version bump, but so what?  Changing the
> semantics of ErrorResponse probably ought to require that anyway.

I think I could have done with a minor bump, but if you have some plans,
too, the easier.

Peter Eisentraut   peter_e(at)gmx(dot)net

In response to


pgsql-hackers by date

Next:From: Jan WieckDate: 2001-06-06 15:06:39
Subject: Re: Re: REPLACE INTO table a la mySQL
Previous:From: Jan WieckDate: 2001-06-06 15:00:11
Subject: Re: REPLACE INTO table a la mySQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group