Re: pg_type.h regression? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_type.h regression?
Date
Msg-id 16959.1222222594@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_type.h regression?  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-hackers
"Greg Sabino Mullane" <greg@turnstep.com> writes:
>> DefineType currently always sets the array's typdelim to ',', so I
>> figured that the built-in types should match that.  But we could
>> easily change both of them to do the other.  Thoughts?

> I'd slightly lean towards keeping it the way it has been (semicolon in both),
> since it doesn't matter to the backend, and who knows what else it may break.

Well, the problem is that we'd *not* be keeping it the same for
user-defined types.  But the odds that that's really an issue are
admittedly small.

I thought of an argument for changing to array-uses-element's-typdelim,
though.  If we ever go over to a scheme where arrays are one-dimensional
and you build up N-dimensional arrays using arrays of array objects
(where the outer array treats the inner as a black box), then we would
need the typdelims to match to preserve the current I/O behavior.
I'm not really enamored of making such a change myself, but I seem to
recall a couple of people advocating for it.

So, if no objections I'll revert the change to _box's typdelim and
change DefineType to copy the element typdelim to the array type.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Toasted table not deleted when no out of line columns left
Next
From: Andrew Dunstan
Date:
Subject: Re: 0x1A in control file on Windows