Re: plpgsql at what point does the knowledge of the query come in?

From: Henry Drexler <alonup8tb(at)gmail(dot)com>
To: rod(at)iol(dot)ie
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: plpgsql at what point does the knowledge of the query come in?
Date: 2011-10-20 21:13:04
Message-ID: CAAtgU9Q-vHuJpEAUT4Pg-MBiDo7foGiv1c8mSwLNyaq+ZTXu_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 20, 2011 at 4:57 PM, Raymond O'Donnell <rod(at)iol(dot)ie> wrote:

>
> Not sure what you mean by the above... that statement only gets executed
> once, so the value of nnlength doesn't change.
>
> Ray.

doesn't the function get executed once for each row in the query?
so in the below example
threeee will match threee
but fiveu will not match five because it has not reset nnlength :=
length(newnode); to measure the length of fiveu but is retaining the length
of threeee

is it possible to get nnlength := length(newnode); to reset for each new
row/node in the query?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Henry Drexler 2011-10-20 21:31:48 Re: plpgsql at what point does the knowledge of the query come in?
Previous Message J.V. 2011-10-20 21:10:55 Re: how to disable all pkey/fkey constraints globally