Re: string function - "format" function proposal
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Itagaki Takahiro <itagaki.takahiro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@commandprompt.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-09-06T14:07:02Z
Lists: 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 >