Re: Upsert Functionality using CTEs

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: Alban Hertroys <haramrae(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Upsert Functionality using CTEs
Date: 2013-02-11 10:26:49
Message-ID: CAGuHJrPqk7NaafqR-Z6Qc2j7ZkJ7bCSWmm8R+4prU1zx5ZszOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> The best strategy is fixing your data-model so that you have a unique key. As you found out already, e-mail addresses aren't very suitable as unique keys for people. For this particular case I'd suggest adding a surrogate key.
>
> Alternatively, you might try using (first_name, email) as your key. You'll probably still get some duplicates, but they should be less and perhaps few enough for your case.
>

Yea I'll have to see if I can do a better match.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message P. Broennimann 2013-02-11 10:33:39 Issue installing an extension
Previous Message Roger Niederland 2013-02-11 09:05:14 undefined symbol: SPI_plan_get_cached_plan