1549 |
1549 |
county text,
|
1550 |
1550 |
municipality text,
|
1551 |
1551 |
site text,
|
1552 |
|
otherranks rankedplacename[],
|
1553 |
|
CONSTRAINT place_required_key CHECK (((((((placecode IS NOT NULL) OR (continent IS NOT NULL)) OR (country IS NOT NULL)) OR (stateprovince IS NOT NULL)) OR (county IS NOT NULL)) OR (otherranks IS NOT NULL)))
|
|
1552 |
CONSTRAINT place_required_key CHECK ((((((placecode IS NOT NULL) OR (continent IS NOT NULL)) OR (country IS NOT NULL)) OR (stateprovince IS NOT NULL)) OR (county IS NOT NULL)))
|
1554 |
1553 |
);
|
1555 |
1554 |
|
1556 |
1555 |
|
... | ... | |
1560 |
1559 |
|
1561 |
1560 |
COMMENT ON TABLE place IS 'The full path to a place. Can be either verbatim or accepted. For accepted names, points to the identified place.
|
1562 |
1561 |
|
1563 |
|
To include a placename at a rank with no explicit column, add it to the otherranks array.';
|
|
1562 |
To use a custom hierarchy of placenames with no explicit column, point to the lowest-rank placename in placename_id.';
|
1564 |
1563 |
|
1565 |
1564 |
|
1566 |
1565 |
--
|
... | ... | |
1573 |
1572 |
|
1574 |
1573 |
|
1575 |
1574 |
--
|
1576 |
|
-- Name: COLUMN place.otherranks; Type: COMMENT; Schema: public; Owner: -
|
1577 |
|
--
|
1578 |
|
|
1579 |
|
COMMENT ON COLUMN place.otherranks IS 'Additional ranks which do not have a named column. Put ranks in path order, so that lower-level places come after higher-level places.';
|
1580 |
|
|
1581 |
|
|
1582 |
|
--
|
1583 |
1575 |
-- Name: plantobservation; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1584 |
1576 |
--
|
1585 |
1577 |
|
... | ... | |
4984 |
4976 |
-- Name: place_unique_within_creator_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
4985 |
4977 |
--
|
4986 |
4978 |
|
4987 |
|
CREATE UNIQUE INDEX place_unique_within_creator_by_name ON place USING btree (creator_id, (COALESCE(continent, '\\N'::text)), (COALESCE(country, '\\N'::text)), (COALESCE(stateprovince, '\\N'::text)), (COALESCE(county, '\\N'::text)), (COALESCE(municipality, '\\N'::text)), (COALESCE(site, '\\N'::text)), (COALESCE(otherranks, ARRAY[]::rankedplacename[]))) WHERE (placecode IS NULL);
|
|
4979 |
CREATE UNIQUE INDEX place_unique_within_creator_by_name ON place USING btree (creator_id, (COALESCE(continent, '\\N'::text)), (COALESCE(country, '\\N'::text)), (COALESCE(stateprovince, '\\N'::text)), (COALESCE(county, '\\N'::text)), (COALESCE(municipality, '\\N'::text)), (COALESCE(site, '\\N'::text))) WHERE (placecode IS NULL);
|
4988 |
4980 |
|
4989 |
4981 |
|
4990 |
4982 |
--
|
schemas/vegbien.sql: place: Place custom hierarchy of placenames in placename table instead of in otherranks field