Re: Inconsistency between PgAdmin III GUI and SQL window ?

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: Inconsistency between PgAdmin III GUI and SQL window ?
Дата
Msg-id 1413932176175-5823868.post@n5.nabble.com
обсуждение исходный текст
Ответ на Inconsistency between PgAdmin III GUI and SQL window ?  (Daniel Begin <jfd553@hotmail.com>)
Список pgsql-general
Daniel Begin wrote
> I have first to admit the inconsistency is probably on my side!-)
>
> The task - I want to clone a table I created in public schema in another
> schema (xxx) of the same database.
> The problem - I get an error message when creating the table using the
> original SQL script: ERROR: type "geography" does not exist.
>
> I understand from
> "http://stackoverflow.com/questions/9067335/how-to-create-table-inside-speci
> fic-schema-by-default-in-postgres" that the original script should work if
> I
> set the search path to the destination schema (xxx) prior to execute the
> script (set search_path to xxx ;) but the PgAdmin III SQL window does not
> seem aware of the geography type.
>
> What I do not understand is that using the GUI (contextual menu. new table
> .
> new column.) within schema xxx, I can create the table as expected, and
> the
> geography type is recognized.  Any idea about what is going on when using
> the SQL window?

The geography type is not native to PostgreSQL and so does not exist in the
pg_catalog schema - which is the only schema that you get implicitly.  If
you set a new search_path and want to see the geography type you have to
include the schema into which you installed it in the search_path
specification.

Assuming you installed it into "postgis" you would need:

SET search_path = xxx, postgis;

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Inconsistency-between-PgAdmin-III-GUI-and-SQL-window-tp5823862p5823868.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Daniel Begin
Дата:
Сообщение: Inconsistency between PgAdmin III GUI and SQL window ?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Inconsistency between PgAdmin III GUI and SQL window ?