Re: bug in contrib/adddepend

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug in contrib/adddepend
Date: 2003-02-23 02:12:22
Message-ID: 1045966341.84130.12.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2003-02-20 at 22:08, Christopher Kings-Lynne wrote:
> Hi,
>
> I just noticed a bug in adddepend:
>
> The below commands will upgrade the foreign key style. Shall I execute
> them?
>
> DROP TRIGGER "RI_ConstraintTrigger_1105102" ON news_authors;
> DROP TRIGGER "RI_ConstraintTrigger_1105103" ON news_authors;
> DROP TRIGGER "RI_ConstraintTrigger_1105118" ON news_articles;
>
> ALTER TABLE news_articles ADD CONSTRAINT "&lt;unnamed&gt;" FOREIGN
> KEY (author)
> REFERENCES news_authors(id) MATCH SIMPLE ON UPDATE NO
> ACTION ON DELETE NO ACTION;
>
>
> See how it's HTMLised the foreign key name? I cannot find how $keyname in
> the code is being html escaped. Perhaps it's some weird taint mode thing?

Not to mention when it's <unnamed>, the code is setup to ignore the
constraint name entirely (line 267).

There isn't anything that changes the value of $keyname after it's
pulled from the DBI drivers. What version of DBI::Pg are you using?

Last time I used it was with DBI::Pg v1.13.

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-02-23 03:13:07 Re: [HACKERS] loading libraries on Postmaster startup
Previous Message Peter Eisentraut 2003-02-23 01:40:21 Re: [HACKERS] loading libraries on Postmaster startup