Re: PL/Java issues - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: PL/Java issues
Date
Msg-id 3FF9D526.1020505@dunslane.net
Whole thread Raw
In response to Re: PL/Java issues  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:

>Andrew Dunstan wrote:
>  
>
>>Will we need to address this TODO item:
>>
>>  . Add capability to create and call PROCEDURES
>>
>>before proceding to do PL/Java? It would add to the usefulness
>>greatly, I should think. I'm not sure how hard it would be.
>>    
>>
>
>This should be relatively easy if you omit OUT parameters.  Just treat 
>CALL foo(...) as SELECT foo(...) and throw away the result (or avoid 
>generating one).
>  
>

That did occur to me. Perhaps in a similar vein we could treat CREATE 
PROCEDURE as being the same as CREATE FUNCTION but without a return 
type? I seem to recall someone asking for that quite recently, anyway.

>For OUT parameters, we'd probably have to learn their full semantics 
>first.
>
>  
>

As an old Ada programmer, I am quite familiar with the basic semantics 
:-) I see that the grammar actually has provision currently for 
IN/OUT/INOUT (although they cause "feature not supported" errors) which 
is slightly strange without also having provision for parameter names, 
which is not in the grammar at all.

The draft standard for SQL/JRT contains some interesting examples, 
including having a procedure return a result set via an implicit (from 
the SQL point of view) parameter (It's not clear if you can use this 
mechanism to return multiple result sets, but I assume you can).

cheers

andrew





pgsql-hackers by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: documentation bug?
Next
From: Andrew Dunstan
Date:
Subject: logging statement levels