mirror of
https://github.com/postgres/postgres.git
synced 2025-12-10 14:22:35 +03:00
Use E'' strings internally only when standard_conforming_strings =
'off'. This allows pg_dump output with standard_conforming_strings = 'on' to generate proper strings that can be loaded into other databases without the backslash doubling we typically do. I have added the dumping of the standard_conforming_strings value to pg_dump. I also added standard backslash handling for plpgsql.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/large_obj.c,v 1.41 2006/03/05 15:58:51 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/large_obj.c,v 1.42 2006/05/26 23:48:54 momjian Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
#include "large_obj.h"
|
||||
@@ -178,10 +178,11 @@ do_lo_import(const char *filename_arg, const char *comment_arg)
|
||||
|
||||
if (strchr(comment_arg, '\\') != NULL)
|
||||
*bufptr++ = ESCAPE_STRING_SYNTAX;
|
||||
|
||||
*bufptr++ = '\'';
|
||||
for (i = 0; i < slen; i++)
|
||||
{
|
||||
if (SQL_STR_DOUBLE(comment_arg[i]))
|
||||
if (SQL_STR_DOUBLE(comment_arg[i], true))
|
||||
*bufptr++ = comment_arg[i];
|
||||
*bufptr++ = comment_arg[i];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user