Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2gIo-0003k2-BY for pgsql-general@arkaria.postgresql.org; Wed, 29 Dec 2021 21:16:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2gIn-0006Fv-7P for pgsql-general@arkaria.postgresql.org; Wed, 29 Dec 2021 21:16:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2gIl-0006Fl-MA for pgsql-general@lists.postgresql.org; Wed, 29 Dec 2021 21:16:04 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2gIe-000492-Uq for pgsql-general@lists.postgresql.org; Wed, 29 Dec 2021 21:16:02 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2F4DC5C0067; Wed, 29 Dec 2021 16:15:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 29 Dec 2021 16:15:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:mime-version:subject:to:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=L f7ru4g4oHBbfAZXUSfE8jQwEzY9KHp7trFRsMOrktg=; b=QiDWsQo10NPZix2Fn mmhQhcDQR9QvtSAIEAkj6amoUhip/ZOpezXfci1Q2E60b2B/n6s9hlTu2xihv8Fe 6j5gz54mSKaD4uvLOqGOLYIJCAevDgnKZ6v1dA3RvO18aObHBXJnt9U5LSGFGLME azKJpDTeOQ1v2ZTIHUss0uUbQUkXktggRaDOBDuMOQacBNe8uXn4lpWZrfpKYJ5H 3W6MqAFFeqFHyE/5PPrIUeM3yeT5QWuk98mJtgKEDfntftJJpGDYRx2eqbNZWxoL 6btZDD6ZN9/LL4OOA176nbd+STQyMB4raUzte5hDnTYtPPj02vyr44be+LVIKTx4 stcxQ== DKIM-Signature: v=1; a=rsa-sha256; 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-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Lf7ru4g4oHBbfAZXUSfE8jQwEzY9KHp7trFRsMOrk tg=; b=aNaVQZ1kS3bi06riRayxoW61OlbNeLBttpWOMfNArxje5Y/LhKZvkKqyP 7SySU5wIfYh4Zi7T1V+ZxkS7akEHliywkDNLB0rwY9nnpcPy5hFnOnV6ZPva2Rja R4aacTHactPi0TnKfGwEKCyZUmCfVuePcGqLoskdJ0579FaGdpQW90qBqddD3+Oq JRKkp5i3IzOhGnvhJJldNTfBTQjVN2lU1e6565SYvU7zK/Bond7w1x2Br04Pb6wo iavQTn/A6e+XSymVJlalMR2fbncA7v86waLEkckHv+KwSehmXkSNgaVlKf434a3l DS/Gd6hnP4g9lfckePbhvuDPHkROw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddvuddgudegkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesth ejredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeevvdekie fhudfhhfdtkeelgeffudeigfetjeegfffghfetfeelledugfelleegveenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrg hvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Dec 2021 16:15:55 -0500 (EST) Message-ID: <8e6e38ce-5448-e2f6-a074-c329e437f351@aklaver.com> Date: Wed, 29 Dec 2021 13:15:54 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: csv copy error Content-Language: en-US To: ourdiaspora , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/29/21 13:08, ourdiaspora wrote: > Readers, > > Please could anyone help with the following error produced: > > " > ERROR: invalid input syntax for integer: "1,m " > CONTEXT: COPY exampletable, line 1, column examplenumber: "1,m " > > The database commands: > > " > CREATE TABLE exampletable (examplenumber smallint, > exampletitle varchar(500) > ); > " > > " > \copy exampletable from '/local/path/to/examplefile.csv'; > " \copy exampletable from '/local/path/to/examplefile.csv with csv'; > > CSV file contents: > > " > 1,m > 2,m > 9,t > " > > > -- Adrian Klaver adrian.klaver@aklaver.com