| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Marcelo Zabani <mzabani(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Insertion of geometric type column with column[0], column[1] and etc. |
| Date: | 2010-10-05 13:12:05 |
| Message-ID: | AANLkTinP+RLPWiS90J18LitBizJTWbprMwS0_HRr_U87@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Oct 5, 2010 at 12:11 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Yeah, but isn't the current behavior awfully flaky?
>
> The reason the particular case acts so oddly is there's no such thing as
> half a point: you can't have a point with one null and one non-null
> component. So there's no way to construct the value incrementally,
> which is what that syntax implies doing. What actually happens is that
> "foo[0] := something" results in a NULL point if the initial value of
> foo was NULL, and then the same again for "foo[1] := something".
> I suppose we could have these cases throw an error instead, but that's
> not a lot better from the standpoint of functionality ... and I
> certainly don't wish to try to introduce partially-null point values.
Well, I think the user might expect foo[0] and foo[1] to get assigned
to simultaneously rather than iteratively.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Aidan Van Dyk | 2010-10-05 13:33:57 | Re: is sync rep stalled? |
| Previous Message | Dean Rasheed | 2010-10-05 13:08:59 | Re: wip: functions median and percentile |