Re: How to check if a field exists in NEW in trigger

From: "Igal (at) Lucee(dot)org" <igal(at)lucee(dot)org>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to check if a field exists in NEW in trigger
Date: 2019-08-07 22:54:33
Message-ID: 1075832c-e131-474d-5d65-572004410838@lucee.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/5/2019 11:34 AM, Michael Lewis wrote:
> As a note to the original poster, you might want to check out-
>
> https://www.postgresql.org/docs/current/citext.html

Thanks, Michael.  I'm familiar with the citext module.

There is no reason, however, for an email address to be not-lower-cased,
so while in some cases (no pun intended) it makes sense to keep the
original CaSe while performing a case insensitive comparison, when it
comes to email addresses I rather collapse the value upon insertion/update.

Since that table has many more reads than writes, I am pretty sure that
it's more performant too.

Best,

Igal

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bryn Llewellyn 2019-08-07 23:34:12 Re: Why must AUTOCOMMIT be ON to do txn control in plpgsql procedure?
Previous Message Benedict Holland 2019-08-07 21:38:16 Re: Input validation