From: | Rodrigo Barboza <rodrigombufrj(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: c language functions |
Date: | 2013-04-03 21:37:59 |
Message-ID: | CANs8QJacnVVhNvTKsBrACA3=3JoLz7wO7S6+3oY7zmzyFL6pjQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I see, that's true.
I'm returning unknown type, there is a little more overhead. But it's
working now. =]
Thanks for the help guys!
On Wed, Apr 3, 2013 at 6:17 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Apr 3, 2013 at 3:25 PM, Rodrigo Barboza <rodrigombufrj(at)gmail(dot)com>
> wrote:
> > Well, I was checking inside my function the type of the second argument
> and
> > switching between the allowed types.
> > This way kind of does the same thing of many functions, doesn't it?
>
> Sure, except that it will also call your function when someone does
> my_int + text or my_int + bytea or my_int + box, which are surely a
> lot less sensible. It's probably a good idea to assume that if you
> make your type work like the existing types, it's more likely to end
> well than if you make it behave completely differently.
>
> ...Robert
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-04-03 21:49:18 | Re: Drastic performance loss in assert-enabled build in HEAD |
Previous Message | Robert Haas | 2013-04-03 21:21:36 | Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] |