From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alexey Klyukin <alexk(at)commandprompt(dot)com> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: the '::' cast doesn't work in the FROM clause |
Date: | 2011-08-29 16:45:36 |
Message-ID: | 2614.1314636336@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Alexey Klyukin <alexk(at)commandprompt(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Steven Williams | 2011-08-29 17:19:48 | BUG #6182: /etc/init.d/postgresql-8.4 is incomplete for chkconfig |
Previous Message | Tom Lane | 2011-08-29 16:27:43 | Re: BUG #6181: concat_ws() incompatibility with MySQL |