Re: Error: Template Id should be teh identifier of a template - help

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'Alex'" <alex(dot)thegreat(at)ambix(dot)net>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Error: Template Id should be teh identifier of a template - help
Date: 2012-08-17 16:18:16
Message-ID: 008201cd7c93$e8c0d240$ba4276c0$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org]
On Behalf Of Alex
Sent: Friday, August 17, 2012 11:58 AM
To: pgsql-sql(at)postgresql(dot)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 = 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

============================================================================
==

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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2012-08-17 17:28:58 Re: Error: Template Id should be teh identifier of a template - help
Previous Message Alex 2012-08-17 15:58:25 Error: Template Id should be teh identifier of a template - help