On Thu, 13 Oct 2005 16:24:23 -0400, Tom Lane <[EMAIL PROTECTED]> wrote:
> BTW, another issue here is that if we did merge the first DECLARE with
> the scope of auto-declared variables, it would be a non backwards
> compatible change. Right now you can do, say,
>
> declare found int;
>
> an
On 10/14/2005 09:30:51 AM, Michael Fuhr wrote:
On Thu, Oct 13, 2005 at 03:51:15PM +, Karl O. Pinc wrote:
> I definately do not recall catching any additional errors at
> compile time as part of the switch to 8.
8.0's syntax checking is minimal; 8.1's will be better.
Looking forward to
On Thu, Oct 13, 2005 at 04:24:23PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> > On Thu, Oct 13, 2005 at 01:30:56PM -0400, Tom Lane wrote:
> >> Basically, DECLARE introduces a new name scope that wouldn't be there
> >> if you didn't say DECLARE. Without some bizarre reint
On Thu, Oct 13, 2005 at 03:51:15PM +, Karl O. Pinc wrote:
> I definately do not recall catching any additional errors at
> compile time as part of the switch to 8.
8.0's syntax checking is minimal; 8.1's will be better. Also, you
might not even have plpgsql's lanvalidator function if you rest
On 10/13/2005 09:38:36 AM, Bruce Momjian wrote:
> Fair enough. At the same time it sure would be nice if
> plpgsql actually compiled (and parsed SQL) at
> function definition time, even when the result is thrown away.
> I'm building a big system and it's quite annoying
> to get syntax errors,
On 10/13/2005 03:24:23 PM, Tom Lane wrote:
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> On Thu, Oct 13, 2005 at 01:30:56PM -0400, Tom Lane wrote:
>> Basically, DECLARE introduces a new name scope that wouldn't be
there
>> if you didn't say DECLARE. Without some bizarre reinterpretation
of the
>
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> On Thu, Oct 13, 2005 at 01:30:56PM -0400, Tom Lane wrote:
>> Basically, DECLARE introduces a new name scope that wouldn't be there
>> if you didn't say DECLARE. Without some bizarre reinterpretation of the
>> meaning of a DECLARE at the start of a funct
On Thu, Oct 13, 2005 at 01:30:56PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> > Based on all that, I would certainly be in favor of throwing a warning
> > if you over-define something, since 99% of the time it's a mistake. Is
> > that possible with the current checking we
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> Based on all that, I would certainly be in favor of throwing a warning
> if you over-define something, since 99% of the time it's a mistake. Is
> that possible with the current checking we do at compile time?
Without having looked at the code, I imagine
On Thu, Oct 13, 2005 at 10:38:36AM -0400, Bruce Momjian wrote:
> Karl O. Pinc wrote:
> >
> > On 10/12/2005 10:32:20 PM, Bruce Momjian wrote:
> >We tend to follow the C conventions, so perhaps we
> > > should
> > > throw a warning, but I can't think of any cases where we throw a
> > > warning
>
Bruce Momjian writes:
> Karl O. Pinc wrote:
>> Fair enough. At the same time it sure would be nice if
>> plpgsql actually compiled (and parsed SQL) at
>> function definition time, even when the result is thrown away.
> 8.0 has this improvement:
> * Do minimal syntax checking of PL/pgSQL fu
Karl O. Pinc wrote:
>
> On 10/12/2005 10:32:20 PM, Bruce Momjian wrote:
>We tend to follow the C conventions, so perhaps we
> > should
> > throw a warning, but I can't think of any cases where we throw a
> > warning
> > in plpgsql because we compile it once on first call.
> >
> > I am thinkin
On 10/12/2005 10:32:20 PM, Bruce Momjian wrote:
We tend to follow the C conventions, so perhaps we
should
throw a warning, but I can't think of any cases where we throw a
warning
in plpgsql because we compile it once on first call.
I am thinking this falls in the "don't do that" category.
F
Interesting. If I define this in C:
int x(int y)
{
char *y;
}
I get a warning:
x.c: In function `x':
x.c:3: warning: declaration of `y' shadows a parameter
but no error. We tend to follow the C conventions, so perhaps we should
throw
The following bug has been logged online:
Bug reference: 1956
Logged by: Karl O. Pinc
Email address: [EMAIL PROTECTED]
PostgreSQL version: 8.0.3
Operating system: Linux
Description:Plpgsql top-level DECLARE does not share scope with
CREATE FUNCTION
Details:
Dependi
15 matches
Mail list logo