Thread: bytea HISTORY updates

bytea HISTORY updates

From
Joe Conway
Date:
Bruce,

Please update HISTORY entries for bytea changes.

Remove:

Bytea comparison improvements, \### now requires three octal digits

Add:

Bug Fixes
  bytea \### now requires valid three digit octal number

Types
  Bytea comparison improvements, now supports =, !=, >, >=, <, and <=
  Bytea now supports btree indexes
  Bytea now supports LIKE, LIKE...ESCAPE, NOT LIKE, NOT LIKE...ESCAPE
  Bytea now supports string concatenation
  New Bytea functions - position(), substring, trim, btrim, and length
  New encode() function mode, 'escaped', converts minimally escaped
     bytea to/from text

Enhancements
  New libpq function, PQescapeBytea escapes binary string suitably for
     use as a SQL string literal


Joe


Re: bytea HISTORY updates

From
Bruce Momjian
Date:
Done, but didn't we use to allow \0 for NULL, while we now require \000?

---------------------------------------------------------------------------

> Bruce,
>
> Please update HISTORY entries for bytea changes.
>
> Remove:
>
> Bytea comparison improvements, \### now requires three octal digits
>
> Add:
>
> Bug Fixes
>   bytea \### now requires valid three digit octal number
>
> Types
>   Bytea comparison improvements, now supports =, !=, >, >=, <, and <=
>   Bytea now supports btree indexes
>   Bytea now supports LIKE, LIKE...ESCAPE, NOT LIKE, NOT LIKE...ESCAPE
>   Bytea now supports string concatenation
>   New Bytea functions - position(), substring, trim, btrim, and length
>   New encode() function mode, 'escaped', converts minimally escaped
>      bytea to/from text
>
> Enhancements
>   New libpq function, PQescapeBytea escapes binary string suitably for
>      use as a SQL string literal
>
>
> Joe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: bytea HISTORY updates

From
Bruce Momjian
Date:
> Bruce Momjian wrote:
>
> > Done, but didn't we use to allow \0 for NULL, while we now require \000?
> >
> > ---------------------------------------------------------------------------
>
>
> Thanks!
>
> I thought I had the \0 to \000 change covered by:
>
>  >>Add:
>  >>
>  >>Bug Fixes
>  >>  bytea \### now requires valid three digit octal number

Oh, I read that as meaning it now requires _valid_ three digit octal
number.  It really means requires _valid_ _three_ digit octal number.
I get it.

>
> The issue before was that, not only was something like \0123 ambiguous
> (is this \0 followed by the literal 123, or \012 followed by the literal
> 3?), but also that something like \129 could be input. See:

Yes, that was the issue of requiring three digits.  I just read Perl
guesses based on the context.  Sorry, don't want to go there.  :-)

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: bytea HISTORY updates

From
Joe Conway
Date:
Bruce Momjian wrote:

> Done, but didn't we use to allow \0 for NULL, while we now require \000?
>
> ---------------------------------------------------------------------------


Thanks!

I thought I had the \0 to \000 change covered by:

 >>Add:
 >>
 >>Bug Fixes
 >>  bytea \### now requires valid three digit octal number

The issue before was that, not only was something like \0123 ambiguous
(is this \0 followed by the literal 123, or \012 followed by the literal
3?), but also that something like \129 could be input. See:

http://fts.postgresql.org/db/mw/msg.html?mid=1033902
and
http://fts.postgresql.org/db/mw/msg.html?mid=1033930

--Joe