Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7EEnuP37329 for ; Tue, 14 Aug 2001 10:49:56 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f7EEnQY17559; Tue, 14 Aug 2001 10:49:26 -0400 (EDT) To: Alan Gutierrez cc: Bill , pgsql-sql@postgresql.org Subject: Re: Re: DateDiff, IsNull? In-reply-to: References: <9lb25o$psq$1@news.tht.net> Comments: In-reply-to Alan Gutierrez message dated "Tue, 14 Aug 2001 06:51:33 -0000" Date: Tue, 14 Aug 2001 10:49:26 -0400 Message-ID: <17556.997800566@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200108/188 X-Sequence-Number: 4413 Alan Gutierrez 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 an explicit 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