From: | "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Mija Lee" <mija(at)scharp(dot)org>, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: references to variable in another schema |
Date: | 2007-11-09 17:59:20 |
Message-ID: | 264855a00711090959r1ed3dbbbra14dda1241a25ddd@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Nov 9, 2007 12:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Mija Lee <mija(at)scharp(dot)org> writes:
> > I wanted to put a reference on a table in the public schema that
> > references a column in a table in another schema. I tried:
>
> > create table cellphone(emplid integer not null references
> > admin.tbl_employee.employee_id);
>
> Should be
>
> create table cellphone(emplid integer not null
> references admin.tbl_employee(employee_id));
>
> Or, if employee_id is the declared primary key of tbl_employee, you can
> just say
>
> create table cellphone(emplid integer not null
> references admin.tbl_employee);
Thanks, Tom. I was woefully off-target.
Sean
From | Date | Subject | |
---|---|---|---|
Next Message | Mija Lee | 2007-11-09 18:13:23 | Re: references to variable in another schema |
Previous Message | Tom Lane | 2007-11-09 17:56:43 | Re: references to variable in another schema |