From alex.thegreat@ambix.net Fri Aug 17 16:01:48 2012 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2Ozc-00082x-Ma for pgsql-sql@postgresql.org; Fri, 17 Aug 2012 16:01:48 +0000 Received: from upwithsocialmedia.com ([192.217.104.86] helo=promomerch1.servername.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2Ozb-0004yL-HM for pgsql-sql@postgresql.org; Fri, 17 Aug 2012 16:01:48 +0000 Received: from [186.4.31.36] (port=51684 helo=[192.168.51.8]) by promomerch1.servername.com with esmtpa (Exim 4.77) (envelope-from ) id 1T2OzZ-0001LY-HL for pgsql-sql@postgresql.org; Fri, 17 Aug 2012 16:01:45 +0000 Message-Id: From: Alex To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=Apple-Mail-58--307798332 Mime-Version: 1.0 (Apple Message framework v936) Subject: Error: Template Id should be teh identifier of a template - help Date: Fri, 17 Aug 2012 09:58:25 -0600 X-Mailer: Apple Mail (2.936) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - promomerch1.servername.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - ambix.net X-Pg-Spam-Score: 0.8 (/) X-Archive-Number: 201208/17 X-Sequence-Number: 36788 --Apple-Mail-58--307798332 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi, All! When I execute this: UPDATE HTMLPAGE SET PAGE_URL = REPLACE(PAGE_URL, '.dot', '.html') WHERE PAGE_URL LIKE '%.dot'; I get the following error from psql. Could you tell me what is wrong or how to fix it? Thanks, Alex > Failed to execute SQL : SQL UPDATE HTMLPAGE SET PAGE_URL = > REPLACE(PAGE_URL, '.dot', '.html') WHERE PAGE_URL LIKE '%.dot'; > failed : ERROR: Template Id should be the identifier of a template --Apple-Mail-58--307798332 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable

Hi, = All!

When I execute = this:

UPDATE HTMLPAGE SET = PAGE_URL =3D REPLACE(PAGE_URL, '.dot', '.html') WHERE PAGE_URL LIKE = '%.dot';

I get the = following error from psql.  Could you tell me what is wrong or how = to fix = it?

Thanks,

Alex

Failed to = execute SQL : SQL UPDATE HTMLPAGE SET PAGE_URL =3D = REPLACE(PAGE_URL, '.dot', '.html') WHERE PAGE_URL LIKE = '%.dot'; failed : ERROR: Template Id should be the = identifier of a = template

= --Apple-Mail-58--307798332-- From polobo@yahoo.com Fri Aug 17 16:18:23 2012 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2PFf-0003VJ-9g for pgsql-sql@postgresql.org; Fri, 17 Aug 2012 16:18:23 +0000 Received: from smtp102.prem.mail.ac4.yahoo.com ([76.13.13.41]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1T2PFd-0005Kc-JK for pgsql-sql@postgresql.org; Fri, 17 Aug 2012 16:18:22 +0000 Received: (qmail 71683 invoked from network); 17 Aug 2012 16:18:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=xEKqAeX4WVLvHAs98QqbNK49eobxs19PNOhcndD16BxrqoVRbKEtRr0eAMKkhIa2utjnQprzQ3Qy2okq+iKUMELMUsNp2Z+r5cCnVmz7EmPr4dIrMwmqEOpE0q2uYlDKNLPnyxg9X5rQgV3ctCf7FFDKWIx4kYkD4Bak+cVXfx0= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1345220300; bh=iSRPE6tNlQKHP24Z4ehskxV3t9GTW/9Qe4elFvtQQWg=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=N18iNivkXfeGy2HPRHYxCKWpJTeTYphFRxVcKCN2J5SFKWfxWnjppc+vzFcYVm8DoSUi7HOsb+i3UJMSFemqu0pUzxdioP0yOP8YZBpldJgKe3c1CmfKYB2tbmGkGU8FuTLcbQZeLycs0TBaYOKoH2luWjRXeoSoTFGjAVAL5Uc= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 5kz6yawVM1lP94rYx.tAqEeyJ9usjy5J1HZJrFwbTjFAKds Eelc35BSX1fu6MrMtUEwVGjYi3e0Kqo1mVtcBLz.gX1ET66Aj2wT3cTfyx4j xrGjl79AMXSBgIlxTWWElIs0vLW4suXe0qlkm6cy7g6eAMJJMcEEYCcbbuCN CfEKMv.X0XBQLRx6LfVGeu4DcmqucJC16aab3L661zQZvoJ92zFIC0sg6qW6 DR5OkEFK_pYhjm8w5N0ywHbeRbtf9p8g6b2iIJRUxwGH18qeSle.GH7N9C42 nEA.PvPCsl_rSwS4L9KZTLLp9E3H1ZrJgXW3n40DzpGhfA0qzRfN7Fv4WKGr _c47zFPAUxQ2pOSvxqd3NGzuYq5qQmSbq15chxt32vdvaNR_k5cBJbow2710 .THxFoMAcdA1h2cXavqvPBRi0rxxgBEYzxyN3 X-Yahoo-SMTP: mpGJl6eswBD2IBufoVEg0Pa8gg-- Received: from WolfDog (polobo@24.93.23.188 with login) by smtp102.prem.mail.ac4.yahoo.com with SMTP; 17 Aug 2012 16:18:19 +0000 UTC From: "David Johnston" To: "'Alex'" , References: In-Reply-To: Subject: Re: Error: Template Id should be teh identifier of a template - help Date: Fri, 17 Aug 2012 12:18:16 -0400 Message-ID: <008201cd7c93$e8c0d240$ba4276c0$@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHKa+DWRGy+d6SMNXh0D8PTX27DfJdkTrfw Content-Language: en-us X-Pg-Spam-Score: -0.5 (/) X-Archive-Number: 201208/19 X-Sequence-Number: 36790 From: pgsql-sql-owner@postgresql.org = [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Alex Sent: Friday, August 17, 2012 11:58 AM To: pgsql-sql@postgresql.org Subject: [SQL] Error: Template Id should be teh identifier of a template = - help Hi, All! When I execute this: UPDATE HTMLPAGE SET PAGE_URL =3D REPLACE(PAGE_URL, '.dot', '.html') = WHERE PAGE_URL LIKE '%.dot'; I get the following error from psql. =A0Could you tell me what is wrong = or how to fix it? Thanks, Alex Failed to execute SQL : SQL=A0UPDATE HTMLPAGE SET PAGE_URL =3D = REPLACE(PAGE_URL, '.dot', '.html') WHERE PAGE_URL LIKE '%.dot';=A0failed :=A0ERROR: = Template Id should be the identifier of a template =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =3D=3D This seems to be an application error and not something PostgreSQL is issuing on its own. The htmlpage table seems to have an update trigger = on it that checks for the validity of a template id. Since it is a trigger = and not a constraint it is possible/likely the trigger was added without validating existing data. Your update must hit one or more records that = do not meet the conditions that the triggers sets forth so the trigger = performs a "RAISE ERROR 'Template Id should be the identifier of a template'". = You will need to speak with someone responsible for maintaining the = database. David J. From tgl@sss.pgh.pa.us Fri Aug 17 17:29:03 2012 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2QM3-0000ao-AP for pgsql-sql@postgresql.org; Fri, 17 Aug 2012 17:29:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2QM1-0006nk-H1 for pgsql-sql@postgresql.org; Fri, 17 Aug 2012 17:29:02 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q7HHSx1P017351; Fri, 17 Aug 2012 13:28:59 -0400 (EDT) From: Tom Lane To: Alex cc: pgsql-sql@postgresql.org Subject: Re: Error: Template Id should be teh identifier of a template - help In-reply-to: References: Comments: In-reply-to Alex message dated "Fri, 17 Aug 2012 09:58:25 -0600" Date: Fri, 17 Aug 2012 13:28:58 -0400 Message-ID: <17350.1345224538@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/18 X-Sequence-Number: 36789 Alex writes: > When I execute this: > UPDATE HTMLPAGE SET PAGE_URL = REPLACE(PAGE_URL, '.dot', '.html') > WHERE PAGE_URL LIKE '%.dot'; > I get the following error from psql. Could you tell me what is wrong > or how to fix it? >> Failed to execute SQL : SQL UPDATE HTMLPAGE SET PAGE_URL = >> REPLACE(PAGE_URL, '.dot', '.html') WHERE PAGE_URL LIKE '%.dot'; >> failed : ERROR: Template Id should be the identifier of a template That is not any built-in Postgres error message. Perhaps it is coming from a trigger function or some such? In any case, we can't help you. You need to identify what layer of software it's coming from, and complain to the appropriate people. regards, tom lane