Also, Cayenne already has a few PostgreSQL functions included in the test suite:

http://svn.apache.org/repos/asf/cayenne/main/trunk/framework/cayenne-core-unpublished/src/test/resources/ddl/postgresql/

If you can build a test case based on the existing Cayenne test entities 
demonstrating the problem, maybe we can do something about it.

Andrus

On Sep 9, 2013, at 9:22 PM, Andrus Adamchik <[email protected]> wrote:
> While I don't have much recent production experience with PostgreSQL, I 
> recently did some research for a stackoverflow answer [1] (maybe that was 
> your question?). My overall experience was that Cayenne (and PostgreSQL JDBC 
> driver) would support pretty much any kind of PG function. Although coding 
> those functions is somewhat arcane (to me at least), I never had to resort to 
> any Oracle-like hacks. 
> 
> Sorry if this is not very specific. Maybe you can post the example of your 
> PostgreSQL function, and someone will have a better idea.
> 
> Andrus
> 
> [1] 
> http://stackoverflow.com/questions/16921942/porting-apache-cayenne-from-oracle-to-postgresql
> 
> On Sep 9, 2013, at 4:03 PM, mr.abanjo <[email protected]> wrote:
> 
>> Hi all,
>> we need to switch the database from Oracle to Postgres.
>> Our implementation use Cayenne to map a store procedure that return single
>> type data and a cursor.
>> With single type data ( number, varchar  .... ) there's no problem. All
>> works fine.
>> The problem happens when we try to get data from a cursor. We mapped it in
>> data-map xml file as "OTHER". When we execute it the cursor is empty ( but
>> it must have a list of elements ).
>> 
>> We suppose that the "missing" part for Postgress is this one :
>> 
>> Procedure proc = getProcedure();
>> Iterator it = proc.getCallOutParameters().iterator();
>> while (it.hasNext()) {
>>        ProcedureParameter param = (ProcedureParameter) it.next();
>>         if (param.getType() == Types.OTHER) {
>>                 param.setType(OracleAdapter.getOracleCursorType());
>>          }
>> }
>> 
>> With Oracle we set the OTHER parameter type as "OracleCursorType". There is
>> a corresponding type for Postgress?
>> Maybe this is the problem, maybe no ... someone have any idea?
>> 
>> Thanks!
> 
> 

Reply via email to