Skip site navigation (1) Skip section navigation (2)

Re: string function - "format" function proposal

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, 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:04:25
Message-ID: AANLkTimb16DnN=KUDGHtzrv5FszQEHwVLpZ9dQNtb5KQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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.

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

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2010-09-06 14:07:02
Subject: Re: string function - "format" function proposal
Previous:From: Pavel StehuleDate: 2010-09-06 14:04:07
Subject: Re: string function - "format" function proposal

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group