Re: Insert strings that contain colons into a table

Поиск
Список
Период
Сортировка
От lmagnell
Тема Re: Insert strings that contain colons into a table
Дата
Msg-id 59840952ADE62A4D8003F316611CE8592D889321@MBX243.domain.local
обсуждение исходный текст
Ответ на Re: Insert strings that contain colons into a table  ("David Johnston" <polobo@yahoo.com>)
Список pgsql-sql

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.

В списке pgsql-sql по дате отправления:

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Insert strings that contain colons into a table
Следующее
От: Liam Caffrey
Дата:
Сообщение: Recursive temporal query