Re: quoting psql varible as identifier - Mailing list pgsql-hackers

From Robert Haas
Subject Re: quoting psql varible as identifier
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: quoting psql varible as identifier  (Pavel Stehule <[email protected]>)
Responses Re: quoting psql varible as identifier
List pgsql-hackers
On Tue, Dec 29, 2009 at 3:19 PM, Pavel Stehule <[email protected]> wrote:
> here is patch

The error handling in quote_literal() doesn't look right to me.  The
documentation for PQescapeStringConn says that it stores an error
message in the conn object, but your code ignores that and prints out
a generic message instead.  That doesn't seem right: but then it
further goes on to call exit(1), which seems like a considerable
overreaction to an encoding violation, which is apparently the only
class of error PQescapeStringConn() is documented to throw.

...Robert


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_read_file() and non-ascii input file
Next
From: Chris Browne
Date:
Subject: Re: Thoughts on statistics for continuously advancing columns