On Tue, 08 Apr 2014 15:53:48 -0600
CS_DBA wrote:
> Not sure yet (new client)... for now they simply want to force the
> template column to be a valid cust_id, if it is not null...
It seems to be a different version of the textbook exercice involving
EMPLOYEE_ID and MANAGER_ID.
--
Alberto Cabel
Based on your first question a customer id itself is not a valid designator;
you have to specify (or link) in the group as well.
Not tested but should work:
FOREIGN KEY (template, group) REFERENCES customer (cust_id, group)
Depends on whether you want to allow cross-group associations if you nee
On 04/08/2014 04:08 PM, Rob Sargent wrote:
On 04/08/2014 03:53 PM, CS_DBA wrote:
On 04/08/2014 03:41 PM, Rob Sargent wrote:
On 04/08/2014 03:36 PM, CS_DBA wrote:
On 04/08/2014 03:31 PM, Rob Sargent wrote:
On 04/08/2014 03:26 PM, CS_DBA wrote:
On 04/08/2014 03:17 PM, Rob Sargent wrote:
O
On 04/08/2014 03:53 PM, CS_DBA wrote:
On 04/08/2014 03:41 PM, Rob Sargent wrote:
On 04/08/2014 03:36 PM, CS_DBA wrote:
On 04/08/2014 03:31 PM, Rob Sargent wrote:
On 04/08/2014 03:26 PM, CS_DBA wrote:
On 04/08/2014 03:17 PM, Rob Sargent wrote:
On 04/08/2014 03:09 PM, CS_DBA wrote:
On 04/
On 04/08/2014 03:41 PM, Rob Sargent wrote:
On 04/08/2014 03:36 PM, CS_DBA wrote:
On 04/08/2014 03:31 PM, Rob Sargent wrote:
On 04/08/2014 03:26 PM, CS_DBA wrote:
On 04/08/2014 03:17 PM, Rob Sargent wrote:
On 04/08/2014 03:09 PM, CS_DBA wrote:
On 04/08/2014 02:58 PM, Rob Sargent wrote:
O
On 04/08/2014 03:36 PM, CS_DBA wrote:
On 04/08/2014 03:31 PM, Rob Sargent wrote:
On 04/08/2014 03:26 PM, CS_DBA wrote:
On 04/08/2014 03:17 PM, Rob Sargent wrote:
On 04/08/2014 03:09 PM, CS_DBA wrote:
On 04/08/2014 02:58 PM, Rob Sargent wrote:
On 04/08/2014 02:51 PM, CS_DBA wrote:
Hi All
On 04/08/2014 03:31 PM, Rob Sargent wrote:
On 04/08/2014 03:26 PM, CS_DBA wrote:
On 04/08/2014 03:17 PM, Rob Sargent wrote:
On 04/08/2014 03:09 PM, CS_DBA wrote:
On 04/08/2014 02:58 PM, Rob Sargent wrote:
On 04/08/2014 02:51 PM, CS_DBA wrote:
Hi All
we have a table like so:
customer (
On 04/08/2014 03:26 PM, CS_DBA wrote:
On 04/08/2014 03:17 PM, Rob Sargent wrote:
On 04/08/2014 03:09 PM, CS_DBA wrote:
On 04/08/2014 02:58 PM, Rob Sargent wrote:
On 04/08/2014 02:51 PM, CS_DBA wrote:
Hi All
we have a table like so:
customer (
cust_id integer not null
On 04/08/2014 03:17 PM, Rob Sargent wrote:
On 04/08/2014 03:09 PM, CS_DBA wrote:
On 04/08/2014 02:58 PM, Rob Sargent wrote:
On 04/08/2014 02:51 PM, CS_DBA wrote:
Hi All
we have a table like so:
customer (
cust_id integer not null primary key,
cust_group_id int
On 04/08/2014 03:09 PM, CS_DBA wrote:
On 04/08/2014 02:58 PM, Rob Sargent wrote:
On 04/08/2014 02:51 PM, CS_DBA wrote:
Hi All
we have a table like so:
customer (
cust_id integer not null primary key,
cust_group_id integer not null,
group_account_idinteger no
On 04/08/2014 02:58 PM, Rob Sargent wrote:
On 04/08/2014 02:51 PM, CS_DBA wrote:
Hi All
we have a table like so:
customer (
cust_id integer not null primary key,
cust_group_id integer not null,
group_account_idinteger not null,
cust_name varchar
On 04/08/2014 02:51 PM, CS_DBA wrote:
Hi All
we have a table like so:
customer (
cust_id integer not null primary key,
cust_group_id integer not null,
group_account_idinteger not null,
cust_name varchar not null,
...
)
we want to force the cust_
Hi All
we have a table like so:
customer (
cust_id integer not null primary key,
cust_group_id integer not null,
group_account_idinteger not null,
cust_name varchar not null,
...
)
we want to force the cust_group_id to be unique across all
group
"Tim Rupp" <[EMAIL PROTECTED]> writes:
> where start_time >= '2008-01-01'::date AND start_time < '2008-01-10'::date
>
> should give the same rows as
>
> where start_time >= '2008-01-01'::date AND end_time <= '2008-01-09'::date
I think you'll need to do the same thing to the constraints as well. Y
On Jan 24, 2008 9:47 AM, Tom Lane <[EMAIL PROTECTED]> wrote:
> "Tim Rupp" <[EMAIL PROTECTED]> writes:
> > ... a bunch of inherited tables that have the following constraint
>
> > CHECK (start_time >= '2008-01-01'::date AND end_time < '2008-01-01'::date)
>
> > and when i do the same query (as in the
"Tim Rupp" <[EMAIL PROTECTED]> writes:
> ... a bunch of inherited tables that have the following constraint
> CHECK (start_time >= '2008-01-01'::date AND end_time < '2008-01-01'::date)
> and when i do the same query (as in the documentation) on the table, I
> get a bunch of sequential scans in th
Hi list, I was looking for a bit of clarification on a check
constraint that I have on some tables.
I was following the example in the partitioning documentation
http://www.postgresql.org/docs/8.2/interactive/ddl-partitioning.html
And got it to work, but when I tried to apply the same idea to my
17 matches
Mail list logo