Re: BUG #5753: Existing Functions No Longer Work

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: vince maxey <vamax27(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5753: Existing Functions No Longer Work
Date: 2010-11-17 05:03:30
Message-ID: 4CE36222.4090609@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 17/11/10 05:42, vince maxey wrote:

> You are speaking to me entirely in abstract, where I have provided you with
> several concrete examples of functions that work when called from the java
> application.

I've only been following this thread broadly, but I haven't seen a
complete and self-contained test case (Java example code, and SQL
database creation script) that demonstrates the issue yet. Where's the
executable .jar and source .zip ?

When I had issues with PostgreSQL and JDBC (specifically, with client
certificate support) I wrote a simple, self-contained test case that
clearly demonstrated the problem. This meant that everybody could test
it easily, could see what was going on, and was working with the same
thing. Getting from there to a fix was much easier as a result.

Consider doing the same. I'd be testing and trying to help if there was
enough information in this thread to do so without spending lots of my
time on it - time I'm not working for pay, or doing something more fun.

> I'm telling you that something is different between 8.1 and 9.0 and all you are
> offering are conceptual excerpts from your own documentation.

You've offered only incomplete views of part of what you're doing too,
so I'd hesitate to push this too hard onto the people who've been
spending their time trying to help you.

Your original post doesn't provide the code that's executing the
queries, and your follow-up would still require a bunch of work to turn
into an executable test case. Tom in particular doesn't do all that much
with Java, and probably won't be taking the time to write a test-case
for you.

Even now, I can't find any mention of the JDBC driver version you're
using in these tests.

> I've worked extensively with SQL Server, IBM, Sybase and Oracle. I know how to
> write and test stored procedures.

Unfortunately, PostgreSQL does not really support stored procedures. It
supports stored *functions* that run within the context of a normal SQL
statement, but your function still runs within a SELECT and is
restricted in its control over transactions among other things.

The JDBC driver maps the JDBC stored procedure call syntax to call a Pg
stored function. This works rather well, though I hate to think how
it'll be handled when real stored procedures are implemented at some point.

I'm not sure this matters much in the context of your current issue, but
it's worth bearing in mind.

--
System & Network Administrator
POST Newspapers

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-11-17 16:05:30 Re: BUG #5755: Query Optimzer Bug
Previous Message Elliott Groszek 2010-11-16 22:39:07 BUG #5755: Query Optimzer Bug