Re: strange java query behaviour

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: strange java query behaviour
Дата
Msg-id CABRT9RB8v-gcxOT6rHxRim+_oiQpwKmcz0nUoKSaKyQMmJURPQ@mail.gmail.com
обсуждение исходный текст
Ответ на strange java query behaviour  (Szymon Guz <mabewlun@gmail.com>)
Ответы Re: strange java query behaviour
Re: strange java query behaviour
Список pgsql-general
On Mon, Oct 24, 2011 at 23:23, Szymon Guz <mabewlun@gmail.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

В списке pgsql-general по дате отправления:

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: unnest and string_to_array on two columns
Следующее
От: Szymon Guz
Дата:
Сообщение: Re: strange java query behaviour