Mike Martin <redtux1@gmail.com> writes: > I have come across a weird issue with truncation of text in an array (in > this case using pg_indexes view) > This query truncates the second array element at 63 characters > SELECT ARRAY[indexname,indexdef] FROM pg_indexes > However reversing the order doesn't truncate > SELECT ARRAY[indexdef,indexname] FROM pg_indexes > Anyone know why this behaviour occurs?
indexname is of type name, indexdef is of type text, and the rules for inferring the type of an array[] construct are such that the first element's type wins in these cases.