Skip to content
DbaFix
Just share answer and question for fixing database problem
MENU
  • HOME

Tag: exclusion-constraint

How can I exclude range overlaps if one range may be empty?

By adminPosted on March 25, 2023

Question : Suppose I want to ensure that, for any expected height in feet, I have a single, unambiguous classification. […]

How to find out what operator class and access method should be used for an exclusion constraint?

By adminPosted on December 5, 2021

Question : Original goal: create a constraint to ensure that only non-overlapping subnets exist in a particular Postgres table. From […]

Unique constraint to enforce max one null per item

By adminPosted on November 16, 2021

Question : I am using PostgreSQL 9.3. Suppose we are manufacturing some items of certain types, at any moment we […]

Create a PostgreSQL constraint to prevent unique combination rows

By adminPosted on October 20, 2021

Question : Imagine you have a simple table: name | is_active —————- A | 0 A | 0 B | […]

Constraint on row value based on values in other rows

By adminPosted on September 25, 2021

Question : Is it possible to have a table with four columns: CREATE TABLE accrual ( add_date date NOT NULL, […]

Using postgresql, how to prevent new inserts on varchar column using ^@ / starts_with operator / function?

By adminPosted on September 6, 2021

Question : I’m trying to create a table with a path column. This table should only allow inserting a new […]

How to find out what operator class and access method should be used for an exclusion constraint?

By adminPosted on May 12, 2021

Question : Original goal: create a constraint to ensure that only non-overlapping subnets exist in a particular Postgres table. From […]

Unique constraint to enforce max one null per item

By adminPosted on May 7, 2021

Question : I am using PostgreSQL 9.3. Suppose we are manufacturing some items of certain types, at any moment we […]

Include constraint for daterange type

By adminPosted on January 22, 2021

Question : Here is the table CREATE TABLE date_ranges ( id SERIAL PRIMARY KEY, user_id INTEGER, start_at DATE, end_at DATE, […]

Recent Posts

  • Logins aren’t syncing across Availability Groups
  • Finding same values and updating rankings
  • Servers running on Microsoft Windows instead output carriage
  • Master ip has changed in postgresql replication
  • optimize design for a table with 50 columns [closed]
  • SQLServer In-Memory database and log file size unexpected increase
  • Is it worth to optimize queries with EarlyTermination Timeout?
  • Is there way to get transaction commit timestamp in Postgres?
  • MySQL/PHP Returning Blank Error Message [closed]
  • Mysql might have too many indexes
  • Database replication with ability to revert to previous states
  • Linked server to Oracle doesn’t use filters. Are there any performance changes in different versions of SQL Server?
  • Enable query store for all databases
  • SQL Server 2012 Enforce Password Policy [closed]
  • Maintenance in MYSQL when innodb_file_per_table disabled
  • SQL Server stored procedure producing data related to months between two dates [duplicate]
  • Efficient way to store multi choice in a column with few options
  • Need help tuning my.cnf file
  • Insert and select the row autoincremented id
  • Use “LEN” function in “WHERE” clause in “CREATE UNIQUE INDEX”

Categories

  • Database Backup
  • Database Design
  • Database Index
  • Database Optimization
  • InnoDB
  • Join
  • MariaDB
  • MongoDB
  • MySQL
  • Oracle
  • Performance
  • Permissions
  • Postgresql
  • Query Performance
  • Replication
  • Security
  • SQL Server
Proudly powered by WordPress / Support by: DizzyCoding