Skip to main content
Documentation
Technology areas
close
AI and ML
Application development
Application hosting
Compute
Data analytics and pipelines
Databases
Distributed, hybrid, and multicloud
Generative AI
Industry solutions
Networking
Observability and monitoring
Security
Storage
Cross-product tools
close
Access and resources management
Costs and usage management
Google Cloud SDK, languages, frameworks, and tools
Infrastructure as code
Migration
Related sites
close
Google Cloud Home
Free Trial and Free Tier
Architecture Center
Blog
Contact Sales
Google Cloud Developer Center
Google Developer Center
Google Cloud Marketplace
Google Cloud Marketplace Documentation
Google Cloud Skills Boost
Google Cloud Solution Center
Google Cloud Support
Google Cloud Tech Youtube Channel
/
English
Deutsch
Español – América Latina
Français
Português – Brasil
中文 – 简体
日本語
한국어
Console
Sign in
Spanner
Guides
Reference
Samples
Support
Resources
Contact Us
Start free
Documentation
Guides
Reference
Samples
Support
Resources
Technology areas
More
Cross-product tools
More
Related sites
More
Console
Contact Us
Start free
Spanner
All APIs & references
Overview of APIs and client libraries
Client libraries and drivers
Client libraries
Overview
C++ reference
C# reference
Go reference
Java reference
Node.js reference
PHP reference
Python reference
Ruby reference
Drivers
Overview of drivers
JDBC drivers
Overview
Connect JDBC to a GoogleSQL-dialect database
Connect JDBC to a PostgreSQL-dialect database
Session management commands
For GoogleSQL-dialect databases
For PostgreSQL-dialect databases
Spanner JDBC driver
R2DBC driver
Go database/sql driver
pgx driver for Golang
psycopg2 driver for Python
psycopg3 driver for Python
node-postgres driver for Node.js
APIs
REST reference
Overview
Standard API parameters
Global and regional service endpoints
v1
REST Resources
projects.instanceConfigOperations
Overview
list
projects.instanceConfigs
Overview
create
delete
get
list
patch
projects.instanceConfigs.operations
Overview
cancel
delete
get
list
projects.instances
Overview
create
delete
get
getIamPolicy
list
move
patch
setIamPolicy
testIamPermissions
projects.instances.backupOperations
Overview
list
projects.instances.backups
Overview
copy
create
delete
get
getIamPolicy
list
patch
setIamPolicy
testIamPermissions
projects.instances.backups.operations
Overview
cancel
delete
get
list
projects.instances.databaseOperations
Overview
list
projects.instances.databases
Overview
addSplitPoints
changequorum
create
dropDatabase
get
getDdl
getIamPolicy
list
patch
restore
setIamPolicy
testIamPermissions
updateDdl
projects.instances.databases.backupSchedules
Overview
create
delete
get
getIamPolicy
list
patch
setIamPolicy
testIamPermissions
projects.instances.databases.databaseRoles
Overview
list
testIamPermissions
projects.instances.databases.operations
Overview
cancel
delete
get
list
projects.instances.databases.sessions
Overview
adaptMessage
adapter
batchCreate
batchWrite
beginTransaction
commit
create
delete
executeBatchDml
executeSql
executeStreamingSql
get
list
partitionQuery
partitionRead
read
rollback
streamingRead
projects.instances.instancePartitionOperations
Overview
list
projects.instances.instancePartitions
Overview
create
delete
get
list
patch
projects.instances.instancePartitions.operations
Overview
cancel
delete
get
list
projects.instances.operations
Overview
cancel
delete
get
list
Types
ChangeQuorumMetadata
Code
CopyBackupMetadata
CreateBackupMetadata
CreateDatabaseMetadata
CreateInstanceConfigMetadata
CreateInstanceMetadata
CreateInstancePartitionMetadata
DatabaseDialect
DdlStatementActionInfo
DirectedReadOptions
EncryptionInfo
ErrorInfo
FulfillmentPeriod
GetPolicyOptions
Help
KeySet
ListOperationsResponse
MoveInstanceMetadata
MoveInstanceResponse
MultiplexedSessionPrecommitToken
Mutation
OperationProgress
OptimizeRestoredDatabaseMetadata
PartialResultSet
PartitionOptions
PartitionResponse
Policy
QueryMode
QueryOptions
RequestOptions
RestoreDatabaseMetadata
ResultSet
ResultSetMetadata
ResultSetStats
Status
StructType
TestIamPermissionsResponse
Transaction
TransactionOptions
TransactionSelector
Type
UpdateDatabaseDdlMetadata
UpdateDatabaseMetadata
UpdateInstanceConfigMetadata
UpdateInstanceMetadata
UpdateInstancePartitionMetadata
WaitOperationRequest
RPC reference
Overview
google.iam.v1
google.longrunning
google.rpc
google.spanner.adapter.v1
google.spanner.admin.database.v1
google.spanner.admin.instance.v1
google.spanner.v1
google.type
SQL
Dialect parity between GoogleSQL and PostgreSQL
GoogleSQL
General reference
Overview of GoogleSQL
Data types
Lexical structure and syntax
Conversion rules
Collation
Format elements
Stored procedures
Expressions
Function calls
Aggregate function calls
Operators
Conditional expressions
Subqueries
Query syntax
Functions
All functions
Aggregate functions
Overview
ANY_VALUE
ARRAY_AGG
ARRAY_CONCAT_AGG
AVG
BIT_AND
BIT_OR
BIT_XOR
COUNT
COUNTIF
LOGICAL_AND
LOGICAL_OR
MAX
MIN
STRING_AGG
SUM
Array functions
Overview
ARRAY
ARRAY_CONCAT
ARRAY_FILTER
ARRAY_FIRST
ARRAY_INCLUDES
ARRAY_INCLUDES_ALL
ARRAY_INCLUDES_ANY
ARRAY_IS_DISTINCT
ARRAY_LAST
ARRAY_LENGTH
ARRAY_MAX
ARRAY_MIN
ARRAY_REVERSE
ARRAY_SLICE
ARRAY_TO_STRING
ARRAY_TRANSFORM
GENERATE_ARRAY
GENERATE_DATE_ARRAY
JSON_ARRAY
JSON_QUERY_ARRAY
JSON_VALUE_ARRAY
Bit functions
Overview
BIT_COUNT
BIT_REVERSE
Conversion functions
Overview
CAST
SAFE_CAST
Date functions
Overview
ADDDATE
CURRENT_DATE
DATE
DATE_ADD
DATE_DIFF
DATE_FROM_UNIX_DATE
DATE_SUB
DATE_TRUNC
EXTRACT (date)
FORMAT_DATE
PARSE_DATE
SUBDATE
UNIX_DATE
Debugging functions
Overview
ERROR
Graph functions
Overview
DESTINATION_NODE_ID
EDGES
ELEMENT_ID
IS_ACYCLIC
IS_FIRST
IS_TRAIL
LABELS
NODES
PATH
PATH_FIRST
PATH_LAST
PATH_LENGTH
PROPERTY_NAMES
SOURCE_NODE_ID
Hash functions
Overview
FARM_FINGERPRINT
SHA1
SHA256
SHA512
Interval functions
Overview
EXTRACT (interval)
JUSTIFY_DAYS
JUSTIFY_HOURS
JUSTIFY_INTERVAL
MAKE_INTERVAL
JSON functions
Overview
BOOL
BOOL_ARRAY
FLOAT64
FLOAT64_ARRAY
FLOAT32
FLOAT32_ARRAY
INT64
INT64_ARRAY
JSON_ARRAY
JSON_ARRAY_APPEND
JSON_ARRAY_INSERT
JSON_CONTAINS
JSON_OBJECT
JSON_QUERY
JSON_QUERY_ARRAY
JSON_REMOVE
JSON_SET
JSON_STRIP_NULLS
JSON_TYPE
JSON_VALUE
JSON_VALUE_ARRAY
LAX_BOOL
LAX_FLOAT64
LAX_INT64
LAX_STRING
PARSE_JSON
SAFE_TO_JSON
STRING (JSON)
STRING_ARRAY
TO_JSON
TO_JSON_STRING
Machine learning functions
Overview
ML.PREDICT
Mathematical functions
Overview
ABS
ACOS
ACOSH
APPROX_COSINE_DISTANCE
APPROX_DOT_PRODUCT
APPROX_EUCLIDEAN_DISTANCE
ASIN
ASINH
ATAN
ATAN2
ATANH
CEIL
CEILING
COS
COSH
COSINE_DISTANCE
DIV
DOT_PRODUCT
EXP
EUCLIDEAN_DISTANCE
FLOOR
GREATEST
IEEE_DIVIDE
IS_INF
IS_NAN