agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: gulsumramazanoglu <gulsumramazanoglu@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
To: anand086 <anand086@gmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: YNT: Re: Using bind variable within BEGIN END
Date: Fri, 02 Jun 2017 21:38:14 +0300
Message-ID: <kdf2tkyatlx830fud5f1g71u.1496428694928@email.android.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
... which will pass arguments and get back a result set, i mean..
Samsung cihazımdan gönderildi
-------- Orjinal mesaj --------
Kimden: "David G. Johnston" <david.g.johnston@gmail.com>
Tarih: 2 06 2017 9:21 PM (GMT+02:00)
Alıcı: anand086 <anand086@gmail.com>
Cc: pgsql-sql@postgresql.org
Konu: Re: [SQL] Using bind variable within BEGIN END
On Friday, June 2, 2017, anand086 <anand086@gmail.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"
+ "
p_entity_type => ?, \n"
+ "
p_attribute_name => ?, \n"
+ "
p_creator_id => ?, \n"
+ "
p_description => ? \n"
+ " );"
+ "end;",
systemName,
entityType,
attributeName,
creatorID,
attributeDescription);
access.register_type is a function
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.
David J.
view thread (3+ messages) latest in thread
Message-ID: <kdf2tkyatlx830fud5f1g71u.1496428694928@email.android.com>
Permalink: ../kdf2tkyatlx830fud5f1g71u.1496428694928@email.android.com/
Also on: postgresql.org/message-id/kdf2tkyatlx830fud5f1g71u.1496428694928@email.android.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gulsumramazanoglu@gmail.com, david.g.johnston@gmail.com, anand086@gmail.com
Subject: Re: YNT: Re: Using bind variable within BEGIN END
In-Reply-To: <kdf2tkyatlx830fud5f1g71u.1496428694928@email.android.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox