Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aOstQ-0005ne-69 for pgsql-sql@arkaria.postgresql.org; Thu, 28 Jan 2016 20:10:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aOstP-0003wV-On for pgsql-sql@arkaria.postgresql.org; Thu, 28 Jan 2016 20:10:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOssQ-0002qi-R0 for pgsql-sql@postgresql.org; Thu, 28 Jan 2016 20:09:11 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOssJ-0006Hi-Ah for pgsql-sql@postgresql.org; Thu, 28 Jan 2016 20:09:09 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 131AE208BB for ; Thu, 28 Jan 2016 15:09:02 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 28 Jan 2016 15:09:02 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=a98rEtIz0rkdvFzSj/nwRkN+v64=; b=PxYr4I mX1rnEY0iLxVzt9XX+U9mn5MIOLytM/FH1pwNLcYqJuz3mHTP2klm0NkxGjWz7II u5CVwlK0eKKm4gjJWbs7Zw9EqWpP5ijBabAkNk11sk5m/Ppmsy9hLOSx9Rv0irAh rm0GtdhdZfVt8FDSsnwHwc4fm4kwQ3SId3AC4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=a98rEtIz0rkdvFz Sj/nwRkN+v64=; b=q5tLsO5a3UOKQcUwQu6emRz0Yxo6MI/rppQgAAbCPIIxRTd r2f6uTh0QewGhq7jyhIC05hu3lbDgqDlaGf9tpQFM3wmFDxHxgiQA2Nz45dI+twW 5RPU/wEXdfniShePNeIzxjyaycb9qyOxe6GOkEYqAFtb1J4OIL670/8AGLeE= X-Sasl-enc: 7y1Ae9k+nRW3OpbfCMAAJ8IdSVPEt1uXgLubeUoizyOe 1454011741 Received: from [192.168.1.2] (65-102-182-223.tukw.qwest.net [65.102.182.223]) by mail.messagingengine.com (Postfix) with ESMTPA id 70BD5C00012; Thu, 28 Jan 2016 15:09:01 -0500 (EST) Subject: Re: insert a text file into a variable in order to insert into a bytea column To: Arthur Lewis References: <877971630.7184594.1454006776740.JavaMail.root@hypermediasystems.com> Cc: pgsql-sql@postgresql.org From: Adrian Klaver Message-ID: <56AA7523.4020806@aklaver.com> Date: Thu, 28 Jan 2016 12:08:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <877971630.7184594.1454006776740.JavaMail.root@hypermediasystems.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 01/28/2016 10:46 AM, Arthur Lewis wrote: > Hi, > In my shell I did the following > > $ cat file > file.temp > $ ls -l file file.temp > -rw-rw-r-- 1 alewis alewis 53604 Jan 27 08:30 file > -rw-rw-r-- 1 alewis alewis 53604 Jan 28 10:28 file.temp > $ diff file file.temp > $ > > So at least in the shell the cat command isn't losing a byte at the end of the file like in psql \set x `cat file`. Hmm, well there went that theory;) What happens if you do?: select octet_length(:'stext'); > > Arthur Lewis > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql