Search Postgresql Archives

Re: Upsert Functionality using CTEs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux