creating temporary table PostgreSql 8.1 and iBatis 2.3

Started by tomasz brymoraalmost 19 years ago3 messagesgeneral
Jump to latest
#1tomasz brymora
tomekpilot@yahoo.com

Greetings!

I've build a script in pgAdmin 3 ( os x 10.4 on ppc) that does a select, some left outer joins and puts the results into a temporary table. Works great when I run in pgAdmin.

Then I try to use in an iBatis sqlmap as a 'select' and get this when trying to execute it:

org.postgresql.util.PSQLException: ERROR: must be member of role "postgres"

Other than that queries run fine.
I'm thinking the problem is on the db admin side of things, but I'm at a loss as to how to start fixing it.

I'll greatly appreciate any feedback.

Thank you in advance.

#2Kris Jurka
books@ejurka.com
In reply to: tomasz brymora (#1)
Re: [JDBC] creating temporary table PostgreSql 8.1 and iBatis 2.3

On Fri, 22 Jun 2007, tomasz brymora wrote:

I've build a script in pgAdmin 3 ( os x 10.4 on ppc) that does a select,
some left outer joins and puts the results into a temporary table. Works
great when I run in pgAdmin.

Then I try to use in an iBatis sqlmap as a 'select' and get this when
trying to execute it:

org.postgresql.util.PSQLException: ERROR: must be member of role
"postgres"

Other than that queries run fine. I'm thinking the problem is on the db
admin side of things, but I'm at a loss as to how to start fixing it.

Knowing the SQL that it actually executed would be valuable.

Kris Jurka

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kris Jurka (#2)
Re: [JDBC] creating temporary table PostgreSql 8.1 and iBatis 2.3

Kris Jurka <books@ejurka.com> writes:

On Fri, 22 Jun 2007, tomasz brymora wrote:

I've build a script in pgAdmin 3 ( os x 10.4 on ppc) that does a select,
some left outer joins and puts the results into a temporary table. Works
great when I run in pgAdmin.

Then I try to use in an iBatis sqlmap as a 'select' and get this when
trying to execute it:

org.postgresql.util.PSQLException: ERROR: must be member of role
"postgres"

Knowing the SQL that it actually executed would be valuable.

Indeed. A quick scan of the backend source says that that message is
only issued if you try to give away ownership of something to a role you
are not a member of (this means ALTER OWNER and the options of CREATE
DATABASE/CREATE SCHEMA that give the object some other owner than
yourself). So there's something you didn't tell us about what that
script does.

regards, tom lane