Re: bytea datatype documentation patch - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: bytea datatype documentation patch
Date
Msg-id Pine.LNX.4.30.0111201526530.613-100000@peter.localdomain
Whole thread Raw
In response to bytea datatype documentation patch  (Joe Conway <joseph.conway@home.com>)
List pgsql-patches
Joe Conway writes:

> Here's a second bytea documentation patch. This one significantly
> expands the "Binary Data" section added by Bruce recently.

This is good material, just a couple of comments.

I feel that basing the whole discussion on what "ASCII" characters can be
stored, are nonprintable, must be escaped, etc. is not appropriate.
Bytea doesn't store characters, it stores bytes (or octets, as you wish).
The correspondence between bytes and characters is old-fashioned and
pretty much does not exist in SQL except for a few places such as
OCTET_LENGTH.

Conversely, the discussion about whether text should be able to cope with
zero bytes is nonsensical because text stores characters and not bytes.

So I would base this discussion on the premise "bytea stores binary data"
(insert examples).

Some stylistic issues:

bytea => <type>bytea</type>

NULLs => zero bytes/bytes of value zero ("NULL" is too overloaded)

'non-printable' => <quote>nonprintable</quote>

MUST => <emphasis>must</emphasis>

--
Peter Eisentraut   peter_e@gmx.net


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pgcrypto: include sys/types.h in crypt-des.c
Next
From: Peter Eisentraut
Date:
Subject: Re: Version checking when loading psql