From: | Szymon Guz <mabewlun(at)gmail(dot)com> |
---|---|
To: | Marti Raudsepp <marti(at)juffo(dot)org> |
Cc: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: strange java query behaviour |
Date: | 2011-10-25 15:28:22 |
Message-ID: | CAFjNrYs5W8kXmyc5e9Yk6qYK6uG-nCnNR3M-StJD-rm-oGhuOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 25 October 2011 17:04, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
> On Mon, Oct 24, 2011 at 23:23, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:
> > String query1 = "SELECT * FROM information_schema.schemata WHERE
> schema_name = ?";
>
> > When I query the database using psql, both queries return sensible data
> > (even when I prepare statements in postgres).
> > I'd like to use information_schema rather than using pg_catalog.
>
> The documentation says: The view schemata contains all schemas in the
> current database that are owned by a currently enabled role.
>
> In other words: this view only displays schemas that are *owned* by
> your user, or roles that your current user inherits from (superuser
> sees everything of course). Sadly it doesn't list visible/accessible
> schemas.
>
> I think this is pretty surprising; not sure if it's just bad legacy or
> if there is some good reason for this behavior. I couldn't find any
> justification in the source code.
>
> I think we should add a TODO item for fixing this?
>
> Regards,
> Marti
>
Hi,
thanks for the answer. I was really my fault: I've been using user test in
the java test and postgres user in psql. I've changed the user to
postgres in java and results are OK now.
regards
Szymon
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-10-25 16:38:39 | Re: strange java query behaviour |
Previous Message | Wim Bertels | 2011-10-25 15:25:43 | GPU and pgcrypto |