0

I need to initialize 2 dimensional array with m rows and n columns, but m and n might change. I found here example like this :

ARRAY[[NULL,NULL],[NULL,NULL]] 

But it initializes array with 2 rows and 2 columns.

2
  • 2
    If you'd post the answer you found as answer and not in the question, I'd vote for it, because it's useful. Commented Oct 10, 2012 at 1:24
  • Yep, please answer your own post and accept the answer. Commented Oct 10, 2012 at 6:28

1 Answer 1

1

I've found the answer:

array_fill(0,ARRAY[m,n])    
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.