Re: [SQL] RULE questions.

From: "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net>
To: maillist(at)remo(dot)demon(dot)co(dot)uk (Neil Burrows)
Cc: pgsql-sql(at)PostgreSQL(dot)org, pgsql-hackers(at)PostgreSQL(dot)org
Subject: Re: [SQL] RULE questions.
Date: 1999-02-11 12:33:00
Message-ID: m10AvIi-0000c1C@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Thus spake Neil Burrows
> First off, is there an easier way to ensure that data is stored in uppercase
> for certain columns (not the whole table). And if not does anyone have
> comments on performance issues, or ways of stopping users accidentally or
> intentionally inserting lower case data straight into the table rather than
> the view?

This makes me think of two features missing in PostgreSQL that I would
love to see. I know it's probably to late to think about it now for
6.5 but I wonder what others think about this.

First, as suggested above, how about an option to automatically convert
data to upper case on entry? I realize that triggers can do the job but
it seems to be needed often enough that putting it into the definition
for the field seems useful. I guess a lower option would make sense too.

Second, an option to CREATE INDEX to make the index case insensitive.
Other RDBMS systems do this and it is nice not to depend on users being
consistent when entering names. Consider ("albert", "Daniel", "DENNIS")
which would sort exactly opposite. Also, in a primary key field (or
unique index) it would be nice if "A" was rejected if "a" already was
in the database.

Thoughts?

Followups to hackers.

--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Burrows 1999-02-11 12:34:12 RE: [SQL] RULE questions.
Previous Message Jan Wieck 1999-02-11 12:13:37 Re: [SQL] RULE questions.

Browse pgsql-sql by date

  From Date Subject
Next Message Neil Burrows 1999-02-11 12:34:12 RE: [SQL] RULE questions.
Previous Message George Moga 1999-02-11 12:21:50 Re: [SQL] Select max field