Skip to main content

All Questions

3 votes
1 answer
2k views

Postgres server side prepared statement sp call with out parameter - wrong metadata resolution

We are using Postgres 14.3, Springboot 2.6.1 and JDBC driver 'org.postgresql:postgresql:42.3.3' We have a problem in a call to a SP. It's a legacy call to a Stored Procedure with many input parameters ...
Facundor's user avatar
0 votes
0 answers
58 views

JDBC Connection.prepareCall changes "сall" of procedure into "select" [duplicate]

After using this code CallableStatement callableStatement = null; String sqlCall = "{call my_schema.my_procedure(?,?,?,?,?,?)}"; callableStatement = connection.prepareCall(...
NEON's user avatar
  • 23
0 votes
0 answers
288 views

parameters on procedure (JDBC EDB)

I'm migrating application from Oracle to EDB, and I'm having some problems with stored procedures in packages. Supposing I have this type defined: CREATE TYPE public.obj_test AS ( version_in ...
sirsanchez's user avatar
0 votes
0 answers
356 views

Execute multi-line PostgreSQL script containing stored procedure call with IN/INOUT Parameters using java

I have a special case, in which the following PostgreSQL script is required to be called from java: do $$ DECLARE xx VARCHAR(200); xy VARCHAR(200); xz VARCHAR(...
Shariq Ali's user avatar
3 votes
1 answer
5k views

Calling a postgres stored procedure from spring boot using jdbc template [duplicate]

I am migrating from Oracle DB to Postgres. I was using stored procedures in oracle and accessing them in my spring boot code using jdbc template. I am getting an error when running my code using ...
Sean's user avatar
  • 396
1 vote
1 answer
309 views

Cron job to remove logically redundant entries in Postgres SQL

I have a requirement to delete records from a Postgres SQL table which has more than 200 million records. The table is not having any primary key. The sample table (Bookmark is the name of table) ...
Abhilash's user avatar
  • 905
1 vote
1 answer
1k views

How to get dynamic resultset on calling a postgresql function

I have written a stored procedure in PostgreSQL with an if and else if condition. In each condition having different queries that return different results. How can I access the result in Java using ...
ankur pramanik's user avatar
0 votes
2 answers
335 views

Get the body of a stored procedure from PostgreSQL using JDBC

I can't get a stored procedure's body from Java code using JDBC. Which methods should I use to solve this? I found the metadata of all stored procedures using this code: ResultSet resultSet1 = ...
макс сафронов's user avatar
0 votes
0 answers
244 views

JDBC executeBatch strange behaviour

I am trying to execute a callablestatement on a stored procedure (not function - but procedure) on Postgresql 11. I create a batch ready for execution like this: int[] results; final int batchsize = ...
Darren Smith's user avatar
2 votes
4 answers
4k views

Postgres stored procedure call from java, table to return

I made a Postgres stored procedure: CREATE OR REPLACE FUNCTION GetUser(ipUserId integer) RETURNS setof users AS $$ BEGIN IF ipUserId is null THEN return query select * from users A order by ...
Bogdan's user avatar
  • 300
0 votes
1 answer
3k views

Call PostgreSQL stored procedure using SimpleJdbcCall and REF_CURSOR

I want to call a PostgreSQL stored procedure with REF_CURSOR using SimpleJDBCCall. My stored procedure looks like: CREATE OR REPLACE FUNCTION public.procName() RETURNS refcursor AS $BODY$ DECLARE ...
Kutas Tomy's user avatar
0 votes
0 answers
61 views

How can i insert data using procedure sql? [duplicate]

Today I have trouble to insert data into Postgres database using procedure. I have one procedure to insert record to it , but it is so slow with many record. Can help to fix my procedure. void ...
nara son's user avatar
  • 177
1 vote
1 answer
1k views

PostgresQL stored procedure called from JDBC does not work

I have a postgresql database with some table and a stored procedure which write on this table. Everything goes fine, when I call this stored procedure from psql: I see my records inserted in my table. ...
rog's user avatar
  • 13
0 votes
1 answer
128 views

call a stored procedure from PostgreSQL

I am trying to call a stored procedure. A stored procedure is proven by tests in the database and executed CREATE OR REPLACE FUNCTION statapi.pui_src_ter(p_src_ter_id id_t, p_aname name_t, p_adesc ...
liketheother's user avatar
0 votes
0 answers
1k views

PSQLException; No function matches given name and argument types

I am completely new to functions in postgres. I have been struggling with this for the past couple of days. org.postgresql.util.PSQLException: ERROR: function create_new_user(bigint, character ...
user1011376's user avatar

15 30 50 per page