Module | Sequel::Postgres::AdapterMethods
In: | lib/sequel/adapters/shared/postgres.rb

Methods shared by adapter/connection instances.

### Constants

SELECT_CURRVAL | = | "SELECT currval('%s')".freeze
SELECT_CUSTOM_SEQUENCE | = | proc do |schema, table| <<-end_sql SELECT '"' || name.nspname || '".' || CASE WHEN split_part(def.adsrc, '''', 2) ~ '.' THEN substr(split_part(def.adsrc, '''', 2), strpos(split_part(def.adsrc, '''', 2), '.')+1) ELSE split_part(def.adsrc, '''', 2) END FROM pg_class t JOIN pg_namespace name ON (t.relnamespace = name.oid) JOIN pg_attribute attr ON (t.oid = attrelid) JOIN pg_attrdef def ON (adrelid = attrelid AND adnum = attnum) JOIN pg_constraint cons ON (conrelid = adrelid AND adnum = conkey[1]) WHERE cons.contype = 'p' AND def.adsrc ~* 'nextval' #{"AND name.nspname = '#{schema}'" if schema} AND t.relname = '#{table}' end_sql

### Attributes

db | [W] |

[Validate]