Re: 8.1 and syntax checking at create time

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: 8.1 and syntax checking at create time
Дата
Msg-id 20050831185429.GA19872@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: 8.1 and syntax checking at create time  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Ответы Re: 8.1 and syntax checking at create time  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Re: 8.1 and syntax checking at create time  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 8.1 and syntax checking at create time  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Список pgsql-hackers
On Wed, Aug 31, 2005 at 01:13:00PM -0500, Tony Caduto wrote:
> From what I have seen it does not check anything in the body of the 
> function, I can put gibberish in the body as long as it has a begin and end.
> 
> It does not seem to be doing anything differently than 8.0.x does with 
> function syntax checking at create time, so why even mention it in the 
> release notes?

I see different behavior in 8.1 than in 8.0.  Are you *sure* you're
connected to an 8.1 system when you're running your tests?

Are you using a database that was restored from an earlier version
of PostgreSQL?  I wonder if you're not getting the lanvalidator
function.  What's the result of the following query?

SELECT lanname,      lanplcallfoid, lanplcallfoid::regprocedure,      lanvalidator, lanvalidator::regprocedure
FROM pg_language;

What happens if you create a fresh database and run "createlang
plpgsql" in it, and then run your tests?

> the function below also raises no errors at create, but at run time it does.

With the example you posted I get the following at create time:

ERROR:  type "record44" does not exist
CONTEXT:  compile of PL/pgSQL function "test_func9" near line 2

If I change "record44" to "record" then I get the following (again,
at create time):

ERROR:  syntax error at or near "asfdfdfdfafdsfsdfsdf" at character 1
QUERY:  asfdfdfdfafdsfsdfsdf sdf bla bla sdf yada yada s df sd fsd END
CONTEXT:  SQL statement in PL/PgSQL function "test_func9" near line 10
LINE 1: asfdfdfdfafdsfsdfsdf sdf bla bla sdf yada yada s df sd fsd E...       ^

> From what I read in the release notes I was expecting to see this 
> raised at create time. 

Create-time checking works here.

-- 
Michael Fuhr


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.1 and syntax checking at create time
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: 8.1 and syntax checking at create time