output a single and double quote in a string - Mailing list pgsql-novice

From Keith Worthington
Subject output a single and double quote in a string
Date
Msg-id 20050318213530.M19576@narrowpathinc.com
Whole thread Raw
List pgsql-novice
Hi All,

I am trying to create output that contains a dimension and the user would like
to see single quote for feet and double quote for inches.  I have not as yet
stumbled on the solution.

 SELECT length_ft::text || \' ||
        length_in::text || \" AS length_dim,
        width_ft::text || \' ||
        width_in::text || \" AS width_dim
   FROM sales_order.tbl_net_production;

Kind Regards,
Keith

pgsql-novice by date:

Previous
From: "Ryan Riehle"
Date:
Subject: Query optimization
Next
From: Tom Lane
Date:
Subject: Re: Query optimization