Re: CREATE TYPE delimiter? - Mailing list pgsql-general

From Command Prompt, Inc.
Subject Re: CREATE TYPE delimiter?
Date
Msg-id Pine.LNX.4.30.0111031136540.30572-100000@commandprompt.com
Whole thread Raw
In response to Re: CREATE TYPE delimiter?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CREATE TYPE delimiter?
List 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@commandprompt.com
by way of pgsql-general@commandprompt.com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: CREATE TYPE delimiter?
Next
From: "Eric Ridge"
Date:
Subject: Re: SETOF and language 'plpgsql'