Extending SQL C-language multidimension arrays

Поиск
Список
Период
Сортировка
От Chris Schnaufer
Тема Extending SQL C-language multidimension arrays
Дата
Msg-id 997B20BEC20E0143959C7817FFA08B96491D9C0A01@Aurora
обсуждение исходный текст
Ответы Re: Extending SQL C-language multidimension arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

I am using Postgrsql 9.0 and writing a C-language extension. The extension takes an n-dimension array and performs a lookup on that array. Right now I’m stuck on determining the dimensions of the array data passed in. No matter what I pass in as the array parameter (the first parameter) I’m getting a ARR_NDIM of 2.

 

For example, I get an ARRY_DIM of 2 for each of these queries:

 

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.

 

Is this a bug or am I missing something?


NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful.   ­­  

В списке pgsql-general по дате отправления:

Предыдущее
От: gautam kumar
Дата:
Сообщение: Need help to debug a code
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Extending SQL C-language multidimension arrays