Search Postgresql Archives

Re: plpgsql multidimensional array assignment results in array of text instead of subarrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 28, 2015 at 4:39 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Michael Rasmussen <michaelr@xxxxxxxxx> writes:
> I am trying to iterate through a multidimensional array using a foreach loop, as exampled in the documentation at http://www.postgresql.org/docs/9.4/static/plpgsql-control-structures.html#PLPGSQL-FOREACH-ARRAY.

create type textarray as (t text[]);

​or a more semantically meaning one...the use of the inner array is arguably a hack here meant to avoid the overhead and new type creation by assigning meaning to array slots.

​i.e.,​

create type table_with_schema (name text, schema text);

I would likewise attempt to do away with the outer array as well if the overall structure of the example follows reality closely enough.

​David J.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux