| От | Josh Berkus |
|---|---|
| Тема | Re: Re: Re: DateDiff, IsNull? |
| Дата | |
| Msg-id | web-102637@davinci.ethosmedia.com обсуждение исходный текст |
| Ответ на | Re: Re: DateDiff, IsNull? (Alan Gutierrez <alangutierrez@hotmail.com>) |
| Список | pgsql-sql |
Alan, Tom, Ross, etc:
> > Well, Alan, overloading operators is sort of important to the user
> > definable types in postgresql. And any cross-type functionality,
> actually.
Hmmm ... I wasn't aware that what SQL does is "operator overloading",
per se.
Instead, I was under the SQL-spec impression that operators were defined
within the context of their relative datatypes, and only within that
context.
For example, currently 730::INT / 7::INT works fine, but '2
years'::INTERVAL / '1 week'::INTERVAL gives me an "operator not defined"
error. This is because nobody has had time to define the operator "/"
in the context of INTERVAL / INTERVAL. When someone does (oh please?
grovel, grovel) it will be defined, not overloaded.
Similarly, the operator "+" has no standard defintion in the context of
VARCHAR + VARCHAR. So how is defining it as a concatination operator
(whatever other problems there might be with that) "overloading"?
Or am I missing the point?
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера