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" <t...@sss.pgh.pa.us> wrote: >"David G. Johnston" <david.g.johns...@gmail.com> 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@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general