Central Files: creating the countries table for the SQL database

Central Files: creating the countries table for the SQL database

Here we are creating the countries table. Contacts are related to countries. Central Files is management of personal information. Any information that belongs to any person is managed in Central Files. Everything relating to communication with any person that ever contacted the organization is managed in such collection. Central Files may be managed within the GNU Emacs editor and computer operating environment.

Here is the SQL definition to enter countries.

-- ------------------------------------------
-- ------------ Table countries
-- ------------------------------------------
DROP SEQUENCE countries_id_seq;

CREATE TABLE countries (
countries_id SERIAL NOT NULL PRIMARY KEY,
countries_name TEXT,
countries_code TEXT,
countries_prefix INT,
countries_apostille boolean DEFAULT false NOT NULL,
countries_offshore boolean DEFAULT false NOT NULL,
countries_continents INT4 REFERENCES continents NOT NULL,
countries_crs boolean DEFAULT false
);
GRANT ALL ON countries TO PUBLIC;
DROP VIEW countries_combo;
CREATE OR REPLACE VIEW countries_combo AS
SELECT countries_id AS id,
countries_name AS TEXT
FROM countries;

GRANT SELECT ON countries_combo TO PUBLIC;

COMMENT ON TABLE countries IS 'Countries';
COMMENT ON COLUMN countries.countries_id IS 'ID';

COMMENT ON COLUMN public.countries.countries_id IS 'ID';
COMMENT ON COLUMN public.countries.countries_name IS 'Country';
COMMENT ON COLUMN public.countries.countries_code IS 'Code';
COMMENT ON COLUMN public.countries.countries_prefix IS 'Dialing Prefix';
COMMENT ON COLUMN public.countries.countries_apostille IS 'Apostille';
COMMENT ON COLUMN public.countries.countries_offshore IS 'Offshore';
COMMENT ON COLUMN public.countries.countries_continents IS 'Continent';
COMMENT ON COLUMN public.countries.countries_crs IS 'CRS';

CREATE UNIQUE INDEX countries_index ON public.countries USING btree (countries_code);
GRANT SELECT ON TABLE public.countries TO PUBLIC;

Within GNU Emacs you may use the M-x sql-postgres to run the psql as process and any editing of these tables could be interactively entered.

As this is creation and design of Personal Information Management you are advised to adapt any SQL table to your needs.

Populate the SQL table countries

Leave Your Comment or Contact GNU.Support

Contact GNU.Support now. There is a simple rule at GNU.Support: if we can help you, we do, whenever and wherever necessary, and it's the way we've been doing business since 2002, and the only way we know


Full name:


E-mail:


Message: