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

From Pavel Stehule
Subject Re: string function - "format" function proposal
Date
Msg-id AANLkTinh8Wkuq+pLKuKexYD=WKFUVRxhYt2w31Jne4aq@mail.gmail.com
Whole thread Raw
In response to Re: string function - "format" function proposal  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
2010/9/6 Itagaki Takahiro <itagaki.takahiro@gmail.com>:
> 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.

we can format some types directly - but I like idea of casting to text
because there is space for users.

Pavel

>
> 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: Pavel Stehule
Date:
Subject: Re: string function - "format" function proposal
Next
From: Greg Stark
Date:
Subject: Re: Streaming a base backup from master