Re: Why use " != "

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: ipig <ipig(at)ercist(dot)iscas(dot)ac(dot)cn>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why use " != "
Date: 2006-05-16 03:36:13
Message-ID: 65937bea0605152036y70246e17k40091e89a332836b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It done so, because InitProcess() is supposed to be called only
once per backend, because it allocates a PGPROC from a LIST OF free
PGPROCs.

So with this test, and calling elog( ERROR, ... ) we are stopping
the caller from doing a second initialization for this backend.

On 5/16/06, ipig <ipig(at)ercist(dot)iscas(dot)ac(dot)cn> wrote:
>
>
> Hi,
>
> in postgresql-8.1.3/src/backend/storage/lmgr/proc.c
> there are 2 function InitProcess and InitDummyProcess, both use
> " if (MyProc != NULL)
> elog(ERROR, "you already exist"); " (line 215 and 315)
>
> why use " != " ?
>
> Best regards.
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ipig 2006-05-16 03:42:48 Re: Why use " != "
Previous Message Qingqing Zhou 2006-05-16 03:25:10 Re: Why use " != "