Re: [HACKERS] patches for items from TODO list

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Sergey Ten <sergey(at)sourcelabs(dot)com>, "'Christopher Kings-Lynne'" <chriskl(at)familyhealth(dot)com(dot)au>, jason(at)sourcelabs(dot)com, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] patches for items from TODO list
Date: 2005-05-28 19:04:46
Message-ID: 28122.1117307086@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Here is an updated version of the COPY \x patch. It is the first patch
> attached.
> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-05-28 20:40:38 Inefficiency in recent pgtz patch
Previous Message Bruce Momjian 2005-05-28 17:03:52 Re: [HACKERS] patches for items from TODO list

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-05-29 03:58:01 Escape handling in COPY, strings, psql
Previous Message Bruce Momjian 2005-05-28 17:03:52 Re: [HACKERS] patches for items from TODO list