bytea - own defined type

From: "Gyorgy Molnar" <yuri(at)powercom(dot)com(dot)sg>
To: <pgsql-general(at)postgresql(dot)org>
Subject: bytea - own defined type
Date: 2002-11-12 03:55:20
Message-ID: 004201c289ff$7356cf50$6e01a8c0@dell8100
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-11-12 04:31:02 Re: Win2K Questions
Previous Message Lakshmi Narayanan V 2002-11-12 01:39:31 Invlalid EUC_JP character