Skip site navigation (1) Skip section navigation (2)

access public relation from a private database

From: "Joey K(dot)" <pguser(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: access public relation from a private database
Date: 2008-09-29 12:13:21
Message-ID: 467669b30809290513l603d51d0r91e64ab7680b16d5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
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?

Thanks,
Steve

Responses

pgsql-general by date

Next:From: Tino WildenhainDate: 2008-09-29 12:18:56
Subject: Re: access public relation from a private database
Previous:From: Sam MasonDate: 2008-09-29 11:26:34
Subject: Re: PostgreSQL Cache

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group