Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group