REPLICATE Function - SQL Server to PostgreSQL Migration

In SQL Server, the REPLICATE function repeats the string the specified number of times. In PostgreSQL, you can use the REPEAT function.

SQL Server:

  -- Repeat 'ab' 3 times
  SELECT REPLICATE('ab', 3);
  # ababab

PostgreSQL:

  -- Repeat 'ab' 3 times
  SELECT REPEAT('ab', 3);
  # ababab

For more information, see SQL Server to PostgreSQL Migration.