Re: I/O support for composite types

From: elein <elein(at)varlena(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: I/O support for composite types
Date: 2004-06-05 19:13:37
Message-ID: 20040605121337.M11485@cookie.varlena.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Composite types will work recursively, right?
That is a composite type inside of a composite type column?
Does the SQL dot syntax support this nested referencing?
Or are we only allowing one level.

Why not just use the syntax of the insert values with parens?

insert into tble values (...);

is very familiar so the corresponding:

insert into table values ( 'xxx', ('yyy', 123), 456 );

is also easy to understand and remember: a row is being inserted.

Is there a specific reason why you want curly brackets?
I have not been following this much to my chagrin.

On Sat, Jun 05, 2004 at 12:57:27PM -0400, Tom Lane wrote:
> good stuff deleted...
>
> There are a couple of fine points of the array I/O behavior that I think
> we should not emulate. One is that leading whitespace in an item string
> is discarded. This seems inconsistent, mainly because trailing
> whitespace isn't discarded. In the cases where it really makes sense to
> discard whitespace (namely numeric datatypes), the underlying datatype's
> input converter can do that just fine, and so I suggest that the record
> converter itself should not discard whitespace. It seems OK to ignore
> whitespace before and after the outer braces, however.

If the whitespace is inside of the item, do not discard it; let the
underlying type deal with it. If the white space is outside of the
item, ignore it. I think you probably meant this, but just to be sure.
{ " item number one " } ==> input_text( " item number one " )

> more good stuff deleted
>
> Comments, objections, better ideas?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--elein
============================================================
elein(at)varlena(dot)com Varlena, LLC www.varlena.com

PostgreSQL Consulting, Support & Training

PostgreSQL General Bits http://www.varlena.com/GeneralBits/
=============================================================
I have always depended on the [QA] of strangers.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-06-05 19:15:31 Re: I/O support for composite types
Previous Message Thomas Hallgren 2004-06-05 18:45:14 Re: I/O support for composite types