Received: from cms-smtp.state.il.us (cms-smtp.state.il.us [163.191.183.101]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA68987 for ; Fri, 25 Feb 2000 00:07:32 -0500 (EST) (envelope-from ) Received: from cms.state.il.us ([10.2.20.239] (may be forged)) by cms-smtp.state.il.us (2.5 Build 2639 (Berkeley 8.8.6)/8.8.4) with ESMTP id XAA01671 for ; Thu, 24 Feb 2000 23:00:17 -0600 Received: from cms-smtp.state.il.us ([163.191.183.101]) by cms.state.il.us (Lotus Domino Release 5.0.1a) with ESMTP id 2000022423085125:17962 ; Thu, 24 Feb 2000 23:08:51 -0600 Received: from ccmailgw.state.il.us (ccmailgw.state.il.us [163.191.171.80]) by cms-smtp.state.il.us (2.5 Build 2639 (Berkeley 8.8.6)/8.8.4) with SMTP id XAA01669 for ; Thu, 24 Feb 2000 23:00:13 -0600 From: Postmaster@state.il.us Received: from POP3 Client by ccmailgw.state.il.us (ccMail Link to SMTP R8.30.00.7) id AA951455191; Thu, 24 Feb 2000 23:06:33 -0600 Message-Id: <0002249514.AA951455191@ccmailgw.state.il.us> X-Mailer: ccMail Link to SMTP R8.30.00.7 Date: Thu, 24 Feb 2000 23:48:29 -0600 To: pgsql-sql@postgreSQL.org Cc: , Subject: DELIVERY FAILURE: User laszlo_acs (laszlo_acs@cms.state.il.us) not listed in public Name & Address Book MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on CMS084L1/CCC/CMS/ILL(Release 5.0.1a|August 17, 1999) at 02/24/2000 11:08:51 PM, Serialize by Router on CMS084L1/CCC/CMS/ILL(Release 5.0.1a|August 17, 1999) at 02/24/2000 11:08:54 PM, Serialize complete at 02/24/2000 11:08:54 PM X-Priority: 3 (Normal) Content-Type: multipart/report; report-type=delivery-status; boundary="==IFJRGLKFGIR18042UHRUHIHD" --==IFJRGLKFGIR18042UHRUHIHD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Your message Subject: Re: [INTERFACES] arrays of varchar and " was not delivered to: laszlo_acs@cms.state.il.us because: User laszlo_acs (laszlo_acs@cms.state.il.us) not listed in public Name & Address Book --==IFJRGLKFGIR18042UHRUHIHD Content-Type: message/delivery-status Reporting-MTA: dns;cms.state.il.us Final-Recipient: rfc822;laszlo_acs@cms.state.il.us Action: failed Status: 5.1.1 Diagnostic-Code: X-Notes; User laszlo_acs (laszlo_acs@cms.state.il.us) not listed in public Name & Address Book --==IFJRGLKFGIR18042UHRUHIHD Content-Type: message/rfc822 Received: from cms-smtp.state.il.us ([163.191.183.101]) by cms.state.il.us (Lotus Domino Release 5.0.1a) with ESMTP id 2000022423085125:17962 ; Thu, 24 Feb 2000 23:08:51 -0600 Received: from ccmailgw.state.il.us (ccmailgw.state.il.us [163.191.171.80]) by cms-smtp.state.il.us (2.5 Build 2639 (Berkeley 8.8.6)/8.8.4) with SMTP id XAA01669 for ; Thu, 24 Feb 2000 23:00:13 -0600 From: pgsql-sql@postgreSQL.org Received: from POP3 Client by ccmailgw.state.il.us (ccMail Link to SMTP R8.30.00.7) id AA951455191; Thu, 24 Feb 2000 23:06:33 -0600 Message-Id: <0002249514.AA951455191@ccmailgw.state.il.us> X-Mailer: ccMail Link to SMTP R8.30.00.7 Date: Thu, 24 Feb 2000 23:48:29 -0600 To: Cc: , Subject: Re: [INTERFACES] arrays of varchar and " MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on CMS084L1/CCC/CMS/ILL(Release 5.0.1a|August 17, 1999) at 02/24/2000 11:08:51 PM, Serialize by Router on CMS084L1/CCC/CMS/ILL(Release 5.0.1a|August 17, 1999) at 02/24/2000 11:08:54 PM, Serialize complete at 02/24/2000 11:08:54 PM X-Priority: 3 (Normal) Content-Type: multipart/mixed; boundary="simple boundary" --simple boundary Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Content-Description: "cc:Mail Note Part" I wrote: > Tim Kane writes: >> I want to insert a number of array elements here... >> insert into my_table values ('{"value 1", "value 2", "value 3"}'); >> Fine. >> What do I do however, when I want to insert an array element that >> contains a " character? > Hmm. It looks like array_in tries to deal with backslashed quotes in > array elements; not sure why it's not working exactly. Ah, I see ;-) The correct expression if you want, say, `value "22"a' in your middle array item is insert into my_table values ('{"value 1", "value \\"22\\"a", "value 3"}'); You need double backslashes because one level of backslashing will get stripped off when the lexer handles the string constant '{...}'. Then what arrives at the array-datatype input converter will be {"value 1", "value \"22\"a", "value 3"} which accomplishes what you want. There is actually a bug here: when you write it with zero or one backslashes, the array input converter is presented with {"value 1", "value "22"a", "value 3"} which by all rights should trigger a "malformed array constant" error message. But it fails to do so; instead the `"value "22' part is just dropped on the floor, and the "a" part is taken as the second array element value. The input converter should complain about this input, I think --- though I'm not quite sure what it should complain about and what it should accept as an unquoted array element, as in {123.45, 456.66}. Comments anyone? regards, tom lane PS: if you want to comment, please reply to the pgsql-sql list, which seems more appropriate for this issue. ************ --simple boundary-- --==IFJRGLKFGIR18042UHRUHIHD--