Re: RfD: more powerful "any" types
От | David E. Wheeler |
---|---|
Тема | Re: RfD: more powerful "any" types |
Дата | |
Msg-id | 41DB8C95-6971-44C0-A59D-4E2CAA8811B3@kineticode.com обсуждение исходный текст |
Ответ на | RfD: more powerful "any" types (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: RfD: more powerful "any" types
|
Список | pgsql-hackers |
On Sep 8, 2009, at 9:12 AM, Alvaro Herrera wrote: > foo(anyelement, anyelement) returns anyelement > > but this will force them to be both of the same type, which is not > what > we want. In my opinion this is a missing feature of our type system. Oh yes, agreed. I've run into this with pgTAP many times. > One seemingly trivial idea would be to have anyelement2, anyelement3, > and so on. This is not a very good solution, because we'd have to > fill > the catalogs with a large bunch of new pseudotypes, and the code > with a > bunch of hardcoded tests -- and there are already 27 cases of > ANYELEMENTOID in our code. Yes, and foo() might be called with two different data types, or two of the same, and both should work. <snip what="other useful information" /> > Before I spend time trying to figure out how this works, > 1. is there agreement that this is a problem and needs fixed, and +1 > 2. does anybody have an idea how to attack it? Why can't anyelement be freed from this constraint? Best, David
В списке pgsql-hackers по дате отправления: