Re: Multi-Table Insert/Update Strategy - Use Functions/Procedures?

From: Don Parris <parrisdc(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Multi-Table Insert/Update Strategy - Use Functions/Procedures?
Date: 2016-01-28 00:26:52
Message-ID: CAJ-7yokvY-zs5D+WMsV_Q0CWP3g7Q3pBocNqQReeYUq2TCCU2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jan 27, 2016 at 6:24 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Wed, Jan 27, 2016 at 4:03 PM, Don Parris <parrisdc(at)gmail(dot)com> wrote:
>
> <snip>

> ​Parameter passing and variables are client-side considerations. You
> haven't told us how you plan to execute the SQL.
>
> ​IMO the most straight-forward API is a function. Whether you implement
> that function using a updating CTE or a sequence of separate SQL commands
> is up to you to decide and, if performance matters, benchmark.
>
> Comparing a CTE and function in general doesn't really do much good.
> There are many non-performance concerns involved and the specific usage
> pattern involved will matter greatly in determining overhead.
>
>
Thanks David, that makes sense. My main front-end - at the moment - is
LibreOffice Base. With Base, I can probably just create forms using the
underlying tables. That said, I may also want to write a Python front-end,
in which case I would prefer to let the database do the work it was
designed to do.

Don
--
D.C. Parris, FMP, Linux+, ESL Certificate
Minister, Security/FM Coordinator, Free Software Advocate
http://dcparris.net/ <https://www.xing.com/profile/Don_Parris>
<http://www.linkedin.com/in/dcparris>
GPG Key ID: F5E179BE

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2016-01-28 00:34:24 Re: Request - repeat value of \pset title during \watch interations
Previous Message Ivan Voras 2016-01-27 23:37:54 Re: Catalog bloat (again)