Re: access public relation from a private database

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: "Joey K(dot)" <pguser(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: access public relation from a private database
Date: 2008-09-29 12:18:56
Message-ID: 48E0C7B0.6020208@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joey K. wrote:
>
> Hello,
>
> I've created a table in public schema,
> CREATE TABLE public.foo (fooid SERIAL);
>
>
> When I try to create a table in database nowhere that references
> public.foo table,
>
> CREATE DATABASE nowhere;
> \c nowhere;
> CREATE TABLE bar (bar integer REFERENCES public.foo(fooid));
>
> I get, ERROR: relation "public.foo" does not exist.
>
> Can I reference public relations from private database?

You cannot. But you can create a private schema along
the public one above in the same database.

Regards
Tino

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2008-09-29 12:28:25 Re: access public relation from a private database
Previous Message Joey K. 2008-09-29 12:13:21 access public relation from a private database