Re: ERROR: relation "employees" does not exist - Mailing list pgsql-general

From Alban Hertroys
Subject Re: ERROR: relation "employees" does not exist
Date
Msg-id CAF-3MvOYgtug4UATUrixcfKagaReKhaWHTvyE7qo3C1npZ0z3A@mail.gmail.com
Whole thread Raw
In response to ERROR: relation "employees" does not exist  (Csanyi Pal <csanyipal@gmail.com>)
List pgsql-general
On 11 March 2013 07:39, Csanyi Pal <csanyipal@gmail.com> wrote:
but when I run the command:
CREATE TABLE employee_schedule (
  id serial,
  employee_id integer REFERENCES employees(id),
  start_time timestamptz,
  end_time timestamptz
);

I get an error message:

NOTICE:  CREATE TABLE will create implicit sequence
"employee_schedule_id_seq" for serial column "employee_schedule.id"
ERROR:  relation "employees" does not exist

So how can I solve this problem?

You have a foreign key reference (employee_id) to a table (employees) that can't be found in your search_path. 

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: restoring to different architecture with WAL
Next
From: Albe Laurenz
Date:
Subject: Re: Avoiding a deadlock