Re: review: CHECK FUNCTION statement

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: review: CHECK FUNCTION statement
Дата
Msg-id 1330816012-sup-8375@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: review: CHECK FUNCTION statement  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: review: CHECK FUNCTION statement
Список pgsql-hackers
Excerpts from Alvaro Herrera's message of sáb mar 03 17:56:23 -0300 2012:
> Excerpts from Alvaro Herrera's message of sáb mar 03 16:54:19 -0300 2012:
> > Excerpts from Pavel Stehule's message of sáb mar 03 02:25:52 -0300 2012:
>
> > > 3. THE ARE NOT CARET - this is really important
>
> > I am not sure about the caret thingy -- mainly because I don't think it
> > works all that well.

It doesn't work correctly with your patch; see sample below.  Note the
caret is pointing to an entirely nonsensical position.  I'm not sure
about duplicating the libpq line-counting logic in the backend.

Also note i18n seems to be working well, except for the "In function"
header, "query", and the error level.  That seems easily fixable.

I remain unconvinced that this is the best possible output.

alvherre=# create function f() returns int language plpgsql as $$
begin select
var
from
foo; end; $$;
CREATE FUNCTION
alvherre=# check function f();                    CHECK FUNCTION
---------------------------------------------------------In function: 'f()'error:42P01:2:sentencia SQL:no existe la
relación«foo»query:select                                           +var
   +from                                                   +foo                      ^ 
(4 filas)

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Memory usage during sorting
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: archive_keepalive_command