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

Re: references to variable in another schema

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 (view raw or flat)
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

In response to

pgsql-novice by date

Next:From: Josh TolleyDate: 2007-11-09 19:27:17
Subject: Re: Debugging question ...
Previous:From: Sean DavisDate: 2007-11-09 17:59:20
Subject: Re: references to variable in another schema

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