Re: quote_boolean() and friends missing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: quote_boolean() and friends missing
Date
Msg-id 2081.1119276080@sss.pgh.pa.us
Whole thread Raw
In response to quote_boolean() and friends missing  (Markus Bertheau ☭ <twanger@bluetwanger.de>)
Responses Re: quote_boolean() and friends missing
List pgsql-hackers
Markus Bertheau ☭ <twanger@bluetwanger.de> writes:
> I'm writing an application with a lot of PL/pgSQL and am constructing
> SQL queries on the fly. The quote_literal() and quote_ident() functions
> proved very much needed. Similarly, I need functions that return the SQL
> representation of all the other datatypes, not just TEXT: quote_boolean
> (), quote_date() and so on. For the sake of completeness I think these
> functions should exist. While the use of to_char() resp. decode() for
> some types is possible, it does feel like a workaround to me. Opinions?
> Do these functions belong in the PostgreSQL core?

What exactly do you think they would do?  There is no analogy to
inserting escape characters for those other datatypes.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] default database creation with initdb
Next
From: Markus Bertheau ☭
Date:
Subject: Re: quote_boolean() and friends missing