Re: [GENERAL] pl/pgsql and controling loops

2008-03-27 Thread Adrian Klaver
-- Original message -- From: Tom Lane <[EMAIL PROTECTED]> > [EMAIL PROTECTED] (Adrian Klaver) writes: > > From: "Alain Roger" <[EMAIL PROTECTED]> > >> once to do a comparison they use : > > IF (ret == 1) THEN ... > >> once, > > IF (ret = 1) THEN... > > > Both are

Re: [GENERAL] pl/pgsql and controling loops

2008-03-27 Thread Tom Lane
[EMAIL PROTECTED] (Adrian Klaver) writes: > From: "Alain Roger" <[EMAIL PROTECTED]> >> once to do a comparison they use : > IF (ret == 1) THEN ... >> once, > IF (ret = 1) THEN... > Both are correct. No they're not, as a simple test would convince you ... there is no '==' operator in SQL.

Re: [GENERAL] pl/pgsql and controling loops

2008-03-27 Thread Alain Roger
this is what i did, and it's true that '==' does not exist under pl/pgsql. Only '=' should be used. On Thu, Mar 27, 2008 at 8:53 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Adrian Klaver) writes: > > From: "Alain Roger" <[EMAIL PROTECTED]> > >> once to do a comparison they use :

Re: [GENERAL] pl/pgsql and controling loops

2008-03-27 Thread Adrian Klaver
-- Original message -- From: "Alain Roger" <[EMAIL PROTECTED]> > Hi, > > i've read several books extract about controlling loops in postgreSQL under > pl/pgsql and there is something interesting. > > once to do a comparison they use : > > > IF (ret == 1) THEN ..

[GENERAL] pl/pgsql and controling loops

2008-03-27 Thread Alain Roger
Hi, i've read several books extract about controlling loops in postgreSQL under pl/pgsql and there is something interesting. once to do a comparison they use : > IF (ret == 1) THEN ... once, > IF (ret = 1) THEN... so are they both correct ? comming from .NET/C++ world, usually we use '==' o