Re: selecting other schema's as the public one from php

Поиск
Список
Период
Сортировка
От Sean Davis
Тема Re: selecting other schema's as the public one from php
Дата
Msg-id 46F2C42C.6050301@mail.nih.gov
обсуждение исходный текст
Ответ на Re: selecting other schema's as the public one from php  (Michael Cochez <michaelcochez@yahoo.com>)
Список pgsql-novice
Michael Cochez wrote:
> Thanks for you quick reply, meanwhile I've found some kind of solution
> (but I'm not realy shure about what I'm doing actualy)
> I use "SELECT * FROM schemaname.tablename" and so I can select from the
> table I created, this seems to work too when creating views to go beyond
> the boundaries of the current schema.

What you are doing above is perfectly acceptable and is preferred over
what I showed.

> The search_path change worked to, but what are you doing when you type this?
> Are you enlarging some kind of local scope with the objects inside that
> schema or something?

Yep.  Basically, you expand the scope when looking for objects to be
first found in NEWSCHEMA and then in public.  Obviously, it is possible
to mask tables in public by having the same table name in NEWSCHEMA.
Hence, you probably want to go with the solution you give (and not
mine).  Sorry for putting out misinformation.

Sean

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

Предыдущее
От: Michael Cochez
Дата:
Сообщение: Re: selecting other schema's as the public one from php
Следующее
От: "T W"
Дата:
Сообщение: inheritance is madness