Known issues in the PostgreSQL interface for Spanner Stay organized with collections Save and categorize content based on your preferences.
This page points out differences in behavior between the PostgreSQL capabilitiessupported in Spanner and their open source PostgreSQLequivalents.
Caution: The following specific behaviors may change to better align withopen source PostgreSQL.Float8 underflow
In some cases, open source PostgreSQL returns an error such asERROR: value out of range: underflow if the result of floating point mathwould be truncated to 0. Numbers too close to zero that are not representable asdistinct from zero cause an underflow error.
The PostgreSQL interface doesn't return an error in these cases;it returns the truncated 0 value instead.
concat function
In the PostgreSQL interface, theconcat() function returnsNULL if any argument is NULL. However, in open source PostgreSQL,this function ignores NULLs and returns a concatenation of all non-NULLarguments, or an empty string if all arguments are NULL. For example:
-- Returns `abcdef` in open source PostgreSQL.-- Returns NULL in the PostgreSQL interface.selectconcat('abc',NULL,'def');The PostgreSQL interface and open source PostgreSQL haveidentical behavior for the|| operator with scalar (non-array) operands.
array_cat() function
In the PostgreSQL interface, thearray_cat() function returnsNULL if any argument is NULL. However, in open source PostgreSQL, thisfunction ignores NULLs and returns a concatenation of all non-NULL arrayarguments, or a NULL array if all arguments are NULL. The same is true for the|| operator with array operands. For example:
-- Returns `{abc, def}` in open source PostgreSQL.-- Returns NULL in the PostgreSQL interface.select '{abc}'::text[] || NULL::text[] || '{def}'::text[];array_to_string function
In the PostgreSQL interface, thearray_to_string(array text_array, delimiter text [, null_string text ])function returns NULL if thenull_string argument is NULL. However, inopen source PostgreSQL, this function ignores the NULL arrayelements and returns a concatenation of all non-NULL elements as a stringrepresentation if thenull_string argument is NULL. For example:
-- Returns `a,b,c` in open source PostgreSQL.-- Returns NULL in the PostgreSQL interface.selectarray_to_string('{a,b,NULL,c}'::text[],',',NULL);Object names
For more information about naming issues, seeName.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.