pl/pgsql and controling loops

Поиск
Список
Период
Сортировка
От Alain Roger
Тема pl/pgsql and controling loops
Дата
Msg-id 75645bbb0803271203y53ea48c7o8f54ed748f88929e@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
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 '==' or '!=', so i expect that correct ones are '==' and '<>'.

moreover, when i check if the returned value "ret_email" from SELECT email INTO ret_email FROM tmp_newsletterreg WHERE tmp_usr_id = id_session;
i want to check if it is empty or not, so i do IF(ret_email <> '' ) THEN... but it does not work... every time it enter in the loop, even if it is empty string.

where is the problem ?

thx.

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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Dawid Kuroczko"
Дата:
Сообщение: Re: Survey: renaming/removing script binaries (createdb, createuser...)
Следующее
От: aklaver@comcast.net (Adrian Klaver)
Дата:
Сообщение: Re: pl/pgsql and controling loops