pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Igal @ Lucee.org <igal@lucee.org>
To: Michael Lewis <mlewis@entrata.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: How to check if a field exists in NEW in trigger
Date: Wed, 7 Aug 2019 15:54:33 -0700
Message-ID: <1075832c-e131-474d-5d65-572004410838@lucee.org> (raw)
In-Reply-To: <CAHOFxGp0zRh7xkFu8o5cDtdKT=pR_AmWeLa-3STMkPFzn6v80A@mail.gmail.com>
References: <0cc87310-590f-740e-977d-bcdde57eef1b@lucee.org>
	<37107788-df16-ca5f-3193-6176fe40f282@gmx.net>
	<CAFj8pRA7XM3SL2Dp9=_SJk6v7Us+4N42HXK7OSEUFrKv-ibV5A@mail.gmail.com>
	<ea13f32c-492c-4215-1308-aa12039104b6@gmx.net>
	<CAFj8pRDneNppu6hHTQSnvnpnC8+QLG+XxefT3fECh=fyRYZ3ow@mail.gmail.com>
	<CAHOFxGp0zRh7xkFu8o5cDtdKT=pR_AmWeLa-3STMkPFzn6v80A@mail.gmail.com>

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







view thread (10+ messages)  latest in thread

Message-ID: <1075832c-e131-474d-5d65-572004410838@lucee.org>
Permalink:  ../1075832c-e131-474d-5d65-572004410838@lucee.org/
Also on:    postgresql.org/message-id/1075832c-e131-474d-5d65-572004410838@lucee.org

 · 

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-general@postgresql.org
  Cc: igal@lucee.org, mlewis@entrata.com
  Subject: Re: How to check if a field exists in NEW in trigger
  In-Reply-To: <1075832c-e131-474d-5d65-572004410838@lucee.org>
  References: <0cc87310-590f-740e-977d-bcdde57eef1b@lucee.org> <37107788-df16-ca5f-3193-6176fe40f282@gmx.net> <CAFj8pRA7XM3SL2Dp9=_SJk6v7Us+4N42HXK7OSEUFrKv-ibV5A@mail.gmail.com> <ea13f32c-492c-4215-1308-aa12039104b6@gmx.net> <CAFj8pRDneNppu6hHTQSnvnpnC8+QLG+XxefT3fECh=fyRYZ3ow@mail.gmail.com> <CAHOFxGp0zRh7xkFu8o5cDtdKT=pR_AmWeLa-3STMkPFzn6v80A@mail.gmail.com> <1075832c-e131-474d-5d65-572004410838@lucee.org>

* 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