Re: Range Types, constructors, and the type system - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Range Types, constructors, and the type system
Date
Msg-id 1309193152.2443.233.camel@jdavis
Whole thread Raw
In response to Re: Range Types, constructors, and the type system  (Florian Pflug <fgp@phlo.org>)
List pgsql-hackers
On Mon, 2011-06-27 at 12:16 +0200, Florian Pflug wrote:
> I wouldn't take it that far. What I had in mind was to *only* support
> the case where the cast directly follows the function call, i.e. the case
>   f(...)::type

OK, so instead of writing:
range(lower(range(1,2)),upper(range(1,2)))::int8range

users would write:
range(lower(range(1,2)::int8range),upper(range(1,2)::int8range))::int8range

A little more verbose, but it seems like it wouldn't be a practical
problem in very many cases. Multiple levels of constructors seem like
they'd be fairly uncommon, and probably a case where a function should
be written anyway.

OK, I'll have to think about this a little more, but it seems like a
reasonable approach.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: beta3?
Next
From: Jeff Davis
Date:
Subject: Re: Range Types, constructors, and the type system