Re: Operator based on data type

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: Operator based on data type
Дата
Msg-id CAPTjJmqboidv-i8PdpBJhOUL7OuTAvj77kGrzXEr+pUdNb_4=w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Operator based on data type  (Craig Ringer <ringerc@ringerc.id.au>)
Список pgsql-general
On Fri, Jan 13, 2012 at 5:27 PM, Craig Ringer <ringerc@ringerc.id.au> wrote:
> Oooh, that's clever. Nice!
>
> People say function overloading is no good ....

They do??

I wrote a similar set of functions to simplify a particular piece of
UI code. Three functions called 'str2int'; one takes varchar and
returns int, one takes int and returns int, and one takes bigint and
returns bigint. I can pass anything the UI works with through these,
and I have a guarantee that it'll compare as integer. (The varchar one
isn't quite the same as casting to int; it swallows errors and returns
0, because that's what we want to achieve.) Function overloading is
awesome!

ChrisA

В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Compiling C function with VC++ for Windows version
Следующее
От: Yan Chunlu
Дата:
Сообщение: Re: select statment going slow and slow while using IN (xx,xx)