X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id EA6A4D1B4EF for ; Tue, 7 Oct 2003 13:48:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 16172-02 for ; Tue, 7 Oct 2003 10:47:28 -0300 (ADT) Received: from smtp101.mail.sc5.yahoo.com (smtp101.mail.sc5.yahoo.com [216.136.174.139]) by svr1.postgresql.org (Postfix) with SMTP id 3BA67D1B4E9 for ; Tue, 7 Oct 2003 10:47:24 -0300 (ADT) Received: from ptil-138-190-chn.primus-india.net (HELO IVESIA67) (sgnerd@203.196.190.138 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 7 Oct 2003 12:52:32 -0000 Message-ID: <027101c38cd2$9580e8a0$7502a8c0@hdsc.com> Reply-To: "Kumar" From: "Kumar" To: "psql" Subject: Problem with Escape charactor Date: Tue, 7 Oct 2003 18:27:21 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0254_01C38D00.A5BBA380" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.5 tagged_above=0.0 required=5.0 tests=HTML_30_40, RCVD_IN_OSIRUSOFT_COM X-Spam-Level: * X-Archive-Number: 200310/78 X-Sequence-Number: 15478 This is a multi-part message in MIME format. ------=_NextPart_000_0254_01C38D00.A5BBA380 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear Friends, I am working with Postgres 7.3.4 on RH Linux 7.2 . I am executing a dynamic= query inside a PL/pgSQL procedure and I am having the following problem. While a line in the PL/pgSQL function is like the following EXECUTE 'update "WATS".action_plan_master set rec_deleted_flag =3D 'Y'= WHERE action_plan_id IN ('|| p_action_plan_ids || ')'; I got the following error. ERROR: parser: parse error at or near "Y" at character 68 While EXECUTE 'update "WATS".action_plan_master set rec_deleted_flag =3D '|| = 'Y' ||' WHERE action_plan_id IN ('|| p_action_plan_ids || ')'; Error is=20 ERROR: Attribute "y" not found While EXECUTE 'update "WATS".action_plan_master set rec_deleted_flag =3D '|| = \'Y\' ||' WHERE action_plan_id IN ('|| p_action_plan_ids || ')'; Error is WARNING: plpgsql: ERROR during compile of sp_del_met_001 near line 47 ERROR: unterminated string How can I specify a string charactor, as the PgAdmin3 is not using double q= uotes for Strings. Anyone pls shed some light. Regards Kumar ------=_NextPart_000_0254_01C38D00.A5BBA380 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear Friends,
 
I am working with Postgres 7.3.4 on RH Linux 7.2 . I am= =20 executing a dynamic query inside a PL/pgSQL procedure and I am having the= =20 following problem.
 
While a line in the PL/pgSQL function is like the=20 following
    EXECUTE 'update=20 "WATS".action_plan_master set rec_deleted_flag =3D  'Y' WHERE action_p= lan_id=20 IN ('|| p_action_plan_ids || ')';
I got the following error.
    ERROR:  parser: parse error= at or=20 near "Y" at character 68
 
While
    EXECUTE 'update=20 "WATS".action_plan_master set rec_deleted_flag =3D '|| 'Y' ||' WHERE=20 action_plan_id IN ('|| p_action_plan_ids || ')';
Error is
    ERROR:  Attribute "y" not= =20 found
 
While
    EXECUTE 'update=20 "WATS".action_plan_master set rec_deleted_flag =3D '|| \'Y\' ||' WHERE=20 action_plan_id IN ('|| p_action_plan_ids || ')';
Error is
    WARNING:  plpgsql: ERROR du= ring=20 compile of sp_del_met_001 near line 47
    ERROR: = =20 unterminated string
 
How can I specify a string charactor, as the PgAdmin3 i= s not=20 using double quotes for Strings. Anyone pls shed some light.
 
Regards
Kumar

------=_NextPart_000_0254_01C38D00.A5BBA380--