PostgreSQL allows us to create a string array using one of three data types: CHAR, VARCHAR, and TEXT. Once an array is created, various operations can be performed on that array.
Education
Professional Postgres and Open Source support
Command Prompt, Inc., is the oldest Postgres Company in North America and one of the oldest Open Source firms still operating today. We serve our clients with best in class expertise and professionalism. You can read more about support and services here:
- Postgres Support
- PgLTS: Extended Support for EOL Postgres
- Open Source Full Stack Support
- Try the latest PgManage (Open Source) and get rid of PgAdmin!
You have landed at the largest single source of Postgres education blogs in the world. At Command Prompt, we believe deeply that the education of the community is critical to the continued success of Postgres and related technologies. We hope you find content you are looking for and don't hesitate to Contact us today for all your Postgres and Open Source consulting and support needs.
ARRAY_REMOVE() Function in PostgreSQL
ARRAY_REMOVE() function accepts an array and a specific number as arguments and deletes all the occurrences of that particular number from the input array.
How to Update Multiple Rows in PostgreSQL
In PostgreSQL, the UPDATE statement must be executed with the semi-colon-separated syntax to modify multiple rows with different values.
ARRAY_REPLACE() Function in PostgreSQL
The ARRAY_REPLACE() is an inbuilt array function in Postgres that allows us to replace all the occurrences of an array element with a new element.
Wildcards in PostgreSQL With Practical Examples
Pattern matching in PostgreSQL is performed using wildcards. PostgreSQL offers two wildcards represented with a percentage sign “%” and an underscore sign “_”.
STRING_TO_ARRAY() Function in PostgreSQL
The STRING_TO_ARRAY() function accepts a string as the first argument, splits it into array elements, and concatenates the array elements using a delimiter/separator.
ARRAY_CAT() Function in PostgreSQL
ARRAY_CAT() is another very convenient function in Postgres that is used to concatenate two arrays. It accepts two arrays as arguments and retrieves a concatenated array.
How to Filter Data Using PostgreSQL WHERE Clause
In PostgreSQL, the WHERE clause allows us to filter the result set retrieved by the UPDATE, SELECT, or DELETE query. The WHERE clause filters the data based on a specific condition or several conditions.
How to Insert Data Into an Array in PostgreSQL
In PostgreSQL, several syntaxes can be used to insert data into an array, such as using the ARRAY keyword with square brackets “[]” or curly braces enclosed within single quotes.
How to Rename a User/Role in PostgreSQL
In PostgreSQL, the RENAME TO clause is used along with the ALTER USER or the ALTER ROLE statement to rename a user/role.