| From: | Marko Tiikkaja <marko(at)joh(dot)to> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Joel Jacobson <joel(at)trustly(dot)com> |
| Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: PL/pgSQL 2 |
| Date: | 2014-09-02 09:34:07 |
| Message-ID: | 54058F0F.7030205@joh.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 9/2/14 11:04 AM, Pavel Stehule wrote:
> It is relatively natural and we use similar construct in CONTINUE statement.
>
> 2. What can be next? We can implement some idiom (shortcut) for GET
> DIAGNOSTICS
>
> DELETE FROM tab WHERE xx = somevar;
> RAISE EXCEPTION 'some' WHEN AFFECTED_ROW_COUNT <> 1;
Yes, a special variable would be closer to how I would prefer to access
the row count.
> 3. What next? Maybe some notations -
>
> -- ** ensure_exact_one_row
> DELETE FROM tab WHERE xx = somevar;
I really, really don't like the idea of turning regular SQL statements
into something slightly different based on comments around (or "inside")
the query.
.marko
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mark Kirkwood | 2014-09-02 09:34:43 | Re: PL/pgSQL 2 |
| Previous Message | Pavel Stehule | 2014-09-02 09:31:08 | Re: PL/pgSQL 2 |