Method: Sequel::Postgres::DatasetMethods#supports_returning?

Defined in:
lib/sequel/adapters/shared/postgres.rb

#supports_returning?(type) ⇒ Boolean

MERGE RETURNING is supported on PostgreSQL 17+. Other RETURNING is supported on all supported PostgreSQL versions.

Returns:

  • (Boolean)


2483
2484
2485
2486
2487
2488
2489
# File 'lib/sequel/adapters/shared/postgres.rb', line 2483

def supports_returning?(type)
  if type == :merge
    server_version >= 170000
  else
    true
  end
end