| From: | Mija Lee <mija(at)scharp(dot)org> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: references to variable in another schema |
| Date: | 2007-11-09 18:13:23 |
| Message-ID: | 4734A343.2020501@scharp.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Works like a charm. Thanks Tom & Sean for the quick response!
Tom Lane 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);
>
> regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Tolley | 2007-11-09 19:27:17 | Re: Debugging question ... |
| Previous Message | Sean Davis | 2007-11-09 17:59:20 | Re: references to variable in another schema |