Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 3E9F1B5DBEE for ; Wed, 6 Jul 2011 19:06:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 14186-02 for ; Wed, 6 Jul 2011 22:06:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iy0-f174.google.com (mail-iy0-f174.google.com [209.85.210.174]) by mail.postgresql.org (Postfix) with ESMTP id C16BDB5DBE6 for ; Wed, 6 Jul 2011 19:06:30 -0300 (ADT) Received: by iyb12 with SMTP id 12so332074iyb.19 for ; Wed, 06 Jul 2011 15:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/V22cIWJSojkewyuyYvnbOPqu9qqveKg/XoCoPnysp8=; b=UqpHp3k2sb5k3ru+OHcbjUjPNV3oE1zP1q3JK1b/jwGVxvvfaGPIBlLUpSy2TrOYfV FCm8FarzpNpvc66gWU/vL6d/fA5NLN87LYXBTEmzrka8ThRWroGfDCNKhdZD6ghR9I7f cv3mSYPnqjGvzWGLu/EAiRaEKvbduhj2gqIvw= Received: by 10.231.141.20 with SMTP id k20mr61052ibu.132.1309989990477; Wed, 06 Jul 2011 15:06:30 -0700 (PDT) Received: from [192.168.1.20] (c-24-17-179-185.hsd1.wa.comcast.net [24.17.179.185]) by mx.google.com with ESMTPS id q13sm2564068ibi.43.2011.07.06.15.06.28 (version=SSLv3 cipher=OTHER); Wed, 06 Jul 2011 15:06:29 -0700 (PDT) Message-ID: <4E14DC63.7040505@gmail.com> Date: Wed, 06 Jul 2011 15:06:27 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: emilu@encs.concordia.ca CC: pgsql-sql@postgresql.org Subject: Re: ERROR: malformed record literal: "",DETAIL: Missing left parenthesis? References: <4E1484F7.5080800@encs.concordia.ca> <4E14B164.9060302@encs.concordia.ca> In-Reply-To: <4E14B164.9060302@encs.concordia.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.889 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201107/23 X-Sequence-Number: 35593 On 07/06/2011 12:03 PM, Emi Lu wrote: > >> A question about: ERROR: malformed record literal: "" >> DETAIL: Missing left parenthesis. >> >> Can someone tell me what cause the error? >> >> ======================== >> Table z_drop; >> Column | Type >> -------------+------------------------ >> run_date | character varying(128) >> adm_year | character varying(4) >> adm_sess | character varying(1) >> faculty | character varying(128) >> ac_cycle | character varying(128) >> deg_code | character varying(128) >> discipline | character varying(128) >> thesis | character varying(128) >> elig_stype | character varying(128) >> stud_source | character varying(128) >> applied | numeric >> reviewed | numeric >> accepted | numeric >> confirmed | numeric >> registered | numeric >> hold | numeric >> forward | numeric >> refused | numeric >> cancelled | numeric >> other | numeric >> pending | numeric >> >> >> PREPARE test(z_drop) AS INSERT INTO z_drop VALUES ($1, $2, $3, $4, $5, >> $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, >> $21) ; > I have fixed it. > > It should not be z_drop, it should be real column names. > > The mailing list email appears so slow :-( Only after 4 hours it show! What happens if you do?: PREPARE test AS INSERT .... My rough guess is that z_drop is being applied to the first parameter only. > > Emi > > >> >> EXECUTE test('', '1', '1', '1', '1', '1', '1', '1', '1', '', 1, 1, '1', >> '0', '0', '0', '0', '0', '0', '0', '0') ; >> >> >> >> >> Thank you, >> Emi >> > > -- Adrian Klaver adrian.klaver@gmail.com