Re: LISTEN/NOTIFY versus encoding conversion

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: LISTEN/NOTIFY versus encoding conversion
Date: 2010-02-15 18:44:25
Message-ID: 1266259465.29919.6929.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 2010-02-14 at 15:15 -0500, Tom Lane wrote:
> Most obviously, we could also get an encoding
> conversion failure on the notify condition name --- but we've never
> enforced a character set restriction on that, and nobody's ever
> complained about it AFAIR.

If the client successfully executed the LISTEN, then it could convert
all of the characters in one direction. I suppose some incomplete
conversion routine might not be able to convert the same characters in
the other direction -- is that what you're referring to?

The case of a condition name conversion error seems less problematic to
me anyway, because it would happen every time; so there's no danger of
making it through testing and then failing in production.

> I'm now thinking that we should just drop that restriction.

Ok. I'd feel a little better if I understood what would actually happen
in the case of an error with NOTIFY. When does the client receive the
error? Might the client code confuse it with an error for something
synchronous, like a command execution?

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-02-15 18:53:21 Re: LISTEN/NOTIFY versus encoding conversion
Previous Message Greg Stark 2010-02-15 18:29:59 Re: Explain buffers display units.