Re: CREATE TYPE delimiter?

From: "Command Prompt, Inc(dot)" <pgsql-general(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: CREATE TYPE delimiter?
Date: 2001-11-03 19:43:11
Message-ID: Pine.LNX.4.30.0111031136540.30572-100000@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 3 Nov 2001, Tom Lane wrote:
>So you'd need to have attached the DELIMITER = '|' spec to the
>"zero" datatype to make it effective. (This seems reasonable to me,
>since it is the element type's formatting that determines what sort
>of delimiter is sensible.)

Ah! Thanks, just tried it, and it works perfectly.

>Now that I look at it, the CREATE TYPE ref page is pretty confusing
>on the whole topic of array types. I'll see what I can do with it.

Wonderful. While you're in there, you might look at the wording on the
input and output function descriptions; it says that they must take either
one or two arguments of type opaque, but it's not at all clear what the
second argument would be for, in either circumstance.

Also, the DEFAULT clause was a bit curious; it says you can describe "some
specific bit pattern" to mean "data not present"; presumably in place of
NULL? I figured this meant it took a bit string for some kind of internal
handling, but it seems to accept any arbitrary value I give it (integer,
text, though not a b'1001' style bit string!). However, I got some ugly
disconnections from the server after experimenting with this value, and
attempting to SELECT values that would have otherwise been NULL. ;) I
suppose because the output function wasn't set up to handle whatever value
was getting set by this clause?

Thanks again,
Jw.
--
jlx(at)commandprompt(dot)com
by way of pgsql-general(at)commandprompt(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message K. Ari Krupnikov 2001-11-03 20:08:52 EXCEPT performace
Previous Message Tom Lane 2001-11-03 19:32:49 Re: CREATE TYPE delimiter?