From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | anand086 <anand086(at)gmail(dot)com> |
Cc: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Using bind variable within BEGIN END |
Date: | 2017-06-02 18:27:12 |
Message-ID: | CAKFQuwamhkBc+4dfNEZriefPKWEZTqgyEK2fe3y2T2xodzKzww@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Friday, June 2, 2017, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:
> On Friday, June 2, 2017, anand086 <anand086(at)gmail(dot)com
> <javascript:_e(%7B%7D,'cvml','anand086(at)gmail(dot)com');>> wrote:
>
>> Another example where we are getting the same error is from the call of
>> the
>> below code --
>>
>> ctx.update(""
>> + "begin
>> \n"
>> + "
>> access.register_type( \n"
>> + "
>> p_entity_system => ?, \n"
>>
>>
> PostgreSQL doesn't alllow named arguments when calling functions and
> function calls must be part of a SQL statement: select func(?,?,?,?.?);
> this applied even to functions that do not return results. IOW,
> PostgreSQL doesn't have stored procedures.
>
>
Guess I should have re-read the docs.
https://www.postgresql.org/docs/10/static/sql-syntax-calling-funcs.html
Named arguments are a thing so the main problem is that you don't have a
select before your function name. Though I would have expected a different
error message...
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | gulsumramazanoglu | 2017-06-02 18:35:42 | YNT: Re: Using bind variable within BEGIN END |
Previous Message | David G. Johnston | 2017-06-02 18:21:40 | Re: Using bind variable within BEGIN END |