Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aTWdR-0000DH-SM for pgsql-sql@arkaria.postgresql.org; Wed, 10 Feb 2016 15:24:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aTWdR-0005IT-9m for pgsql-sql@arkaria.postgresql.org; Wed, 10 Feb 2016 15:24:53 +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 1aTWcR-0003gm-TK for pgsql-sql@postgresql.org; Wed, 10 Feb 2016 15:23:52 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aTWcP-0001BR-Dh for pgsql-sql@postgresql.org; Wed, 10 Feb 2016 15:23:50 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C135320633 for ; Wed, 10 Feb 2016 10:23:47 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Wed, 10 Feb 2016 10:23:47 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= 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=EgMgSxkJ7QW4o2xRCB/QbyIQ4HU=; b=FSwGO3 eSRf8aUTMp4ZGJuQxyQUtgsxVm9qzABK6RLQLukdRt3vbiS+2bxvy2c8RoaAwtuY /BOQuFp5NWPTDN8ZU7wjMi1o8z9SlCm8ovt8UpC97kRsVpHjJrt1TjHsXfPVnTGS zRrkeKhqvJXM9qZnAs6XieCSVrUTuqa8Uom5U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=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=EgMgSxkJ7QW4o2x RCB/QbyIQ4HU=; b=L6/45JPIPwY5jNy4o4kxUPaeurzdc1i34mPDlc13Zy+u/Fv MKL/j6Zjtsa0Cc7ZvRqyr1HjrEYxoOFpgFIY13KtMdG4hJrmHb2DXPK5BdofecPG Xkb9uTHkhMFUoYF8jLxRCRnEN0OHcMrWtw2+46Yqz3TecdcAiHaY0BNjOzPU= X-Sasl-enc: 1mg9emXuLWYXQS1uRIKkh3QNwHhV5r+elNItQxq1IE/k 1455117827 Received: from [192.168.1.2] (174-21-70-246.tukw.qwest.net [174.21.70.246]) by mail.messagingengine.com (Postfix) with ESMTPA id 405C6680107; Wed, 10 Feb 2016 10:23:47 -0500 (EST) Subject: Re: inserting json content from a file into table column To: Shashank Dutt Jha , pgsql-sql@postgresql.org References: From: Adrian Klaver Message-ID: <56BB55C1.4060305@aklaver.com> Date: Wed, 10 Feb 2016 07:22:41 -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: 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 02/10/2016 07:10 AM, Shashank Dutt Jha wrote: > I have .json file.C:/ a.json > Table with column 'food' of type jsonb > > how to insert the content of a.json into column 'food' What are you using as your client, for example psql, Java program, Python program, etc.? What version of Postgres are you using? In this case it probably does not matter that much, but json/jsonb has changed a good deal over recent versions so it is nice to know what you are working with. -- 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