PostgreSQL ARRAY_FILL() function
ARRAY_FILL() function
This function is used to return an array initialized with supplied value and dimensions, optionally with lower bounds other than 1.
Syntax:
array_fill(anyelement, int[], [, int[]])
Return Type:
anyarray
PostgreSQL Version: 9.3
Example: PostgreSQL ARRAY_FILL() function
Code:
SELECT array_fill(7, ARRAY[3], ARRAY[2]);
Sample Output:
array_fill --------------- [2:4]={7,7,7} (1 row)
Previous: ARRAY_DIMS function
Next: ARRAY_LENGTH function
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework