Bruce Momjian <email@example.com> writes:
> Here is an updated version of the COPY \x patch. It is the first patch
> Also, I realized that if we support \x in COPY, we should also support
> \x in strings to the backend. This is the second patch.
Do we really want to do any of these things? We've been getting beaten
up recently about the fact that we have non-SQL-spec string escapes
(ie, all the backslash stuff) so I'm a bit dubious about adding more,
especially when there's little if any demand for it.
I don't object too much to the COPY addition, since that's outside any
spec anyway, but I do think we ought to think twice about adding this
to SQL literal handling.
> Third, I found out that psql has some unusual handling of escaped
> numbers. Instead of using \ddd as octal, it has \ddd is decimal, \0ddd
> is octal, and \0xddd is decimal. It is basically following the strtol()
> rules for an escaped value. This seems confusing and contradicts how
> the rest of our system works.
I agree, that's just going to confuse people.
> ! xqescape [\\][^0-7x]
If you are going to insist on this, at least make it case-insensitive.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly