Re: Extending SQL C-language multidimension arrays

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Schnaufer <chris(dot)schnaufer(at)pictometry(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Extending SQL C-language multidimension arrays
Date: 2012-06-09 15:18:00
Message-ID: 28511.1339255080@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Schnaufer <chris(dot)schnaufer(at)pictometry(dot)com> writes:
> SELECT getone(ARRAY[[10.1,11.2,12.3],[20.1,21.2,22.3]], POINT(1.0,1.0), 1.5, 1.0, 1.0);
> SELECT getone(ARRAY[[10.1,11.2,12.3],[20.1,21.2,22.3],[31.1,33.2,35.3],[44.1,45.2,46.3]], POINT(1.0,1.0), 1.5, 1.0, 1.0);

> To my way of thinking about these arrays, I should be getting the ARR_NDIM answer of 2 for the first query and an ARR_NDIM answer of 4 for the second one.

No, those both look like 2-dimensional arrays to me. You'd need to look
at the contents of the ARR_DIMS vectors to tell the difference between them.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Williams 2012-06-09 22:29:50 Run external SQL file via Perl dbh
Previous Message Adrian Klaver 2012-06-09 14:30:14 Re: pass NEW / OLD variable in trigger to table