Re: My second PL/pgSQL function - minor problem

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: My second PL/pgSQL function - minor problem
Date: 2009-11-20 09:50:48
Message-ID: he5opo$3gc$2@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 2009-11-20, Jasen Betts <jasen(at)xnet(dot)co(dot)nz> wrote:
> On 2009-11-18, Thomas Løcke <thomas(dot)granvej6(at)gmail(dot)com> wrote:
>> --001517402ba882fac30478a73b83
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Hey all,
>>
>> http://pastebin.com/f1015226d

> your function seems basically equivalent to
>
> UPDATE users SET lastvisit = now(), visits = visits + 1
> WHERE username = uname AND password = passwd
> RETURNING id;
--------------

should be:
RETURNING *;

oops.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Rikard Bosnjakovic 2009-11-20 14:17:54 Counting booleans for two columns
Previous Message Jasen Betts 2009-11-20 09:46:04 Re: My second PL/pgSQL function - minor problem