Re: PL/pgSQL 'i = i + 1' Syntax

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)skype(dot)net>
Cc: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, Douglas McNaught <doug(at)mcnaught(dot)org>, Mark Dilger <pgsql(at)markdilger(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/pgSQL 'i = i + 1' Syntax
Date: 2006-05-19 21:46:15
Message-ID: 4328.1148075175@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing <hannu(at)skype(dot)net> writes:
> hel kenal peval, R, 2006-05-19 kell 16:12, kirjutas Jim C. Nasby:
>> IIRC, Oracle handles this by allowing you to prefix variables with the
>> name of the function.

> what happens if your function name is the same as some table name or
> local record variable name ? would it still bite newcomers ?

Yeah. Since functions and tables have independent namespaces in PG
(dunno about Oracle), this didn't seem like much of a solution to me.

I think we should just recommend a coding practice such as _ prefix
for local variables, and leave it at that.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2006-05-19 21:52:54 Re: OO PostgreSQL Driver
Previous Message Josh Berkus 2006-05-19 21:45:38 Re: OO PostgreSQL Driver