From: Matthew B. <mat...@ou...> - 2006-03-21 09:58:23
|
Peter Crowther wrote: >> From: Matthew Buckett >> Nulls don't end up in the index on PostgreSQL > > Ah. Oh. Oh dear. > >> Sounds like this is a PostgreSQL/MSSQL/HSQLDB difference. > > It is. Not sure whether / which way ANSI mandates this, but (as we've > seen) the behaviour cannot be relied upon. And MSSQL doesn't support partial indexes either? CREATE UNIQUE INDEX uploaded_files_unq_name ON uploaded_files (parent_uploaded_file_id, name) WHERE parent_uploaded_file_id IS NOT NULL -- -- Matthew Buckett, VLE Developer -- Learning Technologies Group, Oxford University Computing Services -- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/ |