My first PL/pgSQL function

From: Thomas Løcke <thomas(dot)granvej6(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: My first PL/pgSQL function
Date: 2009-11-17 14:55:06
Message-ID: 1f0fa7ae0911170655l611e4266oee1e76541bfe26a7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hey all,

First I'd like to thank Jasen Betts and Michael Wood for the advice they
gave me regarding my user management table design.

Next I'd like some feedback on my first PL/pgSQL function:
http://pastebin.com/f8357ec0

It appears to be doing exactly what I want, and it's fast at doing it.
Compared to my old "SQL in PHP" solution, this is ~25% faster. And it looks
a lot more smooth in the code also.

So in my book, this is all win.

But are there any glaring issues with this function? Have I missed something
obvious, or made some classic beginner mistakes?

Any and all advice are more than welcome, and much appreciated.

Regards,
Thomas

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Brian Modra 2009-11-17 15:39:17 Re: My first PL/pgSQL function
Previous Message Mike Ellsworth 2009-11-17 13:35:20 8.38 -> 8.5?