Re: Re: DateDiff, IsNull?
От | Tom Lane |
---|---|
Тема | Re: Re: DateDiff, IsNull? |
Дата | |
Msg-id | 17556.997800566@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: DateDiff, IsNull? (Alan Gutierrez <alangutierrez@hotmail.com>) |
Список | pgsql-sql |
Alan Gutierrez <alangutierrez@hotmail.com> writes: > On Tue, 14 Aug 2001, Bill wrote: >> And is it possible to override the existing function and >> operator like "+" to become a concate? > Overloading operators? *Please* tell me that this is impossible. I've got bad news ;-) ... it's pretty easy. regression=# select 'aa'::text + 'bb'::text; ERROR: Unable to identify an operator '+' for types 'text' and 'text' You will have to retype this query using anexplicit cast regression=# create operator + (procedure = textcat, regression(# leftarg = text, rightarg = text); CREATE regression=# select 'aa'::text + 'bb'::text;?column? ----------aabb (1 row) Whether this is a good idea is another question --- but if Bill's intent on not using the SQL-standard text concatenation operator "||", he can do so. regards, tom lane
В списке pgsql-sql по дате отправления: