Re: Function PostgreSQL 9.2

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Function PostgreSQL 9.2
Date: 2016-04-20 22:46:02
Message-ID: 571806AA.6060607@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/20/2016 3:33 PM, drum(dot)lucas(at)gmail(dot)com wrote:
> The customer can add any value into users.code:
>
> code CHARACTER VARYING,
>
>

what if he puts in a non-unique value ?

> But he also can let it blank/null if he wants to.
> That's when the trigger do its job.. Put a value (starting in 1000) in
> that column.
>
> Of course that has to be unique, as nobody can use the same value of
> others.
>

thats really hard to do correctly under a concurrent workload

>
> - I was hoping you cans could help me to start doing the function...

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-04-20 22:55:50 Re: Function PostgreSQL 9.2
Previous Message drum.lucas@gmail.com 2016-04-20 22:33:21 Re: Function PostgreSQL 9.2