query.from_relation

Cascading Deletes: Deleting rows from this table will cascade to: query.from_relation.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: from_relation_on_clause_fkey, from_relation_parent_relation_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('query.from_relation_id_seq'::regclass)

type

text

No

table_name

text

Yes

class_name

text

Yes

subquery FK

integer

Yes

query.stored_query(id)

function_call FK

integer

Yes

query.expression(id)

table_alias

text

Yes

parent_relation FK

integer

Yes

query.from_relation(id)

seq_no

integer

No

1

join_type

text

Yes

on_clause FK

integer

Yes

query.expression(id)

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

function_call

query.expression(id)

NO ACTION

NO ACTION

No

from_relation_function_call_fkey

on_clause

query.expression(id)

NO ACTION

NO ACTION

DEFERRED

from_relation_on_clause_fkey

parent_relation

query.from_relation(id)

CASCADE

NO ACTION

DEFERRED

from_relation_parent_relation_fkey

subquery

query.stored_query(id)

NO ACTION

NO ACTION

No

from_relation_subquery_fkey

Check Constraints

  • good_join_type: CHECK

  • join_or_core: CHECK ((parent_relation IS NULL) AND (join_type IS NULL) AND (on_clause IS NULL OR parent_relation IS NOT NULL) AND (join_type IS NOT NULL) AND (on_clause IS NOT NULL))

  • relation_type: CHECK type = ANY (ARRAY['RELATION'::text, 'SUBQUERY'::text, 'FUNCTION'::text])

Indexes

Index Method Definition

from_relation_pkey PK

btree

CREATE UNIQUE INDEX from_relation_pkey ON query.from_relation USING btree (id)

from_parent_seq UNIQUE

btree

CREATE UNIQUE INDEX from_parent_seq ON query.from_relation USING btree (parent_relation, seq_no) WHERE (parent_relation IS NOT NULL)

Referenced By

The following tables have foreign keys pointing to query.from_relation (3 referencing table(s)):

Table Referencing Column(s) Referenced Column(s) Constraint

query.from_relation

parent_relation

id

from_relation_parent_relation_fkey

query.record_column

from_relation

id

record_column_from_relation_fkey

query.stored_query

from_clause

id

stored_query_from_clause_fkey