Re: Error messages --- now that we've got it, do you like

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Error messages --- now that we've got it, do you like
Дата
Msg-id 200307202139.h6KLdaN21230@candle.pha.pa.us
обсуждение исходный текст
Ответ на Error messages --- now that we've got it, do you like it?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Error messages --- now that we've got it, do you like it?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Error messages --- now that we've got it, do you like  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
VERBOSE doesn't seem like the right name for the \set parameter.  I
consider VERBOSE to be a possible value for error verbosity.  Saying
'\set VERBOSE terse' seems like an contradiction.

Should we call it VERBOSITY, or something else?  Seems 'error' or 'err'
or 'message' should be in there somewhere too.

Here is a good example of the problem:

> regression=# \set VERBOSE verbose
> regression=# \set VERBOSE default
> regression=# \set VERBOSE terse

That is just confusing.  It is the parameter name and a possible value.

How about MESSOUTPUT or ERROUTPUT?  Both look ugly, though.

---------------------------------------------------------------------------

Tom Lane wrote:
> First fruits of all that work on error message rejiggering ...
> 
> regression=# \set VERBOSE terse
> 
> regression=# select 1!! ;
> ERROR:  operator does not exist: integer !!
> 
> regression=# \set VERBOSE default
> 
> regression=# select 1!! ;
> ERROR:  operator does not exist: integer !!
> HINT:  No operator matches the given name and argument type(s). You may need to add explicit typecasts.
> 
> regression=# \set VERBOSE verbose
> 
> regression=# select 1!! ;
> ERROR:  42883: operator does not exist: integer !!
> HINT:  No operator matches the given name and argument type(s). You may need to add explicit typecasts.
> LOCATION:  op_error, parse_oper.c:691
> 
> regression=# select 'z' && 'q';
> ERROR:  42725: operator is not unique: "unknown" && "unknown"
> HINT:  Unable to choose a best candidate operator. You may need to add explicit typecasts.
> LOCATION:  op_error, parse_oper.c:684
> 
> Before we go too much further, does this look sane to people?
> Any adjustments you want to make around the edges?
> 
> (BTW, if you're wondering where the 42xxx error codes came from,
> I borrowed them from DB2.  The SQL99 spec seems happy to lump
> all sorts of conditions under 42000 "syntax error or access
> violation" ...)
> 
>             regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: How to submit Tsearch V2 ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error messages --- now that we've got it, do you like it?