public inbox for [email protected]
help / color / mirror / Atom feedRe: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing
5+ messages / 5 participants
[nested] [flat]
* Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing
@ 2005-01-20 21:11 Magnus Hagander <[email protected]>
2005-01-20 21:23 ` Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing Tom Lane <[email protected]>
2005-01-20 21:28 ` Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags Alexey Borzov <[email protected]>
0 siblings, 2 replies; 5+ messages in thread
From: Magnus Hagander @ 2005-01-20 21:11 UTC (permalink / raw)
To: Tom Lane <[email protected]>; Mike Blackwell <[email protected]>; +Cc: pgsql-docs; [email protected]
>> 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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing
2005-01-20 21:11 Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing Magnus Hagander <[email protected]>
@ 2005-01-20 21:23 ` Tom Lane <[email protected]>
2005-01-20 21:51 ` Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing Alvaro Herrera <[email protected]>
1 sibling, 1 reply; 5+ messages in thread
From: Tom Lane @ 2005-01-20 21:23 UTC (permalink / raw)
To: Magnus Hagander <[email protected]>; +Cc: Mike Blackwell <[email protected]>; pgsql-docs; [email protected]
"Magnus Hagander" <[email protected]> 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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing
2005-01-20 21:11 Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing Magnus Hagander <[email protected]>
2005-01-20 21:23 ` Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing Tom Lane <[email protected]>
@ 2005-01-20 21:51 ` Alvaro Herrera <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Alvaro Herrera @ 2005-01-20 21:51 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Magnus Hagander <[email protected]>; Mike Blackwell <[email protected]>; pgsql-docs; [email protected]
On Thu, Jan 20, 2005 at 04:23:16PM -0500, Tom Lane wrote:
> "Magnus Hagander" <[email protected]> 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 (<alvherre[@]dcc.uchile.cl>)
Al principio era UNIX, y UNIX habló y dijo: "Hello world\n".
No dijo "Hello New Jersey\n", ni "Hello USA\n".
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags
2005-01-20 21:11 Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing Magnus Hagander <[email protected]>
@ 2005-01-20 21:28 ` Alexey Borzov <[email protected]>
1 sibling, 0 replies; 5+ messages in thread
From: Alexey Borzov @ 2005-01-20 21:28 UTC (permalink / raw)
To: Magnus Hagander <[email protected]>; +Cc: Tom Lane <[email protected]>; Mike Blackwell <[email protected]>; pgsql-docs; [email protected]
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.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags
@ 2005-01-21 08:30 Dave Page <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Dave Page @ 2005-01-21 08:30 UTC (permalink / raw)
To: Alexey Borzov <[email protected]>; Magnus Hagander <[email protected]>; +Cc: Tom Lane <[email protected]>; Mike Blackwell <[email protected]>; pgsql-docs; [email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Alexey Borzov
> Sent: 20 January 2005 21:29
> To: Magnus Hagander
> Cc: Tom Lane; Mike Blackwell; [email protected];
> [email protected]
> Subject: Re: [pgsql-www] [DOCS] [BUGS] BUG #1414: DOC -
> pl/Perl hash tags
>
> 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.
Thanks Alexey - fixed in CVS, next docs regen is in about 20 hours.
/D
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2005-01-21 08:30 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-20 21:11 Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags missing Magnus Hagander <[email protected]>
2005-01-20 21:23 ` Tom Lane <[email protected]>
2005-01-20 21:51 ` Alvaro Herrera <[email protected]>
2005-01-20 21:28 ` Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags Alexey Borzov <[email protected]>
2005-01-21 08:30 Re: [DOCS] [BUGS] BUG #1414: DOC - pl/Perl hash tags Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox