Stored procedure « postgresql « Java Database Q&A





1. Java and PostgreSQL stored procedure - return registered as out parameter, causing issues with in parameters    stackoverflow.com

I'm trying to call a PostgreSQL stored procedure from a Java app; the procedure has a DATE type parameter so I'm using a java.sql.Date type with CallableStatement.setDate(). However, executing the ...

2. PostgreSQL stored procedure using iBatis    stackoverflow.com

The error occurred while applying a parameter map:

--- Check the newSubs-InlineParameterMap.
--- Check the statement (query failed).
--- Cause:
org.postgresql.util.PSQLException:
ERROR: wrong record type supplied in RETURN NEXT Where:
PL/pgSQL function "getnewsubs" line 34 ...

3. How to read a UDT from a postgres stored function    stackoverflow.com

I can't seem to read a UDT properly from a stored function with the postgres JDBC driver. This is some sample code:

CREATE TYPE u_country AS ENUM ('Brazil', 'England', 'Germany')

CREATE TYPE u_street_type AS ...

4. Can't view or edit stored procedures in Netbeans (PostgreSQL connection)    stackoverflow.com

I just installed Netbeans (7.0 IDE Dev) on my mac, and I am quite happy that i dont need 2 editors anymore (1 for php, 1 for python) Now, I got even ...

5. postgres stored procedure or java code    stackoverflow.com

I have a situation where there is large amount of data involved - about a million rows. I need to perform some looping through results and have many nested loops. With ...

6. Tool to generate classes from Database stored procedures    stackoverflow.com

I have a database I need to access using stored procedures. So for each stored procedure's return type, I want to create a entity. Are there any tools pout there that can generate ...

7. Results cannot be retrieved from a CallableStatement before it is executed    stackoverflow.com

I have this method in my application to get child organizations of a particular organization. It calls a stored procedure(which creates a temporary table). StoredProcedureDAO.java

private Connection dbConnection = null;
private CallableStatement cstmt = ...

8. In Java, calling a PostgreSQL function, why I'm getting an error informing that the function doesn't exists?    stackoverflow.com

I have this procedure in the database:

CREATE OR REPLACE FUNCTION replacePageRelevance(id INT, value REAL) RETURNS VOID AS $$
BEGIN
INSERT INTO pageRelevance VALUES (id,value);
EXCEPTION WHEN unique_violation THEN
    UPDATE pageRelevance SET ...

9. Why I'm getting an error informing that "a result was not expected" when executing stored procedures on PostgreSQL from Java in a batch?    stackoverflow.com

I have this procedure in the database:

CREATE OR REPLACE FUNCTION replacePageRelevance(id INT, value REAL) RETURNS VOID AS $$
BEGIN
INSERT INTO pageRelevance VALUES (id,value);
EXCEPTION WHEN unique_violation THEN
    UPDATE pageRelevance SET ...





10. stored procedures as queries: CallableStatement vs. PreparedStatement    stackoverflow.com

PostgreSQL documentation recommends using a CallableStatement to call stored stored procedures. In the case of a stored procedure that returns a rowset, what are the differences between using ...

11. Can't view or edit stored procedures (PostgreSQL connection)    forums.netbeans.org

Hi there! I just installed Netbeans (7.0 IDE Dev) on my mac, and I am quite happy that i dont need 2 editors anymore (1 for php, 1 for python) Now, I got even more enthousiastic when I saw that i could connect to my PostgreSQL server, this came in super-handy for editing my stored procedures (instead of copying/pasting the functions ...

12. Java Stored Procedures for PostgreSQL    coderanch.com