Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('links_references_id_seq'::regclass) |
|
|
|||||||||||
| description | text | 2147483647 | √ | null |
|
|
|||||||||||
| country_id | int8 | 19 | √ | null |
|
|
|||||||||||
| commodity_id | int4 | 10 | √ | null |
|
|
|||||||||||
| version | text | 2147483647 | √ | null |
|
|
|||||||||||
| latest | bool | 1 | √ | null |
|
|
|||||||||||
| updated | timestamptz | 35,6 | √ | null |
|
|
|||||||||||
| version_type | version_type | 2147483647 | √ | null |
|
|
|||||||||||
| suffix | text | 2147483647 | √ | null |
|
|
|||||||||||
| title | text | 2147483647 | √ | get_links_generated_title(country_id, commodity_id, version, version_type, suffix) |
|
|
|||||||||||
| parent_ref_id | int4 | 10 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| links_references_pkey | Primary key | Asc | id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| link_version_not_null_if_latest | ( CASE WHEN latest THEN (version IS NOT NULL) ELSE true END) |
| parent_is_not_self | ((id <> parent_ref_id)) |
| commodity_is_primary | (commodity_is_primary(com_id)) |

