Thread

  1. Workaround for html output formatting feature?

    Marc Howard Zuckman <marc@fallon.classyad.com> — 2001-09-07T03:29:33Z

    There is a change in html output construction in the 7.1 series
    that I have had difficulty handling.
    
    In a prior version (7.0.x, I think) invoking psql with -H command line
    switch and a select statement of the following form:
    
    select '<a href="' || table.url || '">' || 'link text </a>' from table
       where ....
    
    produced a  html table with "clickable" links.
    
    In 7.1.3, if html output is selected, the angle brackets are
    output as &lt; or &gt;  .  I see the need for the change in
    this behaviour, but it hampers my use of postgresql to generate
    html tags.
    
    Modifying the select statement to include hex or octal character
    equivalents for the angle brackets produces the same results as does
    use of the &#9001; / &#9002; constructs.
    
    Short of outputing the query results as text and generating
    the html on my own, is there an intrinsic postgresql solution to
    this issue?
    
    -- 
    Marc Zuckman
    marc@fallon.classyad.com