Re: Out parameters handling - Mailing list pgsql-hackers

From Ryan Bradetich
Subject Re: Out parameters handling
Date
Msg-id e739902b0903081204r46e563dcs9c6dc7ea2a646f83@mail.gmail.com
Whole thread Raw
In response to Re: Out parameters handling  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Out parameters handling  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello Robert,

I have been bitten by this problem many times as well.

> I wonder whether it would be possible to make PL/pgsql take :foo to
> mean the parameter named foo, and then provide an option to make that
> THE ONLY WAY to refer to the parameter foo.  For
> backward-compatibility, and compatibility with (ahem) other database
> products, we probably don't want to remove the option to have foo
> mean... any damn thing named foo you can put your hands on.  But it
> would be nice to at least have the option of disabling that behavior
> when compatibility is not an issue, and correctness is.

This is one of the things I wanted to start looking at for 8.5.
My idea was to optionally use : or @ (not sure which is more popular) to
specify this token is only a variable.  Do not try to match it to columns or
other database object.   If the variable did not start with : or @ then normal
rules would apply for backwards compatibility.

No idea how feasible this plan is, I was just hoping to find a way to solve this
problem.

Thanks,

- Ryan


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: status of remaining patches
Next
From: Alvaro Herrera
Date:
Subject: compiler failures on buildfarm member wombat