Re: [HACKERS] proposal: generic function, constructor function

2008-01-20 Thread Pavel Stehule
Hello > > The different-numbers-of-arguments bit is what I'm objecting to. > Just register the function as foo(ANY), foo(ANY,ANY), foo(ANY,ANY,ANY), > etc, and you're done without breaking anything else. > I found simple solution, it uses ANY, but number of necessary ANY arguments is generated dy

Re: [HACKERS] proposal: generic function, constructor function

2008-01-19 Thread Pavel Stehule
> > do you have any sample, please, > > Tom said, try "any". Don't forget about double quotes > I am blind thank you Pavel ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postg

Re: [HACKERS] proposal: generic function, constructor function

2008-01-19 Thread Oleg Bartunov
On Sat, 19 Jan 2008, Pavel Stehule wrote: On 19/01/2008, Tom Lane <[EMAIL PROTECTED]> wrote: "Pavel Stehule" <[EMAIL PROTECTED]> writes: But I am not able create function with ANY params. Is it possible do it via CREATE FUNCTION .. ? It's a reserved word :-(. Try "any"

Re: [HACKERS] proposal: generic function, constructor function

2008-01-19 Thread Pavel Stehule
On 19/01/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: > > But I am not able create function with > > ANY params. Is it possible do it via CREATE FUNCTION .. ? > > It's a reserved word :-(. Try "any" > > regards, tom lane > I did

Re: [HACKERS] proposal: generic function, constructor function

2008-01-18 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > But I am not able create function with > ANY params. Is it possible do it via CREATE FUNCTION .. ? It's a reserved word :-(. Try "any" regards, tom lane ---(end of broadcast)--

Re: [HACKERS] proposal: generic function, constructor function

2008-01-18 Thread Pavel Stehule
On 18/01/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: > > On 18/01/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > >> Can't you do that already with ANYELEMENT, or at the worst ANY? > > > I would to have independent parameters and move type checking to > > fun

Re: [HACKERS] proposal: generic function, constructor function

2008-01-18 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > On 18/01/2008, Tom Lane <[EMAIL PROTECTED]> wrote: >> Can't you do that already with ANYELEMENT, or at the worst ANY? > I would to have independent parameters and move type checking to > function. Okay, then you want ANY. > Then I don't need register

Re: [HACKERS] proposal: generic function, constructor function

2008-01-18 Thread Pavel Stehule
On 18/01/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: > > I propose two kinds of functions: > > > a) generic functions - this function allows any params without any > > implicit casting (it can implemented only in C language). > > Can't you do that already

Re: [HACKERS] proposal: generic function, constructor function

2008-01-18 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > I propose two kinds of functions: > a) generic functions - this function allows any params without any > implicit casting (it can implemented only in C language). Can't you do that already with ANYELEMENT, or at the worst ANY? > It allows unspecified

[HACKERS] proposal: generic function, constructor function

2008-01-18 Thread Pavel Stehule
Hello I propose two kinds of functions: a) generic functions - this function allows any params without any implicit casting (it can implemented only in C language). This function have to have specified return type. It usable for constructor function and for some other. It allows unspecified numbe