|
|
 | | From: | Magnus Hagander | | Subject: | Re: [BUGS] BUG #1414: DOC - pl/Perl hash tags missing | | Date: | Thu, 20 Jan 2005 22:11:07 +0100 |
|
|
 | >> In the pl/Perl section of the 8.0.0 manual, as viewed on the >postgresql.org >> web site, all perl code hash tags seem to be missing. i.e. > >Yeah, I see the same; but it's not in the devel docs. Compare > http://www.postgresql.org/docs/8.0/static/plperl.html > http://developer.postgresql.org/docs/postgres/plperl.html >and look for instance at the empcomp() function about halfway down >the page: > return $emp-> + $emp->; >vs > return $emp->{basesalary} + $emp->{bonus}; > >Any theories what's wrong here?
Going out on a line a bit here - and someone who've worked with teh system probably knows for sure but... It looks like {} is used as the template placeholder in the templating system on the website.
It would seem to me that the fix would be as simple as to set $removeUnknownVariables to false when parsing the docs template, but I'm far from sure at that. And I have no way to test it. And it might break something else. End of disclaimers.
Anyway. If it helped one of the web guys in the right direction (assuming it was right), then there was some point to this post ;-)
//Magnus
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
|
|
 | | From: | Tom Lane | | Subject: | Re: [BUGS] BUG #1414: DOC - pl/Perl hash tags missing | | Date: | Thu, 20 Jan 2005 16:23:16 -0500 |
|
|
 | "Magnus Hagander" writes: > Going out on a line a bit here - and someone who've worked with teh > system probably knows for sure but... It looks like {} is used as the > template placeholder in the templating system on the website.
> It would seem to me that the fix would be as simple as to set > $removeUnknownVariables to false when parsing the docs template, but I'm > far from sure at that. And I have no way to test it. And it might break > something else. End of disclaimers.
If the docs template is applying any substitution whatsoever to the documentation HTML files, it's broken. I don't think the above fix is appropriate --- what if the docs contain {foo} where foo does match some variable known to the substituter?
regards, tom lane
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
|
|
 | | From: | Alvaro Herrera | | Subject: | Re: [BUGS] BUG #1414: DOC - pl/Perl hash tags missing | | Date: | Thu, 20 Jan 2005 18:51:16 -0300 |
|
|
 | On Thu, Jan 20, 2005 at 04:23:16PM -0500, Tom Lane wrote: > "Magnus Hagander" writes: > > Going out on a line a bit here - and someone who've worked with teh > > system probably knows for sure but... It looks like {} is used as the > > template placeholder in the templating system on the website. > > > It would seem to me that the fix would be as simple as to set > > $removeUnknownVariables to false when parsing the docs template, but I'm > > far from sure at that. And I have no way to test it. And it might break > > something else. End of disclaimers. > > If the docs template is applying any substitution whatsoever to the > documentation HTML files, it's broken. I don't think the above fix > is appropriate --- what if the docs contain {foo} where foo does match > some variable known to the substituter?
Probably the solution is to use some sort of template escaping, like {literal} in PHP's smarty. Not sure what the site is using.
-- Alvaro Herrera () Al principio era UNIX, y UNIX habló y dijo: "Hello world\n". No dijo "Hello New Jersey\n", ni "Hello USA\n".
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org
|
|
 | | From: | Alexey Borzov | | Subject: | Re: [pgsql-www] [BUGS] BUG #1414: DOC - pl/Perl hash tags | | Date: | Fri, 21 Jan 2005 00:28:44 +0300 |
|
|
 | Hi,
Magnus Hagander wrote: >>>In the pl/Perl section of the 8.0.0 manual, as viewed on the >> >>postgresql.org >> >>>web site, all perl code hash tags seem to be missing. i.e. >> >>Yeah, I see the same; but it's not in the devel docs. Compare >> http://www.postgresql.org/docs/8.0/static/plperl.html >> http://developer.postgresql.org/docs/postgres/plperl.html >>and look for instance at the empcomp() function about halfway down >>the page: >> return $emp-> + $emp->; >>vs >> return $emp->{basesalary} + $emp->{bonus}; >> >>Any theories what's wrong here? > > > Going out on a line a bit here - and someone who've worked with teh > system probably knows for sure but... It looks like {} is used as the > template placeholder in the templating system on the website.
Yes, that's exactly the case...
> It would seem to me that the fix would be as simple as to set > $removeUnknownVariables to false when parsing the docs template, but I'm > far from sure at that. And I have no way to test it. And it might break > something else. End of disclaimers.
The clean solution would be to use $tpl->setOption('preserve_data', true);
In this case there will be no problems even if a known placeholder appears in the docs.
Sorry, cannot fix it myself right now, don't want to checkout the website code as there is a sh*tload of PDF docs in there.
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
|
|
|