pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
To: maillist@remo.demon.co.uk
Cc: pgsql-sql@PostgreSQL.org
Cc: pgsql-hackers@PostgreSQL.org
Subject: Re: [SQL] RULE questions.
Date: Thu, 11 Feb 1999 07:33:00 -0500 (EST)
Message-ID: <m10AvIi-0000c1C@druid.net> (raw)
In-Reply-To: <000801be55a7$71f71470$c6cb9284@towhee.gssec.bt.co.uk>

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@{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.



view thread (10+ messages)  latest in thread

Message-ID: <m10AvIi-0000c1C@druid.net>
Permalink:  ../m10AvIi-0000c1C@druid.net/
Also on:    postgresql.org/message-id/m10AvIi-0000c1C@druid.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: darcy@druid.net, maillist@remo.demon.co.uk, pgsql-hackers@PostgreSQL.org
  Subject: Re: [SQL] RULE questions.
  In-Reply-To: <m10AvIi-0000c1C@druid.net>
  References: <000801be55a7$71f71470$c6cb9284@towhee.gssec.bt.co.uk> <m10AvIi-0000c1C@druid.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox