mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
set client_encoding to <nothing> crashes backend.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This file contains some public functions
|
||||
* usable for both the backend and the frontend.
|
||||
* Tatsuo Ishii
|
||||
* $Id: common.c,v 1.3 1998/10/06 03:02:21 momjian Exp $ */
|
||||
* $Id: common.c,v 1.4 1999/05/13 10:28:25 ishii Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -28,6 +28,10 @@ pg_char_to_encoding(const char *s)
|
||||
{
|
||||
pg_encoding_conv_tbl *p = pg_conv_tbl;
|
||||
|
||||
if (!s) {
|
||||
return (-1);
|
||||
}
|
||||
|
||||
for (; p->encoding >= 0; p++)
|
||||
{
|
||||
if (!strcasecmp(s, p->name))
|
||||
|
||||
Reference in New Issue
Block a user