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]

 



Thank you all for your help.

I currently only have the two cases to handle, so I went with the below if-else statement which works how I expected.

    -- Generate array of tables to create
    if (create_source) then
    the_tables := array[[new_table_schema, new_table_name],[new_table_schema||'_source', new_table_name||'_source']];
    else
    the_tables := array[[new_table_schema, new_table_name]];
    end if;


-- 
Michael Rasmussen

Sr. Data Engineer
Porch






On 12/28/15, 3:51 PM, "Tom Lane" <tgl@xxxxxxxxxxxxx> wrote:

>"David G. Johnston" <david.g.johnston@xxxxxxxxx> writes:
>> ​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.
>
>Yeah, good point: it looks like Mike does not consider the columns of
>the array to be interchangeable at all, so really he would be better
>off modeling the data as you suggest.
>
>			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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