From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexey Klyukin <alexk@commandprompt.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: the '::' cast doesn't work in the FROM clause
Date: Mon, 29 Aug 2011 12:45:36 -0400
Message-ID: <2614.1314636336@sss.pgh.pa.us> (raw)
In-Reply-To: <B4AA1AAA-86F1-4ACC-B02D-0AB86C1A782D@commandprompt.com>
References: <4E5B449602000025000407D9@gw.wicourts.gov>
<CAHyXU0x-MgGEfa+P4+6fR=4q2k542P58QBQqn7cWcEqU3sdGTg@mail.gmail.com>
<4E5B552502000025000407EB@gw.wicourts.gov>
<21023.1314629259@sss.pgh.pa.us>
<B4AA1AAA-86F1-4ACC-B02D-0AB86C1A782D@commandprompt.com>
Alexey Klyukin <alexk@commandprompt.com> writes:
> On Aug 29, 2011, at 5:47 PM, Tom Lane wrote:
>> There is a dump/reload bug though :-( ... if you were to do
>>
>> create view vv as select val from CAST(random() as integer) as val;
>>
>> you will find that the system prints it out with the :: syntax,
>> which won't work.
> Would it be acceptable/sufficient to output CAST(...) instead of '::' for all casts in pg_dump to fix this problem, assuming that CAST can be used anywhere where '::' is accepted?
I'm not really excited about that; CAST is more verbose and not
particularly more readable (at least IMO). What I was wondering about
was altering the internal representation to remember which format had
been used, and reverse-listing in that same format. That would both fix
this issue, and please users who have a stylistic preference for one or
the other format.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alexk@commandprompt.com, Kevin.Grittner@wicourts.gov, mmoncure@gmail.com
Subject: Re: the '::' cast doesn't work in the FROM clause
In-Reply-To: <2614.1314636336@sss.pgh.pa.us>
References: <4E5B449602000025000407D9@gw.wicourts.gov> <CAHyXU0x-MgGEfa+P4+6fR=4q2k542P58QBQqn7cWcEqU3sdGTg@mail.gmail.com> <4E5B552502000025000407EB@gw.wicourts.gov> <21023.1314629259@sss.pgh.pa.us> <B4AA1AAA-86F1-4ACC-B02D-0AB86C1A782D@commandprompt.com> <2614.1314636336@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox