Created objects not visible
Created objects not visible
От:
Alex du Plessis <alxdp@telkomsa.net>
Дата:
Hi - I'm very new to pgsql and still very stupid. Can someone point me in the right direction pls. I run server v8.0 on an XP box and when I create new schems and tables in a database with PGAdminIII they seem to create ok. Unfortunately, everything created is not visible outside of PGAdminIII. can't even see anything with psql. What am I doing wrong? Regards Alex
Re: Created objects not visible
От:
Kretschmer Andreas <andreas_kretschmer@despammed.com>
Дата:
Alex du Plessis schrieb:
> Hi - I'm very new to pgsql and still very stupid. Can someone point me in
> the right direction pls.
>
> I run server v8.0 on an XP box and when I create new schems and tables in a
> database with PGAdminIII they seem to create ok. Unfortunately, everything
> created is not visible outside of PGAdminIII. can't even see anything with
> psql. What am I doing wrong?
I guess, you must set the search_path to the correct schema. A little
example:
test=> create schema foo;
CREATE SCHEMA
test=> create table foo.footest (id int);
CREATE TABLE
test=> \d footest
Did not find any relation named "footest".
-- the schema foo is not in the search_path
-- you must specify the path
test=> \d foo.footest
Table "foo.footest"
Column | Type | Modifiers
--------+---------+-----------
id | integer |
-- now i set the search_path
test=> set search_path=foo,public;
SET
-- and now i have the schema foo in my search_path
test=> \d footest
Table "foo.footest"
Column | Type | Modifiers
--------+---------+-----------
id | integer |
Regards, Andreas
--
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung. Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org) GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)
Re: Created objects not visible
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Kretschmer Andreas writes: > Alex du Plessis schrieb: >> I run server v8.0 on an XP box and when I create new schems and tables in a >> database with PGAdminIII they seem to create ok. Unfortunately, everything >> created is not visible outside of PGAdminIII. can't even see anything with >> psql. What am I doing wrong? > I guess, you must set the search_path to the correct schema. Or it might be simpler yet: maybe Alex is connecting to a different database (within the same installation) with psql than he is with PGAdmin. What exactly do you mean by "not visible"? What operations did you try to use to access the new objects? regards, tom lane