note 107266 added to function.pg-copy-from

From: Date: Thu, 26 Jan 2012 10:40:43 +0000
Subject: note 107266 added to function.pg-copy-from
Groups: php.notes 
Request: Send a blank email to php-notes+get-185747@lists.php.net to get a copy of this message
As of postgresql 9.1 "standard_conforming_strings" is set to on This will not work anymore <?php $copy_message = "1\t\\N\t300"; pg_copy_from($db, "message", $copy_message); ?> result will be a "N" in that field. if the field allow text that is else it will fail to insert the post. simple fix <?php $copy_message = "1\t\\NULL\t300"; pg_copy_from($db, "message", $copy_message, "\t","\\NULL"); ?> ---- Server IP: 80.67.10.227 Probable Submitter: 217.210.179.238 ---- Manual Page -- http://www.php.net/manual/en/function.pg-copy-from.php Edit -- https://master.php.net/note/edit/107266 Del: integrated -- https://master.php.net/note/delete/107266/integrated Del: useless -- https://master.php.net/note/delete/107266/useless Del: bad code -- https://master.php.net/note/delete/107266/bad+code Del: spam -- https://master.php.net/note/delete/107266/spam Del: non-english -- https://master.php.net/note/delete/107266/non-english Del: in docs -- https://master.php.net/note/delete/107266/in+docs Del: other reasons-- https://master.php.net/note/delete/107266 Reject -- https://master.php.net/note/reject/107266 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185747) next »