From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
Cc: | Michael Fuhr <mike(at)fuhr(dot)org>, Chris Travers <chris(at)travelamericas(dot)com>, Denis G Dudhia <denu79(at)rediffmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Limitations of PostgreSQL |
Date: | 2005-10-13 16:34:31 |
Message-ID: | 23203.1129221271@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Scott Marlowe <smarlowe(at)g2switchworks(dot)com> writes:
> I could see how it might be possible to make a two argument user defined
> function that took an argument like:
> select intvl(10,'20 30 40 50 60');
> so that the multiple arguments are really just a space or comma
> separated list fed to the function. I wouldn't name it interval though.
Use an array:
select intvl(10, array[20,30,40,50,60]);
I think you could even code this as a generic polymorphic function:
create function intvl(anyelement, anyarray) returns anyelement ...
Anybody feel like filling it in with a standard binary search algorithm?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2005-10-13 16:48:56 | Re: Limitations of PostgreSQL |
Previous Message | Dean Gibson (DB Administrator) | 2005-10-13 16:30:50 | Re: Limitations of PostgreSQL |