PostgreSQL の文字列連結

こんな感じで || を使って連結が可能

  • 'Post' || 'greSQL'PostgreSQL
  • 'Value: ' || 42Value: 42

PostgreSQL: Documentation: 9.1: String Functions and Operators

PostgreSQL: Documentation: 8.4: Operators

SELECT text 'abc' || 'def' AS "text and unknown";
text and unknown
------------------
abcdef
(1 row)
SELECT 'abc' || 'def' AS "unspecified";
unspecified
-------------
abcdef
(1 row)