[SQL] unique index on more than one field using functions

2001-07-23 Thread Domingo Alvarez Duarte
I'm trying create a unique index using more than one field and applying a function in one field to achieve case insensitive uniqueness but postgresql doesn't accept. create table a( id int primary key, id2 int not null, name varchar(50), unique(id2, lower(name)) ); Anyone have an i

[SQL] using LATIN1 ?

2001-09-14 Thread Domingo Alvarez Duarte
I've compiled postgresql with multi-byte support, and created a database with: create database l1 with encoding 'LATIN1'; It was created succefull. I started "psql l1" and issued this query "select upper('á')" and get back "á" expected "Á". I created a table with "create table test(f varchar(5

[SQL] A bug in triggers PG 7.1.3 or misunderstand ?

2001-09-27 Thread Domingo Alvarez Duarte
I have this database and it was working with PG 7.1.2 !!! When I try to delete a record the trigger is fired but the delete is not executed. ---code start here drop database test_trig; create database test_trig; \connect test_trig -- -- TOC Entry ID 2 (OID 818

Re: [SQL] A bug in triggers PG 7.1.3 or misunderstand ?

2001-10-02 Thread Domingo Alvarez Duarte
[EMAIL PROTECTED] (Tom Lane) wrote in message news:<[EMAIL PROTECTED]>... > I think you need "return old", not "return new", in the body of the > trigger if you want the delete to take place. new would be NULL in > a delete situation ... > > regards, tom lane > > -