From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Gould <dg(at)nextbus(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: 7.2 - changed array_out() - quotes vs no quotes |
Date: | 2002-02-08 05:29:46 |
Message-ID: | 21642.1013146186@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Gould <dg(at)nextbus(dot)com> writes:
> Somewhere after 7.2b2 (it looks like for 7.2b4) a change was made to
> array_out() in:
I will take the blame for that.
> I view this change as a bug and would like to see it backed out.
The old behavior was certainly broken and I will not accept a proposal
to back out the change entirely.
What you are really saying is that you'd prefer the choice of quotes or
no quotes to be driven by the datatype rather than by the data value.
That's a legitimate gripe, but where shall we get the knowledge of whether
the datatype might sometimes emit strings that need quoting? Using the
pass-by-reference flag is *completely* wrong; the fact that it chanced
not to fail in your application does not make it less wrong.
The only way I could see to make the behavior totally predictable at
the datatype level (while not being broken) is to always quote every
array element. However, that would likely break some other people's
oversimplified parsers, so I'm not convinced it's a net win. Perhaps
you should fix your application code rather than relying on a
never-documented behavior.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-02-08 05:44:07 | Re: Why dump/restore to upgrade? |
Previous Message | Darren Johnson | 2002-02-08 05:29:22 | Re: Replication |