From: | Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr> |
---|---|
To: | Kris Jurka <jurka(at)ejurka(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Calling functions with table-based-type parametars |
Date: | 2007-02-27 12:24:18 |
Message-ID: | 1172579058.11691.17.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Mon, 2007-02-26 at 10:53 -0700, Kris Jurka wrote:
> Mario Splivalo wrote:
> >> This is saying you need to write it with a cast from the row to the table
> >> type:
> >>
> >> conn.prepareCall("{call f1(ROW(?, ?)::t1)}")
> >
> > Can't do that either. Postgres tells me that there is no type t1:
> >
> > 2007-02-26 18:25:19.004 CET [10324] <jura> PARSEERROR: type "t1" does
> > not exist
> >
> > I even tried creating type _t1 wich has same member variables as table
> > rows, and created function f2 wich takes _t1 as parametar, still same
> > error: type "_t1" does not exsit.
> >
>
> The attached test case works fine for me without a cast. Perhaps you
> can modify this to show the failure you're getting.
>
As it turns out, it was permissions problem. I created the table and the
function as the database owner. But, there is user set up for
tomcat/jdbc, and all data manipulation is done trough psql functions.
Now, that user has GRANT EXECUTE ON f1(t1) TO jdbcuser;
Still, when I try to SELECT f1 from psql, connected as uset jdbcuser, I
get the ERROR: function f1(record) does not exist.
If I try it with dbowner user, everything works fine. Now I don't know
how to set up permisions, but that's for another mailing list.
Thank you for your effort, Kris.
Mario
From | Date | Subject | |
---|---|---|---|
Next Message | Mario Splivalo | 2007-02-27 12:37:03 | Re: Calling functions with table-based-type parametars |
Previous Message | Stephen Denne | 2007-02-27 10:46:33 | Re: Minor performance improvements |