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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
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:54:18
Message-ID: 24513.991842858@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane writes:
>> One way to do this that wouldn't involve breaking the protocol is
>> to assign significance to linebreaks in an 'E' message's payload.

> Some fields may contain line breaks; for example, error messages
> definitely do now.

Yes.  I believe most of them are set up to indent the continuation
lines, so there wouldn't be much of a problem interpreting the format.
In any case, we could say that only a line beginning with a known
keyword starts a new field.

> Okay, so PQerrorMessage will print the whole glob, whereas there would be
> an accessor method that would filter out the fields.  That would also work
> transparently with the notice processor, which I was concerned about until
> now.  I like it.

Works for me.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Martín MarquésDate: 2001-06-06 15:57:13
Subject: Re: [HACKERS] something smells bad
Previous:From: Peter EisentrautDate: 2001-06-06 15:47:25
Subject: Re: Can the backend return more than one error message per PQexec?

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