Re: [SQL] Reg: Firing Trigger when a particular column value get changed

2003-09-21 Thread Kevin Houle
Thilak babu wrote: I have a scnerio as to fire a trigger when i update a particular column in a table. Please do help me out in getting thro this. The trigger function can use logic to exclude cases where a particular column does not change. For example: CREATE FUNCTION "column_update" () RETURNS

Re: [SQL] Unique Constraint Based on Date Range

2003-09-21 Thread Kevin Houle
Andrew Milne wrote: ... create table rates ( effective_date AS timestamp, expiry_date AS timestamp, cost AS numeric (12,2), access_time AS integer (in minutes) ); So for a given cost, there may not be a record where the effective date of one record overlaps the expiry date of anothe

Re: [SQL] Case Sensitive "WHERE" Clauses?

2002-09-28 Thread Kevin Houle
Jordan Reiter wrote: > Are string comparisons in postgresql case sensitive? > > I keep on having this response: > > SELECT * > FROM People > WHERE first_name='jordan' > > Result: 0 records > > SELECT * > FROM People > WHERE first_name='Jordan' > > Result: 1 record It's case-sensitive. You ca

Re: [SQL] Dublicates pairs in a table.

2002-09-27 Thread Kevin Houle
Ries van Twisk wrote: > I have a small question which I could not clearly find in the postgreSQL > manual. > > if I create this table and index > CRAEATE TABLE test ( > id SERIAL, > c1 VARCHAR(32), > c2 VARCHAR(32), > c3 VARCHAR(32) > ); > > CREATE UN