Re: [COMMITTERS] pgsql: Close previously open holes for invalidly encoded data to enter

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Close previously open holes for invalidly encoded data to enter
Date: 2007-09-18 23:02:53
Message-ID: 11672.1190156573@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> Um ... so that means CONVERT(c USING y) now fails entirely? That might
>> be going a bit far. If we do want to get rid of that syntax then I'm
>> noting a lack of parser changes in this patch.

> No, that's still there. The only change there is that it returns a
> bytea. I forgot to put that in the commit notes. :-(

The SQL99 spec is pretty definite that it returns text. I think we have
a problem here.

<form-of-use conversion> ::=
CONVERT <left paren> <character value expression>
USING <form-of-use conversion name> <right paren>

a) <form-of-use conversion> shall be simply contained in a
<value expression> that is immediately contained in a
<derived column> that is immediately contained in a <select
sublist> or shall immediately contain either a <simply value
specification> that is a <host parameter name> or a <value
specification> that is a <host parameter specification>.

b) A <form-of-use conversion name> shall identify a form-of-use
conversion.

c) The declared type of the result is variable-length character
string with implementation-defined maximum length. The
character set of the result is the same as the character
repertoire of the <character value expression> and form-of-
use determined by the form-of-use conversion identified by
the <form-of-use conversion name>. Let CR be that character
repertoire. The result has the Implicit coercibility
characteristic and its collating sequence is the default
collating sequence of CR.

OTOH we may be talking at cross-purposes --- on looking into gram.y
I see that this syntax is transformed to a call of convert_using(),
which may mean it has nothing to do with your changes.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2007-09-18 23:08:55 Re: [COMMITTERS] pgsql: Close previously open holes for invalidly encoded data to enter
Previous Message Andrew Dunstan 2007-09-18 22:32:33 Re: [COMMITTERS] pgsql: Close previously open holes for invalidly encoded data to enter

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-09-18 23:08:55 Re: [COMMITTERS] pgsql: Close previously open holes for invalidly encoded data to enter
Previous Message Radoslaw Zielinski 2007-09-18 23:00:14 Re: pg_ctl -w vs unix_socket_directory