From: Hannu Krosing <hannu@trust.ee>
To: pgsql-hackers@postgreSQL.org
Cc: Neil Burrows <maillist@remo.demon.co.uk>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [HACKERS] Re: [SQL] RULE questions.
Date: Thu, 11 Feb 1999 19:39:47 +0200
Message-ID: <36C315E3.24CD16C3@trust.ee> (raw)
References: <m10AvIi-0000c1C@druid.net>
D'Arcy J.M. Cain wrote:
>
> 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.
These could probably be implemened more effectively using rules. Having
the
rules generated automatically for simple cases would of course be nice,
but a warning at least should be given to user about creating the rule,
like it's currently done with primary key.
Or maybe it would be better to support virtual fields, like this :
create table people(
first_name varchar(25),
last_name varchar(25),
upper_first_name VIRTUAL upper(first_name),
upper_last_name VIRTUAL upper(last_name),
full_name VIRTUAL (upper_first_name || ' ' || upper_last_name)
primary key
);
and then untangle this in the backend and create required rules and
indexes automatically ?
> Second, an option to CREATE INDEX to make the index case insensitive.
If you have this option on idex, how do you plan to make sure that the
index is actually used ?
It may be better to do it explicitly -
1. create index on upper(field)
2. use where upper(field) = 'MYDATA'
---------------
Hannu
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: hannu@trust.ee, pgsql-hackers@postgreSQL.org, maillist@remo.demon.co.uk
Subject: Re: [HACKERS] Re: [SQL] RULE questions.
In-Reply-To: <36C315E3.24CD16C3@trust.ee>
References: <m10AvIi-0000c1C@druid.net> <36C315E3.24CD16C3@trust.ee>
* 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