Hi folks,
The list was extremely helpful on my last bit of esoterica, so I
thought that I'd ask something else that is holding me up.
Imagine a PLpgSQL function defined as:
CREATE OR REPLACE FUNCTION do_stuff (text[])
RETURNS INTEGER
AS
'
[... do stuff ...]
' LANGUAGE pgplsql;
I need to call this function via a CallableStatement in JDBC. I know
that you can set that up like:
CallableStatement stmt = conn.prepareCall ("{ ? = call do_stuff
(?::text[]) }";
stmt.registerOutParameter (1, Types.INTEGER);
stmt.setObject (2, "{x, y, z}")
But what can I do when one of the input strings x, y, or z has a comma
in it? How can I escape the comma so that the stored procedure will
still see a text array of three elements?
Thanks!
Eli Bingham
SavageBeast Technologies