Skip site navigation (1) Skip section navigation (2)

pgsql-server/src/backend/commands copy.c

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server/src/backend/commands copy.c
Date: 2004-01-18 02:15:29
Message-ID: 20040118021529.C4F93D1DAB1@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
CVSROOT:	/cvsroot
Module name:	pgsql-server
Changes by:	tgl(at)svr1(dot)postgresql(dot)org	04/01/17 22:15:29

Modified files:
	src/backend/commands: copy.c 

Log message:
	Don't use %s-with-precision format spec to truncate data being displayed
	in a COPY error message.  It seems that glibc gets indigestion if it is
	asked to truncate strings that contain invalid UTF-8 encoding sequences.
	vsnprintf will return -1 in such cases, leading to looping and eventual
	memory overflow in elog.c.  Instead use our own, more robust pg_mbcliplen
	routine.  I believe this problem accounts for several recent reports of
	unexpected 'out of memory' errors during COPY IN.


pgsql-committers by date

Next:From: Tom LaneDate: 2004-01-18 02:15:58
Subject: pgsql-server/src/backend/commands Tag: REL7_4_ ...
Previous:From: Tom LaneDate: 2004-01-18 00:50:03
Subject: pgsql-server/src backend/optimizer/plan/create ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group