From: | Joel Jacobson <joel(at)trustly(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, Bruce Momjian <bruce(at)momjian(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PL/pgSQL 1.2 |
Date: | 2014-09-04 08:06:38 |
Message-ID: | CAASwCXcURC_Xz_04yqTbob_ZabdREwc7YFeMdki=RNnu9kyweA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 4, 2014 at 9:39 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> we have totally different opinion what is good
Can you elaborate on that?
Your "ASSERT CHECK ROWCOUNT = 1;" is lengthly, which is why I don't like it.
Imagine if having to type
my $var =========================== 'foo';
instead of
my $var = 'foo';
on every single line of could where you want to assign a variable,
that would just be ridiculous.
If you have a typical CRUD application and decide to do *all* data
operations via PL functions,
which is a design pattern advocated by many*, then you will end up
with a lot of very simple
short PL functions, to do things like update_worker_status(),
set_notification_response(), etc,
in which you always pass something which is a primary key in some
table, and want to update
exactly one row. Having to type 27 extra characters for every single
line of code, instead of the
suggested 3 extra characters, is a big difference, for anyone who
designs a CRUD application
which relies on the usage of PL functions.
For me, it would be useful to understand if you are developing CRUD
applications,
or if your main usage for PL/pgSQL functions are other things?
If the latter, then maybe that could explain why you don't feel strongly about
simplifying and condensing the syntax for the most common use-case of them all.
*) but there are probably equally who prefer to handle business logics
outside the database
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2014-09-04 08:23:24 | Re: implement subject alternative names support for SSL connections |
Previous Message | Pavel Stehule | 2014-09-04 07:39:30 | Re: PL/pgSQL 1.2 |