Re: Failure to Call a Nested Function

From: Vibhor Kumar <vibhor(dot)kumar(at)enterprisedb(dot)com>
To: Manlin Vee <maps(dot)this(dot)address(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Failure to Call a Nested Function
Date: 2011-02-25 07:00:04
Message-ID: 35304AD1-2A0E-4C69-985E-00783E938509@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Feb 25, 2011, at 9:08 AM, Manlin Vee wrote:

> REATE FUNCTION
> psql:/path/to/my.sql:(line 25): ERROR: : syntax error at or near
> "check_year"
> LINE 1: check_year( $1 )
> ^
> QUERY: check_year( $1 )
> CONTEXT: SQL statement in PL/PgSQL function "check_age" near line 5
> psql:/path/to/my.sql:(line 30): ERROR: function check_age() does not exist
>
>
> Interestingly, if I append "PERFORM" before line "20" to invoke
> check_year(), the error message subdues. What am I doing wrong? Do I have

Yes. Function can be call using SELECT OR if you want to ignore the Result then you can use perform.

Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Cell: +91-932-568-2279
vibhor(dot)kumar(at)enterprisedb(dot)com
Blog:http://vibhork.blogspot.com

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Chetan Suttraway 2011-02-25 08:02:56 Re: EnterpriseDB
Previous Message Tom Lane 2011-02-25 05:10:41 Re: Enabling SSL fails to restart server