How to use string_agg function in PostgreSQL with examples

In this blog post, I will show the usage of string_agg function in PostgreSQL with examples. As name suggests, string_agg is a string aggregate function which is used to concatenate values from multiple rows into one. Syntax Usage Lets first create a user table to show the usage. put some data into the table Below…

How to update large number of records in batches in PostgreSQL

Recently at my work added a new column to two of our database tables and the newly introduced column had to updated based on the sequence number. These tables had millions of records. Before updating records in huge numbers, we need to understand the little of PostgreSQL memory architecture. All the memory components which are…