Re: review: CHECK FUNCTION statement
От | Petr Jelínek |
---|---|
Тема | Re: review: CHECK FUNCTION statement |
Дата | |
Msg-id | 4F521BEC.1090401@pjmodos.net обсуждение исходный текст |
Ответ на | Re: review: CHECK FUNCTION statement (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: review: CHECK FUNCTION statement
|
Список | pgsql-hackers |
On 03/03/2012 02:24 AM, Alvaro Herrera wrote: > question: how attached you are to the current return format for CHECK > FUNCTION? > > check function f1(); > CHECK FUNCTION > ------------------------------------------------------------- > In function: 'f1()' > error:42804:5:assignment:subscripted object is not an array > (2 rows) > > It seems to me that it'd be trivial to make it look like this instead: > > check function f1(); > function | lineno | statement | sqlstate | message | detail | hint | level | position | query > ---------+--------+------------+----------+------------------------------------+--------+------+-------+----------+------- > f1() | 5 | assignment | 42804 | subscripted object is not an array | | | error | | > (1 row) > > This looks much nicer to me. > > One thing we lose is the caret marking the position of the error -- but > I'm wondering if that really works well. I didn't test it but from the > code it looks to me like it'd misbehave if you had a multiline statement. > > Opinions? Well, if you want nicely formated table you can always call the checker function directly, I think the statement returning something that is more human and less machine is more consistent approach with the rest of the utility commands. In other words I don't really see the point of it. Petr
В списке pgsql-hackers по дате отправления: