Re: access public relation from a private database - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: access public relation from a private database
Date
Msg-id 48E0C7B0.6020208@wildenhain.de
Whole thread Raw
In response to access public relation from a private database  ("Joey K." <pguser@gmail.com>)
List 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

Attachment

pgsql-general by date:

Previous
From: "Joey K."
Date:
Subject: access public relation from a private database
Next
From: "A. Kretschmer"
Date:
Subject: Re: access public relation from a private database