Search Postgresql Archives

Re: Limitations of PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scott Marlowe <smarlowe@xxxxxxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux