Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TPJVs-0003Ov-SF for pgsql-sql@postgresql.org; Fri, 19 Oct 2012 20:49:49 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TPJVo-0004Fg-76 for pgsql-sql@postgresql.org; Fri, 19 Oct 2012 20:49:47 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TPJVn-0006X8-L8 for pgsql-sql@postgresql.org; Fri, 19 Oct 2012 13:49:43 -0700 Date: Fri, 19 Oct 2012 13:49:43 -0700 (PDT) From: lmagnell To: pgsql-sql@postgresql.org Message-ID: <59840952ADE62A4D8003F316611CE8592D889321@MBX243.domain.local> In-Reply-To: <035601cdae39$1deef1a0$59ccd4e0$@yahoo.com> References: <1350678292407-5729104.post@n5.nabble.com> <035601cdae39$1deef1a0$59ccd4e0$@yahoo.com> Subject: Re: Insert strings that contain colons into a table MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_47198_6463166.1350679783623" X-Pg-Spam-Score: -0.8 (/) X-Archive-Number: 201210/45 X-Sequence-Number: 36916 ------=_Part_47198_6463166.1350679783623 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thank you, that is the problem. That column should not have been created as an ARRAY type. Lance From: David Johnston [via PostgreSQL] [mailto:ml-node+s1045698n5729107h79@n5.nabble.com] Sent: Friday, October 19, 2012 4:36 PM To: Lance Magnell Subject: Re: Insert strings that contain colons into a table > -----Original Message----- > From: [hidden email] [mailto:pgsql-sql- > [hidden email]] On Behalf Of lmagnell > Sent: Friday, October 19, 2012 4:25 PM > To: [hidden email] > 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. -- Sent via pgsql-sql mailing list ([hidden email]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql ________________________________ If you reply to this email, your message will be added to the discussion below: http://postgresql.1045698.n5.nabble.com/Insert-strings-that-contain-colons-into-a-table-tp5729104p5729107.html To unsubscribe from Insert strings that contain colons into a table, click here. NAML -- View this message in context: http://postgresql.1045698.n5.nabble.com/Insert-strings-that-contain-colons-into-a-table-tp5729104p5729110.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. ------=_Part_47198_6463166.1350679783623 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Thank you,  that is the problem.  That column should not have been created as an ARRAY type.

 

Lance

 

From: David Johnston [via PostgreSQL] [mailto:ml-node+[hidden email]]
Sent: Friday, October 19, 2012 4:36 PM
To: Lance Magnell
Subject: Re: Insert strings that contain colons into a table

 

> -----Original Message-----
> From: [hidden email] [mailto:pgsql-sql-
> [hidden email]] On Behalf Of lmagnell
> Sent: Friday, October 19, 2012 4:25 PM
> To: [hidden email]
> 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.




--
Sent via pgsql-sql mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


If you reply to this email, your message will be added to the discussion below:

http://postgresql.1045698.n5.nabble.com/Insert-strings-that-contain-colons-into-a-table-tp5729104p5729107.html

To unsubscribe from Insert strings that contain colons into a table, click here.
NAML



View this message in context: RE: Insert strings that contain colons into a table
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
------=_Part_47198_6463166.1350679783623--