mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Revise syntax-error reporting behavior to give pleasant results for
errors in internally-generated queries, such as those submitted by plpgsql functions. Per recent discussions with Fabien Coelho.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.113 2004/02/19 19:40:08 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.114 2004/03/21 22:29:11 tgl Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
#include "command.h"
|
||||
@ -1042,18 +1042,20 @@ SyncVerbosityVariable(void)
|
||||
"default", "terse", "verbose", NULL))
|
||||
{
|
||||
case 1: /* default */
|
||||
PQsetErrorVerbosity(pset.db, PQERRORS_DEFAULT);
|
||||
pset.verbosity = PQERRORS_DEFAULT;
|
||||
break;
|
||||
case 2: /* terse */
|
||||
PQsetErrorVerbosity(pset.db, PQERRORS_TERSE);
|
||||
pset.verbosity = PQERRORS_TERSE;
|
||||
break;
|
||||
case 3: /* verbose */
|
||||
PQsetErrorVerbosity(pset.db, PQERRORS_VERBOSE);
|
||||
pset.verbosity = PQERRORS_VERBOSE;
|
||||
break;
|
||||
default: /* not set or unrecognized value */
|
||||
PQsetErrorVerbosity(pset.db, PQERRORS_DEFAULT);
|
||||
pset.verbosity = PQERRORS_DEFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
PQsetErrorVerbosity(pset.db, pset.verbosity);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user