I want to put unique constraint on columns of more than one table.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of A. Kretschmer
Sent: Wednesday, December 10, 2008 6:04 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] unique constraint on views
In resp
Thanks Filip for the User Defined Aggregates information I will look
into it, and compare its performance with the another probable
solution (explained next).
I do recall making use of arrays (then array_to_string()) to do this
kind of collapsing as a subquery in the select clause of a group by
que
I have two tables joined by a foreign key constraint:
CREATE TABLE test_master(
id SERIAL PRIMARY KEY,
foo TEXT
);
CREATE TABLE test_detail(
id SERIAL PRIMARY KEY,
master BIGINT NOT NULL REFERENCES test_master(id) ON DELETE
CASCADE ON UPDATE CASCADE,
bar TEXT
);
Is ther
*How can I get an AND search (people with Dark Hair AND who are President)?*
The two joins didn't work?
Or were they too slow ?
Best,
Oliveiros
2008/12/10 Bryce Nesbitt <[EMAIL PROTECTED]>
>
>
> Milan Oparnica wrote:
> > This is how I do it, and it runs fast:
> > select p.*
> > from test_people
Milan Oparnica wrote:
> This is how I do it, and it runs fast:
> select p.*
> from test_people p inner join test_attributes a on p.people_id =
> a.people_id
> where a."attribute" = @firstAttr or a."attribute" = @secondAttr
But that does an "or" search, not "and", returning Satan in addition to
Ob
Pascal Tufenkji wrote:
>
> SELECT distinct c.emp_id,c.institution,d.* from sip_carriere c left join
> sip_demissionaire d on d.emp_id = c.emp_id where c.emp_id = 342 ;
[snip - rows]
>
> SELECT distinct c.emp_id,c.institution,d.* from sip_carriere c left join
> sip_demissionaire d on d.emp_id = c.
"Pascal Tufenkji" <[EMAIL PROTECTED]> writes:
> I'm writing a query with a left join to a view, and the server is giving me
> a wrong result.
What PG version?
regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscrip
2008/12/10 Allan Kamau <[EMAIL PROTECTED]>
> Hi all,
> I would like to concatenate the field values of several rows in a table
> that meet some similarity criteria based on a the values of some other
> field (more like a group by). Then I would also like to also include the
> lowest value of ano
Hello,
I'm writing a query with a left join to a view, and the server is giving me
a wrong result.
SELECT emp_id,institution from sip_carriere where emp_id = 342 and
institution = 1;
emp_id | institution
+-
342 | 1
(1 row)
SELECT * from sip_demissi
Tom Lane wrote:
> Richard Huxton <[EMAIL PROTECTED]> writes:
> > That's because a quoted literal isn't necessarily a timestamp. Without
> > context it could be anything, and in the context of comparing to a date
> > the planner probably tries to make it a date.
>
> I think the real point here is t
Hi all,
I would like to concatenate the field values of several rows in a table
that meet some similarity criteria based on a the values of some other
field (more like a group by). Then I would also like to also include the
lowest value of another associated field along.
I have a table that
In response to Jyoti Seth :
> Hi All,
>
> Is it possible to add unique constraint on updateable views in postgres?
Add the constraint to the base-table.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA
Hi All,
Is it possible to add unique constraint on updateable views in postgres?
Thanks,
Jyoti Seth
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
13 matches
Mail list logo