Re: string function - "format" function proposal

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: string function - "format" function proposal
Date: 2010-09-06 14:07:02
Message-ID: AANLkTinh8Wkuq+pLKuKexYD=WKFUVRxhYt2w31Jne4aq@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/9/6 Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>:
> On Mon, Sep 6, 2010 at 10:47 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2010-09-06 14:07:59 Re: Streaming a base backup from master
Previous Message Itagaki Takahiro 2010-09-06 14:04:25 Re: string function - "format" function proposal