Re: pl/pgsql and controling loops

From: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Adrian Klaver" <aklaver(at)comcast(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: pl/pgsql and controling loops
Date: 2008-03-27 20:01:20
Message-ID: 75645bbb0803271301p57a26423ia196b4dcd71c6246@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> aklaver(at)comcast(dot)net (Adrian Klaver) writes:
> > From: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
> >> 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.
>
> regards, tom lane
>

--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zdenek Kotala 2008-03-27 20:09:37 Re: Survey: renaming/removing script binaries (createdb, createuser...)
Previous Message Tom Lane 2008-03-27 19:53:25 Re: pl/pgsql and controling loops