Skip site navigation (1) Skip section navigation (2)

Re: allowed variable names in functions?

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "A B" <gentosaker(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: allowed variable names in functions?
Date: 2008-06-30 10:30:47
Message-ID: 162867790806300330g40d362c8xcd82fe1a5d6996ee@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
Hello

it works in my 8.1

postgres=# CREATE LANGUAGE plpgsql;
CREATE LANGUAGE
postgres=# create or replace function foo(a int) returns void as
$$declare c2 real; c2div real; begin c2div := 10.9; end; $$ language
plpgsql;
CREATE FUNCTION
postgres=# select foo(10);
 foo
-----

(1 row)
Regards
Pavel Stehule

2008/6/30 A B <gentosaker(at)gmail(dot)com>:
> Hello.
> I suspect that in a  plpgsql function
>
> DECLARE
> c2 REAL;
> cadiv REAL;
>
> works but
>
> c2 REAL;
> c2div REAL;
>
> doesn't.
>
> Is this true, and if so, what are the rules for the names in the
> function? I use 8.1.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

pgsql-general by date

Next:From: A BDate: 2008-06-30 10:38:40
Subject: Re: allowed variable names in functions?
Previous:From: A BDate: 2008-06-30 10:12:21
Subject: allowed variable names in functions?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group