From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: RfD: more powerful "any" types |
Date: | 2009-09-09 13:23:54 |
Message-ID: | 1252502634.15729.11.camel@fsopti579.F-Secure.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2009-09-09 at 07:47 -0400, Alvaro Herrera wrote:
> Peter Eisentraut wrote:
> > On Tue, 2009-09-08 at 10:23 -0700, David E. Wheeler wrote:
> > > On Sep 8, 2009, at 10:15 AM, Tom Lane wrote:
> > >
> > > >> arg_a IS DISTINCT FROM arg_b
> > > >
> > > > Surely you'd want arg_a and arg_b constrained to the same type,
> > > > otherwise there is no certainty that that means anything at all.
> > >
> > > Yes, for the purposes of pgTAP perhaps so. Then it's on the user to do
> > > the cast, because she decides that the cast is appropriate. Otherwise,
> > > as I said, perhaps it'd be too magical.
> >
> > That's beginning to sound a bit like a generics feature. E.g.,
> >
> > CREATE FUNCTION the_same<T>(arg_a T, arg_b T) RETURNS bool AS $$
> > SELECT arg_a IS DISTINCT FROM arg_b;
> > $$;
>
> Well, you can write that one with anyelement already.
Well, so far we've only seen use cases in this thread that either
already work or that are not well-defined. ;-)
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2009-09-09 13:38:55 | Re: COALESCE and NULLIF semantics |
Previous Message | Peter Eisentraut | 2009-09-09 13:05:02 | Re: Elementary dependency look-up |