Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 4ECA59FB1BD; Sun, 8 Apr 2007 20:20:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 14836-06; Sun, 8 Apr 2007 20:20:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 0FBBD9FA605; Sun, 8 Apr 2007 20:20:49 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l38NKkis011752; Sun, 8 Apr 2007 19:20:46 -0400 (EDT) To: Karthikeyan Sundaram cc: postgres admin , postgres sql Subject: Re: Question on pgpsql function In-reply-to: References: Comments: In-reply-to Karthikeyan Sundaram message dated "Sun, 08 Apr 2007 12:47:42 -0700" Date: Sun, 08 Apr 2007 19:20:46 -0400 Message-ID: <11751.1176074446@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/73 X-Sequence-Number: 25137 Karthikeyan Sundaram writes: > I am getting an error message > ERROR: function substr(bit, integer, integer) does not existHINT: No func= > tion matches the given name and argument types. You may need to add explici= > t type casts.CONTEXT: SQL function "week_func" I think you want substring() not substr(). regards, tom lane