1

MSSQL has a great feature called Table Valued Parameters. It allows you to pass a table of a custom data to stored procedures and functions.

I was wondering what is the equivalent , if exists, in PostgreSQL, using JDBC? I know about the option of passing Arrays as a function parameters, but that seems limited to Postgresql data types.

Consider the following PL/pgSQL code:

CREATE  TYPE number_with_time AS(
_num   float,
_date  timestamp
);

and this function header:

CREATE OR REPLACE FUNCTION myfunc(arr number_with_time[])

Can anyone post a JAVA code using JDBC driver of calling that function with an array of the user defined data type?

Thanks

closed as off-topic by Andre Silva, xunilk, Dan C, BERA, Evil Genius Jun 11 '18 at 11:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions relating to general IT or with no clear GIS component, are off-topic here but can be researched/asked at Stack Overflow (software development), Super User (computing hardware and software), Database Administrators (relational databases) and other SE sites" – Andre Silva, xunilk, Dan C, BERA, Evil Genius
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.