Re: Thoughts on "Love Your Database"
Szymon Lipiński <mabewlun@gmail.com>
From: Szymon Lipiński <mabewlun@gmail.com>
To: Guyren Howe <guyren@gmail.com>
Cc: Pierre Chevalier Géologue <pierrechevaliergeol@free.fr>, Will McCormick <wmccormick@gmail.com>, Uwe Schroeder <uwe@oss4u.com>, PostgreSQL <pgsql-general@postgresql.org>
Date: 2016-05-21T09:07:48Z
Lists: pgsql-general
On 20 May 2016 at 22:43, Guyren Howe <guyren@gmail.com> wrote:
> On May 20, 2016, at 13:38 , Pierre Chevalier Géologue <
> pierrechevaliergeol@free.fr> wrote:
> >
> > Le 04/05/2016 18:29, Szymon Lipiński a écrit :
> >> On the other hand, when I was trying to store all my logic in a
> >> database, there was just one thing that made me hate it. Testing.
> >> Testing the procedures inside the database was not easy, not funny, and
> >> too much time consuming.
> >
> > Yes, very good point.
>
> Are there any best practices or tricks to make this easier?
I only write tests outside the database. Currently I'm involved in projects
where all the logic is outside, so having tests outside is rather obvious.
However I have a small toy project with logic inside the database, and
tests outside. I also think that it doesn't matter where the tests are, it
is important to have them, and run them. I'm not sure that tests inside are
much better solution.
--
regards Szymon Lipiński