PostgreSQL 11-过程支持 PostgreSql版本:11 Beta 4 Npgsql版本:v4.0.3

PostgreSQL 11-过程支持 PostgreSql版本:11 Beta 4 Npgsql版本:v4.0.3,postgresql,npgsql,Postgresql,Npgsql,我想测试PostgreSql的存储产品,但我得到了错误 "42809: get_customer_list() is a procedure" 我的命令类型 CommandType.StoredProcedure Npgsql支持PostgreSql 11存储产品吗?请参阅 长话短说,您可以调用存储过程,但不能使用CommandType.StoredProcedure。只需使用文本CALL my_storage_procedure()发出一个常规命令,谢谢您的回答。我开发了一个数据层,用一个

我想测试PostgreSql的存储产品,但我得到了错误

"42809: get_customer_list() is a procedure"
我的命令类型

CommandType.StoredProcedure
Npgsql支持PostgreSql 11存储产品吗?

请参阅


长话短说,您可以调用存储过程,但不能使用
CommandType.StoredProcedure
。只需使用文本
CALL my_storage_procedure()

发出一个常规命令,谢谢您的回答。我开发了一个数据层,用一个代码支持4个数据库(MsSql、Postgresql、MySql、Oracle)。我必须使用“CommandType.storedProcess”来编写单个代码。到目前为止,我使用的是“Functions”,但没有将“Out”参数与“Functions”一起使用。我想改用PostgreSql 11附带的“存储的Prodecure”函数。我写的另一个问题是存储过程结果集不返回数据。只有消息“CALL Query在136毫秒内成功返回。我的过程`CREATE Procedure Get_Customer_List()作为$$SELECT*FROM public.“Customer”;$$LANGUAGE SQL;`据我所知,过程无法返回任何内容(至少目前无法返回).函数确实支持所谓的out变量,并且可以毫无问题地使用,因此您可能不需要存储过程。是的,但不能与setof或table一起使用。我认为这可以通过存储过程来完成。例如:“创建或替换函数public.test_func(out total_count integer)返回setof“Manufacturer”作为$$total_count:=100;从公共列表中选择*。“制造商”;$$语言sql;“”错误:函数结果类型必须为整数,因为OUT参数SQL state:42P13”因此,函数同样支持返回内容和OUT变量(这只是指定函数返回内容的另一种方式)。恐怕新过程也不支持,即使它们支持,Npgsql也不支持处理它们(至少在这一点上)。