pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedCREATE FUNCTION with JDBC
3+ messages / 2 participants
[nested] [flat]
* CREATE FUNCTION with JDBC
@ 2005-05-23 21:48 Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Kellerer @ 2005-05-23 21:48 UTC (permalink / raw)
To: pgsql-jdbc
Hello,
I was using a Java based front end to PG and tried to create a function
that I could use for a trigger.
CREATE OR REPLACE FUNCTION trg_func_ucase() RETURNS trigger AS
$trg$
BEGIN
NEW.name = upper(NEW.name);
END;
$trg$
language 'plpgsql';
I kept getting an error message
ERROR: unterminated dollar-quoted string at or near "$trg$
As the statement works with psql, I thought this might be a problem of my
JDBC frontend, so I create a simple test program which sends the above
string using execute() (tried executeUpdate() as well) to the database, and
I'm getting the same error.
When I use single quotes around the function body everything works fine
through plain JDBC. This means a use disadvantage for any Java based
frontend (as I have to deal with the old clumsy quoting again), and I'm
wondering if this is a bug in the driver, or simply not supposed to work.
In any case: is there any chance of getting this fixed?
I'm using PG 8.0.2 on Win2000 and the JDBC driver is 8.0-311
Cheers
Thomas
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: CREATE FUNCTION with JDBC
@ 2005-05-23 22:05 Kris Jurka <books@ejurka.com>
parent: Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 1 reply; 3+ messages in thread
From: Kris Jurka @ 2005-05-23 22:05 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc
On Mon, 23 May 2005, Thomas Kellerer wrote:
> [dollar quoting doesn't work with the JDBC driver]
This is a known issue.
> In any case: is there any chance of getting this fixed?
>
Sure, we're not opposed to fixing it, just haven't found the time. Of
course, since this was brought to our attention eight months ago, I
wouldn't hold my breath.
http://archives.postgresql.org/pgsql-jdbc/2004-09/msg00062.php
Kris Jurka
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: CREATE FUNCTION with JDBC
@ 2005-05-23 22:17 Thomas Kellerer <spam_eater@gmx.net>
parent: Kris Jurka <books@ejurka.com>
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Kellerer @ 2005-05-23 22:17 UTC (permalink / raw)
To: pgsql-jdbc
Kris Jurka wrote on 24.05.2005 00:05:
>>[dollar quoting doesn't work with the JDBC driver]
>
> This is a known issue.
>
>>In any case: is there any chance of getting this fixed?
>>
>
> Sure, we're not opposed to fixing it, just haven't found the time. Of
> course, since this was brought to our attention eight months ago, I
> wouldn't hold my breath.
Thanks for the quick response.
It's not a big deal for me right now, so I might be able to wait :)
Cheers
Thomas
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-05-23 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-23 21:48 CREATE FUNCTION with JDBC Thomas Kellerer <spam_eater@gmx.net>
2005-05-23 22:05 ` Kris Jurka <books@ejurka.com>
2005-05-23 22:17 ` Thomas Kellerer <spam_eater@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox