Re: string function - "format" function proposal - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: string function - "format" function proposal
Date
Msg-id AANLkTimb16DnN=KUDGHtzrv5FszQEHwVLpZ9dQNtb5KQ@mail.gmail.com
Whole thread Raw
In response to Re: string function - "format" function proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: string function - "format" function proposal
Re: string function - "format" function proposal
List pgsql-hackers
On Mon, Sep 6, 2010 at 10:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> No, you need to use the I/O functions.  Not every type is guaranteed to
> have a cast to text.

One issue is that Pavel want to generate valid SQL statement using
%v format. Boolean values are printed as t or f, so the unquoted
values are not valid syntax.

If we only use output functions, boolean values should be written as
't' or 'f' (single-quoted), Only numeric values can be unquoted on %v.

--
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: git: uh-oh
Next
From: Pavel Stehule
Date:
Subject: Re: string function - "format" function proposal