YNT: Re: [SQL] Using bind variable within BEGIN END
От | gulsumramazanoglu |
---|---|
Тема | YNT: Re: [SQL] Using bind variable within BEGIN END |
Дата | |
Msg-id | kdf2tkyatlx830fud5f1g71u.1496428694928@email.android.com обсуждение исходный текст |
Ответы |
Re: YNT: Re: [SQL] Using bind variable within BEGIN END
|
Список | pgsql-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.
В списке pgsql-sql по дате отправления: