Re: PL/pgSQL 2

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Jan Wieck <jan(at)wi3ck(dot)info>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(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-06 16:17:16
Message-ID: 540B338C.90807@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-09-06 6:06 PM, Jan Wieck wrote:
>> You can dismiss what we're doing by saying that it doesn't follow the
>> best practices or we just want an interface for a key-value store or
>> whatever. And yes, to some extent, a simple interface for a key-value
>> store would come in handy. But we still have the 5-15% (big part of it
>> being the reporting we need to do) of the code that *doesn't* want that,
>> *and* we want to use all of the Postgres features where applicable.
>
> The point isn't about best practices.

It got to that point upthread.

> The point is that if you want to
> ensure that at maximum one row is affected, then qualify it by a unique
> set of columns.

And what if you get the set of columns wrong (also consider the presence
of joins)? What if someone changes that set of columns? What if your
unique indexes have been violated because of a bug in postgres or
hardware malfunction? Wouldn't you want the problem to be obvious?

> Making PL/pgSQL behave different on UPDATE than SQL to
> enforce that by default was simply a misguided design idea.

OK, fine. But that's not what I suggested on the wiki page, and is also
not what I'm arguing for here right now. What the message you referred
to was about was the condescending attitude where we were told to "think
in terms of sets" (paraphrased), without considering whether that's even
possible to do *all the time*.

.marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2014-09-06 16:19:18 Re: PL/pgSQL 1.2
Previous Message Jan Wieck 2014-09-06 16:12:16 Re: PL/pgSQL 1.2