bytea - own defined type - Mailing list pgsql-general

From Gyorgy Molnar
Subject bytea - own defined type
Date
Msg-id 004201c289ff$7356cf50$6e01a8c0@dell8100
Whole thread Raw
In response to Re: firstest doubts...  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Hi,
 
I'd like the ask the following questions:
 
  1. What is the reason to use the encode/decode rules shown in table 3-7 (PG docs) for the "bytea" datatype. I think the "hex string" SQL99 use, looks much more convinient. Is there any particular reason not to follow SQL99 in this case???
    Advantages of the hex string:
    - the leng of the buffer is known.
    - easier, (faster?) conversion
    - no extreme cases (all of the bytes are 0 ->
    '\\000')
  2. For a new new own defined type, is it possible to define the maximum length of the object just like TEXT(N), CHAR(N) do it?
Kind Regards,
Yuri

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Linux PostgreSQL - Data Mart & Small Data Warehousing
Next
From: Bruce Momjian
Date:
Subject: Re: Win2K Questions