Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 469B19FB2FE for ; Fri, 19 Jan 2007 04:22:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 43796-10 for ; Fri, 19 Jan 2007 04:22:54 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id C5AD79FB2F6 for ; Fri, 19 Jan 2007 04:22:54 -0400 (AST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H7p1Q-0007gd-Kv for pgsql-admin@postgresql.org; Fri, 19 Jan 2007 09:22:52 +0100 Received: from pirus.securax.be ([213.16.46.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Jan 2007 09:22:52 +0100 Received: from milen by pirus.securax.be with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Jan 2007 09:22:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: "Milen A. Radev" Subject: Re: System Date Date: Fri, 19 Jan 2007 10:22:37 +0200 Lines: 30 Message-ID: <45B07FCD.2090001@radev.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pirus.securax.be User-Agent: Mozilla Thunderbird 1.5.0.9 (Windows/20061207) In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.212 tagged_above=0 required=5 tests=AWL, BAYES_40, RCVD_IN_SORBS_WEB, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200701/170 X-Sequence-Number: 24326 Negandhi, Nishith написа: > Hi Thanx..one more help. > I am creating a function that will retuen the current systemdate. > > CREATE FUNCTION "CreateDate"() RETURNS date AS > 'select now();' > LANGUAGE 'plpgsql'; > > However, I get the error: > > ERROR: syntax error at or near "select" at character 51 > > Any suggestions .?? > [...] CREATE FUNCTION "CreateDate"() RETURNS date AS 'select CURRENT_DATE;' LANGUAGE SQL; (more info here - http://www.postgresql.org/docs/current/static/xfunc-sql.html) Although I fail to see the usefulness of such a function. -- Milen A. Radev