Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TPJHg-00073f-LD for pgsql-sql@postgresql.org; Fri, 19 Oct 2012 20:35:08 +0000 Received: from nm7-vm0.bullet.mail.ac4.yahoo.com ([98.139.52.228]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TPJHZ-0003nQ-U8 for pgsql-sql@postgresql.org; Fri, 19 Oct 2012 20:35:08 +0000 Received: from [98.139.52.194] by nm7.bullet.mail.ac4.yahoo.com with NNFMP; 19 Oct 2012 20:35:00 -0000 Received: from [76.13.13.40] by tm7.bullet.mail.ac4.yahoo.com with NNFMP; 19 Oct 2012 20:35:00 -0000 Received: from [127.0.0.1] by smtp101.prem.mail.ac4.yahoo.com with NNFMP; 19 Oct 2012 20:35:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1350678900; bh=OQtBKK4Te578RIE+yKPidbTFB4u2MQ3lF6jBclHYPz0=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=mO5qI5Q0QzGuCixMnNaxNFQYDtJx/8lRlQbJi2vkhdIM4zEPRXYNfq8evNnX7i6El6KykLg+AjSlsaK9TNbMQ1x3B2ovRw9hkDruMYz5NMR3mYFSNdEaBMcoYzxXtmKQKSHxCOqn0vP7Rl0NnAHMS6p3D0iCCmpnlWPSvIZzFRE= X-Yahoo-Newman-Id: 314419.64076.bm@smtp101.prem.mail.ac4.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: J69_Z1sVM1nWlX6Ubk9yaA1Gx..otrPBHz862zjkVqMwOJR 7jcmaKgGxDnO7WwQYgxrho5Uf1kI4M41lWnXHhioZtXJ_xc8iHY5rVO1BD8C YhvEb3nUvdS6e2Cfs6LoxC2ImCQ4.vWxFoiq_fRz.2.2SoqT7mOqzH0cK9Yy jfwcM2uxj2L6cdvlpUa8gEQaZvlU8EidnGkY_nCRl8G7_fq6OXCWJ1nuYTsQ Wi4QNH3ZoIpoit7H9E8e90SiKakfxODTx032R1XjxWAgfKSolpHtCxU276HM zzuq8YSj2AyFi4tPNyBymSJIPBo_gp87qwHzcW.Z1QxImmfKTyB4.df8OnMy dL08UVJv.prhNuVfsBZE.uQuwVNyISZ8thd9r9tAlFDmi6PVz.wc3hbWVz5_ 48QG5b8_p.gwDuYNHFn7D.6DAYec9qPEoCJpsjxnU5jl8tj_RpFNdkEBascL m_.h0 X-Yahoo-SMTP: mpGJl6eswBD2IBufoVEg0Pa8gg-- Received: from WolfDog (polobo@24.93.23.188 with login) by smtp101.prem.mail.ac4.yahoo.com with SMTP; 19 Oct 2012 13:35:00 -0700 PDT From: "David Johnston" To: "'lmagnell'" , References: <1350678292407-5729104.post@n5.nabble.com> In-Reply-To: <1350678292407-5729104.post@n5.nabble.com> Subject: Re: Insert strings that contain colons into a table Date: Fri, 19 Oct 2012 16:34:19 -0400 Message-ID: <035601cdae39$1deef1a0$59ccd4e0$@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQLvgiwBYucSlJRXnefCBC31VICG+ZV9bJ7Q Content-Language: en-us X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201210/44 X-Sequence-Number: 36915 > -----Original Message----- > From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql- > owner@postgresql.org] On Behalf Of lmagnell > Sent: Friday, October 19, 2012 4:25 PM > To: pgsql-sql@postgresql.org > Subject: [SQL] Insert strings that contain colons into a table > > How can I insert multiple strings into a table where the strings contain colons. > This case fails: > > INSERT INTO wwn (wwn_start,wwn_end) VALUES > ('50:06:0B:00:00:C2:86:80','50:06:0B:00:00:C2:86:83'); > ERROR: array value must start with "{" or dimension information at character > 71 LINE 1: ..._start,wwn_end) VALUES ('50:06:0B:00:00:C2:86:80','50:06:0B:... > > But this case passes: > > INSERT INTO wwn (wwn_start) VALUES ('50:06:0B:00:00:C2:86:80'); > > Thank you, > Lance > The "colon" has nothing to do with it. It appears that "wwn_end" is defined as an array and not a simple text value. You need to provide the table definition for "wwn". This is a section in the documentation regarding arrays but I am guessing the use of an array in this situation is a mistake. http://www.postgresql.org/docs/9.0/interactive/arrays.html David J.