Support only octal for psql PROMPT values, rather than the confusing
hex/decimal/octal. Documentation already updated. BACKWARD COMPATIBLE CHANGE
This commit is contained in:
parent
33294d57c7
commit
3e8dbc846c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.97 2005/04/28 13:09:59 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.98 2005/05/30 18:28:11 momjian Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
#include "common.h"
|
||||
@ -1237,17 +1237,6 @@ command_no_begin(const char *query)
|
||||
}
|
||||
|
||||
|
||||
char
|
||||
parse_char(char **buf)
|
||||
{
|
||||
long l;
|
||||
|
||||
l = strtol(*buf, buf, 0);
|
||||
--*buf;
|
||||
return (char) l;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Test if the current user is a database superuser.
|
||||
*
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/common.h,v 1.42 2005/01/01 05:43:08 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/common.h,v 1.43 2005/05/30 18:28:11 momjian Exp $
|
||||
*/
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
@ -60,12 +60,6 @@ extern bool SendQuery(const char *query);
|
||||
extern bool is_superuser(void);
|
||||
extern const char *session_username(void);
|
||||
|
||||
/* Parse a numeric character code from the string pointed at by *buf, e.g.
|
||||
* one written as 0x0c (hexadecimal) or 015 (octal); advance *buf to the last
|
||||
* character of the numeric character code.
|
||||
*/
|
||||
extern char parse_char(char **buf);
|
||||
|
||||
extern char *expand_tilde(char **filename);
|
||||
|
||||
#endif /* COMMON_H */
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/prompt.c,v 1.38 2005/01/01 05:43:08 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/prompt.c,v 1.39 2005/05/30 18:28:11 momjian Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
#include "prompt.h"
|
||||
@ -175,11 +175,9 @@ get_prompt(promptStatus_t status)
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
*buf = parse_char((char **) &p);
|
||||
*buf = (char) strtol(p, (char **)&p, 8);
|
||||
--p;
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
switch (status)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user