Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
Should be over at dba.stackexchange.com –  Martin F Apr 19 '14 at 19:46
    
Thanks - posted it also there –  Orr Apr 19 '14 at 20:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.