CREATE TABLE acquisition_channels (
    acquisition_channel_id integer NOT NULL,
    emproduct_id integer,
    lmproduct_id integer,
    notes text,
    curation_notes text
);


ALTER TABLE public.acquisition_channels OWNER TO postgres;

--
-- TOC entry 3395 (class 1259 OID 5295694)
-- Dependencies: 3994 6
-- Name: algorithms; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE algorithms (
    algorithm_id integer NOT NULL,
    algorithm text,
    algorithm_desc text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.algorithms OWNER TO ccdbd_dev;

--
-- TOC entry 3396 (class 1259 OID 5295700)
-- Dependencies: 3995 6
-- Name: alignment_methods; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE alignment_methods (
    alignment_method_id integer NOT NULL,
    alignment_method text,
    description text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.alignment_methods OWNER TO postgres;

--
-- TOC entry 3397 (class 1259 OID 5295706)
-- Dependencies: 3996 6
-- Name: anatomical_cell_junctions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_cell_junctions (
    cell_junction_id integer NOT NULL,
    cell_inst_id text,
    anatomical_details_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_cell_junctions OWNER TO postgres;

--
-- TOC entry 3398 (class 1259 OID 5295712)
-- Dependencies: 3997 6
-- Name: anatomical_details; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_details (
    anatomical_details_id integer NOT NULL,
    notes text,
    atlas_id integer,
    medial_lateral double precision,
    dorsal_ventral double precision,
    anterior_posterior double precision,
    slice_id_number numeric,
    tissue_id integer,
    subregions text,
    cell_id text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_details OWNER TO postgres;

--
-- TOC entry 3399 (class 1259 OID 5295718)
-- Dependencies: 3998 6
-- Name: anatomical_organ_junctions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_organ_junctions (
    organ_junction_id integer NOT NULL,
    organ_inst_id text,
    anatomical_details_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_organ_junctions OWNER TO postgres;

--
-- TOC entry 3400 (class 1259 OID 5295724)
-- Dependencies: 3999 6
-- Name: anatomical_region_inst; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_region_inst (
    region_inst_id text NOT NULL,
    anatomical_region_types_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_region_inst OWNER TO postgres;

--
-- TOC entry 3401 (class 1259 OID 5295730)
-- Dependencies: 4000 6
-- Name: anatomical_region_junctions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_region_junctions (
    region_junction_id integer NOT NULL,
    region_inst_id text,
    anatomical_details_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_region_junctions OWNER TO postgres;

--
-- TOC entry 3402 (class 1259 OID 5295736)
-- Dependencies: 4001 6
-- Name: anatomical_region_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_region_types (
    anatomical_region_id integer NOT NULL,
    anatomical_region_onto_id text,
    preferred_anatomical_region_name text,
    onto_uri text,
    reference_url text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_region_types OWNER TO postgres;

--
-- TOC entry 3403 (class 1259 OID 5295742)
-- Dependencies: 4002 6
-- Name: anatomical_structure_junctions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_structure_junctions (
    structure_junction_id integer NOT NULL,
    structure_inst_id text,
    anatomical_details_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_structure_junctions OWNER TO postgres;

--
-- TOC entry 3404 (class 1259 OID 5295748)
-- Dependencies: 4003 6
-- Name: anatomical_subcellular_junctions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_subcellular_junctions (
    subcellular_junction_id integer NOT NULL,
    subcellular_inst_id text,
    anatomical_details_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_subcellular_junctions OWNER TO postgres;

--
-- TOC entry 3405 (class 1259 OID 5295754)
-- Dependencies: 4004 6
-- Name: anatomical_system_junctions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE anatomical_system_junctions (
    system_junction_id integer NOT NULL,
    system_inst_id text,
    anatomical_details_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.anatomical_system_junctions OWNER TO postgres;

--
-- TOC entry 3406 (class 1259 OID 5295760)
-- Dependencies: 4005 6
-- Name: angles; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE angles (
    angle_id integer NOT NULL,
    angle_value double precision,
    angle_unit text,
    normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.angles OWNER TO postgres;

--
-- TOC entry 3407 (class 1259 OID 5295766)
-- Dependencies: 4006 6
-- Name: animal; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE animal (
    animal_id integer NOT NULL,
    treatments_treatment_id integer,
    age_unit text,
    weight_unit text,
    strain_id integer,
    gender character(1),
    weight_value integer,
    age_value integer,
    weight_normalized_value bigint,
    time_normalized_value bigint,
    age_class text,
    notes text,
    manufacturer_id integer,
    litter_id integer,
    nickname text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.animal OWNER TO postgres;

--
-- TOC entry 3408 (class 1259 OID 5295772)
-- Dependencies: 4007 6
-- Name: animal_pool_junction; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE animal_pool_junction (
    animal_junction_pool_id integer NOT NULL,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.animal_pool_junction OWNER TO postgres;

--
-- TOC entry 3409 (class 1259 OID 5295778)
-- Dependencies: 4008 6
-- Name: animal_set; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE animal_set (
    animal_set_id integer NOT NULL,
    animal_pool_junction_id integer,
    animal_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.animal_set OWNER TO ccdbd_dev;

--
-- TOC entry 3410 (class 1259 OID 5295781)
-- Dependencies: 4009 6
-- Name: animation_sets; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE animation_sets (
    animation_set_id integer NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.animation_sets OWNER TO postgres;

--
-- TOC entry 3411 (class 1259 OID 5295784)
-- Dependencies: 4010 6
-- Name: animations; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE animations (
    animation_id integer NOT NULL,
    animation_set_id integer,
    file_type text,
    notes text,
    file_path text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.animations OWNER TO postgres;

--
-- TOC entry 3412 (class 1259 OID 5295790)
-- Dependencies: 4011 6
-- Name: annotation_xml_set; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE annotation_xml_set (
    annotation_xml_set_id bigint NOT NULL,
    seg_id integer,
    xml_file_id bigint,
    deleted boolean DEFAULT false
);


ALTER TABLE public.annotation_xml_set OWNER TO ccdbd_dev;

--
-- TOC entry 3413 (class 1259 OID 5295793)
-- Dependencies: 4012 6
-- Name: antibodies; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE antibodies (
    antibody_id integer NOT NULL,
    clonality text,
    antigen_source_animal text,
    raised_in_animal text,
    antigent text,
    antibody_type text,
    reference text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.antibodies OWNER TO postgres;

--
-- TOC entry 3622 (class 1259 OID 5301654)
-- Dependencies: 4194 6
-- Name: area_measurement; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE area_measurement (
    area_unit text NOT NULL,
    scale bigint,
    deleted boolean DEFAULT false
);


ALTER TABLE public.area_measurement OWNER TO ccdbd_dev;

--
-- TOC entry 3414 (class 1259 OID 5295799)
-- Dependencies: 4013 6
-- Name: atlas_coordinate_point; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE atlas_coordinate_point (
    coordinate_id integer NOT NULL,
    anatomical_details_id integer,
    atlas_id integer,
    medial_lateral double precision,
    dorsal_ventral double precision,
    anterior_posterior double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.atlas_coordinate_point OWNER TO ccdbd_dev;

--
-- TOC entry 3415 (class 1259 OID 5295802)
-- Dependencies: 4014 6
-- Name: atlas_plate; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE atlas_plate (
    atlas_id integer NOT NULL,
    atlas_name text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.atlas_plate OWNER TO ccdbd_dev;

--
-- TOC entry 3416 (class 1259 OID 5295808)
-- Dependencies: 4015 6
-- Name: atlases; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE atlases (
    atlas_id integer NOT NULL,
    atlas_name text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.atlases OWNER TO ccdbd_dev;

--
-- TOC entry 3417 (class 1259 OID 5295814)
-- Dependencies: 4016 6
-- Name: image_info; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE image_info (
    image_info_id integer NOT NULL,
    file_path text,
    image_size bigint,
    display_file bytea,
    thumbnail_file bytea,
    mpid integer,
    wib_url text,
    modified_time timestamp without time zone,
    deleted boolean DEFAULT false
);


ALTER TABLE public.image_info OWNER TO postgres;

--
-- TOC entry 3418 (class 1259 OID 5295820)
-- Dependencies: 4017 4018 6
-- Name: microscopy_products; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE microscopy_products (
    mpid integer NOT NULL,
    anatomical_details_id integer,
    applied_protocol_id integer,
    x_resolution_unit text,
    y_resolution_unit text,
    instrument_id integer,
    experiment_experiment_id integer,
    x_size integer,
    y_size integer,
    x_resolution_value double precision,
    y_resolution_value double precision,
    image_basename text,
    modified_date date,
    submitted_date date,
    curated_date date,
    publish_date date,
    x_res_normalized_value bigint,
    y_res_normalized_value integer,
    microscopy_type_id integer,
    dawg_status_id integer DEFAULT 1,
    portal_screenname text,
    z_resolution_unit text,
    z_resolution_value double precision,
    z_size integer,
    notes text,
    portal_userid text,
    ccdb_id integer,
    specimen_id integer,
    microscopy_product_type_id integer,
    data_validation_date time without time zone,
    deleted boolean DEFAULT false,
    archived_date date,
    rsync_date date
);


ALTER TABLE public.microscopy_products OWNER TO ccdbd_dev;

--
-- TOC entry 3419 (class 1259 OID 5295826)
-- Dependencies: 3741 6
-- Name: available_workflow_images_view; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW available_workflow_images_view AS
    SELECT ii.mpid, mp.image_basename, 1 AS type, ii.thumbnail_file, ii.display_file, ii.file_path FROM image_info ii, microscopy_products mp WHERE (ii.mpid = mp.mpid);


ALTER TABLE public.available_workflow_images_view OWNER TO postgres;

--
-- TOC entry 3420 (class 1259 OID 5295830)
-- Dependencies: 4019 6
-- Name: bit_measurement; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE bit_measurement (
    bit_id integer NOT NULL,
    value integer,
    unit text,
    normalized_value integer,
    normalized_unit text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.bit_measurement OWNER TO postgres;

--
-- TOC entry 1112 (class 1247 OID 5295844)
-- Dependencies: 6 3421
-- Name: breakpoint; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE breakpoint AS (
	func oid,
	linenumber integer,
	targetname text
);


ALTER TYPE public.breakpoint OWNER TO postgres;

--
-- TOC entry 3422 (class 1259 OID 5295845)
-- Dependencies: 4020 6
-- Name: cameras; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE cameras (
    camera_id integer NOT NULL,
    camera_name text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.cameras OWNER TO ccdbd_dev;

--
-- TOC entry 3423 (class 1259 OID 5295851)
-- Dependencies: 4021 6
-- Name: ccdb_allowed_keyword_table; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_allowed_keyword_table (
    table_name text NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.ccdb_allowed_keyword_table OWNER TO ccdbd_dev;

--
-- TOC entry 3643 (class 1259 OID 5417454)
-- Dependencies: 4206 6
-- Name: ccdb_curator; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_curator (
    ccdb_curator_screenname text NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.ccdb_curator OWNER TO ccdbd_dev;

--
-- TOC entry 3424 (class 1259 OID 5295857)
-- Dependencies: 4022 6
-- Name: ccdb_data_mapping; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_data_mapping (
    ccdb_data_mapping_id integer NOT NULL,
    mpid integer,
    purpose_id integer,
    image_set_id integer,
    recon_id integer,
    seg_id integer,
    file_path text,
    confirmed boolean,
    description text,
    deleted boolean DEFAULT false,
    file_size bigint
);


ALTER TABLE public.ccdb_data_mapping OWNER TO ccdbd_dev;

--
-- TOC entry 3425 (class 1259 OID 5295863)
-- Dependencies: 4023 4024 4025 4026 6
-- Name: ccdb_data_permission; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_data_permission (
    ccdb_data_permission_id integer NOT NULL,
    microscopy_product_id integer,
    project_id integer,
    group_id integer,
    person_id integer,
    can_read boolean DEFAULT false,
    can_write boolean DEFAULT false,
    can_share boolean DEFAULT false,
    deleted boolean DEFAULT false
);


ALTER TABLE public.ccdb_data_permission OWNER TO ccdbd_dev;

--
-- TOC entry 3426 (class 1259 OID 5295869)
-- Dependencies: 4027 6
-- Name: ccdb_data_purpose; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_data_purpose (
    data_purpose_id integer NOT NULL,
    data_section_id integer,
    purpose_name text,
    table_name text,
    table_pk_col text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.ccdb_data_purpose OWNER TO ccdbd_dev;

--
-- TOC entry 3427 (class 1259 OID 5295875)
-- Dependencies: 4028 6
-- Name: ccdb_data_section; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_data_section (
    data_section_id integer NOT NULL,
    section_name text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.ccdb_data_section OWNER TO ccdbd_dev;

--
-- TOC entry 3428 (class 1259 OID 5295881)
-- Dependencies: 4029 4030 6
-- Name: image_sets; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE image_sets (
    image_set_id integer NOT NULL,
    mproduct_id integer,
    raw_display_file bytea,
    raw_thumbnail_file bytea,
    set_name text,
    notes text,
    session_id bigint,
    acquisition_date date,
    magnification integer,
    x_size integer,
    y_size integer,
    z_size integer,
    x_resolution double precision,
    y_resolution double precision,
    z_resolution double precision,
    downloadable_file_desc text,
    downsampled_file_desc text,
    display_image_desc text,
    raw_animation_desc text,
    digitizing_info integer,
    data_file_format integer,
    original_set boolean DEFAULT true,
    deleted boolean DEFAULT false,
    resolution_unit text
);


ALTER TABLE public.image_sets OWNER TO postgres;

--
-- TOC entry 3429 (class 1259 OID 5295887)
-- Dependencies: 4031 6
-- Name: image_sets_used; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE image_sets_used (
    id integer NOT NULL,
    recon_id integer,
    image_set_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.image_sets_used OWNER TO postgres;

--
-- TOC entry 3430 (class 1259 OID 5295890)
-- Dependencies: 4032 6
-- Name: reconstructions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE reconstructions (
    recon_id integer NOT NULL,
    recon_software_id integer,
    animation_set_id integer,
    recon_display_file bytea,
    recon_thumbnail_file bytea,
    alignment_method integer,
    alignment_program integer,
    decon_software integer,
    recon_algorithm integer,
    cropping_coordinate1_x double precision,
    cropping_coordinate1_y double precision,
    cropping_coordinate2_x double precision,
    cropping_coordinate2_y double precision,
    recon_desc text,
    full_resolution_recon_file_path text,
    full_resolution_recon_file_size bigint,
    full_resolution_recon_file_desc text,
    image_map_file_path text,
    image_map_file_size integer,
    recon_date date,
    volume_dimension_x double precision,
    volume_dimension_y double precision,
    volume_dimension_z double precision,
    voxel_scale_x double precision,
    voxel_scale_y double precision,
    voxel_scale_z double precision,
    deconvolution_iterations text,
    missing_angles text,
    fiducial_mark_file_path text,
    fiducial_mark_file_size bigint,
    down_sampled_recon_file_path text,
    down_sample_recon_file_size text,
    down_sampled_recon_file_desc text,
    desc_for_display_file text,
    desc_for_animations text,
    recon_file_format integer,
    session_id bigint,
    recon_type integer,
    deleted boolean DEFAULT false,
    voxel_scale_unit text
);


ALTER TABLE public.reconstructions OWNER TO postgres;

--
-- TOC entry 3431 (class 1259 OID 5295896)
-- Dependencies: 4033 6
-- Name: segmentation; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE segmentation (
    seg_id integer NOT NULL,
    animation_set_id integer,
    segmentation_set_id integer,
    segmented_object_type_id integer,
    xml_parser integer,
    seg_person_name integer,
    purpose text,
    seg_display_file bytea,
    seg_thumbnail_file bytea,
    seg_desc text,
    is_manual boolean,
    analysis_desc text,
    seg_downloadable_file_desc text,
    seg_display_image_desc text,
    seg_algorithm integer,
    notes text,
    session_id bigint,
    seg_animation_desc text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.segmentation OWNER TO postgres;

--
-- TOC entry 3432 (class 1259 OID 5295902)
-- Dependencies: 4034 6
-- Name: segmentation_sets; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE segmentation_sets (
    segmentation_set_id integer NOT NULL,
    seg_intent_id integer,
    recon_id integer,
    notes text,
    curation_notes text,
    image_set_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.segmentation_sets OWNER TO postgres;

--
-- TOC entry 3433 (class 1259 OID 5295908)
-- Dependencies: 3742 6
-- Name: ccdb_data_section_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_data_section_view AS
    (SELECT m.mpid, iss.image_set_id, r.recon_id, seg.seg_id FROM image_sets iss, microscopy_products m, image_sets_used isu, reconstructions r, segmentation_sets segs, segmentation seg WHERE (((((iss.mproduct_id = m.mpid) AND (iss.image_set_id = isu.image_set_id)) AND (isu.recon_id = r.recon_id)) AND (r.recon_id = segs.recon_id)) AND (segs.segmentation_set_id = seg.segmentation_set_id)) UNION SELECT m.mpid, iss.image_set_id, NULL::unknown AS recon_id, NULL::unknown AS seg_id FROM image_sets iss, microscopy_products m WHERE (iss.mproduct_id = m.mpid)) UNION SELECT m.mpid, iss.image_set_id, r.recon_id, NULL::unknown AS seg_id FROM image_sets iss, microscopy_products m, image_sets_used isu, reconstructions r WHERE (((iss.mproduct_id = m.mpid) AND (iss.image_set_id = isu.image_set_id)) AND (isu.recon_id = r.recon_id));


ALTER TABLE public.ccdb_data_section_view OWNER TO ccdbd_dev;

--
-- TOC entry 3434 (class 1259 OID 5295913)
-- Dependencies: 4035 6
-- Name: reconstruction_types; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE reconstruction_types (
    recon_type_id integer NOT NULL,
    recon_type text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.reconstruction_types OWNER TO ccdbd_dev;

--
-- TOC entry 3435 (class 1259 OID 5295919)
-- Dependencies: 3743 6
-- Name: ccdb_data_section_description_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_data_section_description_view AS
    (SELECT iset.image_set_id AS ccdbid, iset.set_name AS name, iset.notes AS description FROM ccdb_data_section_view cds, image_sets iset WHERE ((cds.image_set_id = iset.image_set_id) AND (iset.set_name IS NOT NULL)) UNION SELECT r.recon_id AS ccdbid, (((r.recon_id || '('::text) || r.recon_date) || ')'::text) AS name, r.recon_desc AS description FROM reconstructions r, ccdb_data_section_view cds, reconstruction_types rt WHERE (r.recon_id = cds.recon_id)) UNION SELECT seg.seg_id AS ccdbid, seg.seg_desc AS name, seg.seg_display_image_desc AS description FROM segmentation seg, segmentation_sets ss, reconstructions r WHERE ((ss.recon_id = r.recon_id) AND (ss.segmentation_set_id = seg.segmentation_set_id));


ALTER TABLE public.ccdb_data_section_description_view OWNER TO ccdbd_dev;

--
-- TOC entry 3476 (class 1259 OID 5296124)
-- Dependencies: 4064 6
-- Name: cell_instances; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE cell_instances (
    cell_inst_id text NOT NULL,
    cell_type_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.cell_instances OWNER TO postgres;

--
-- TOC entry 3440 (class 1259 OID 5295941)
-- Dependencies: 4038 6
-- Name: cell_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE cell_types (
    cell_type_id integer NOT NULL,
    cell_onto_id text,
    preferred_cell_name text,
    onto_uri text,
    reference_url text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.cell_types OWNER TO postgres;

--
-- TOC entry 3463 (class 1259 OID 5296064)
-- Dependencies: 4057 6
-- Name: cellular_fraction; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE cellular_fraction (
    cellular_fraction_id integer NOT NULL,
    cellular_fraction_desc text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.cellular_fraction OWNER TO postgres;

--
-- TOC entry 3477 (class 1259 OID 5296130)
-- Dependencies: 4065 6
-- Name: cellularfraction_type_junction; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE cellularfraction_type_junction (
    cellularfraction_type_junction_id integer NOT NULL,
    cellular_fraction_id integer,
    subcellular_inist_id text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.cellularfraction_type_junction OWNER TO ccdbd_dev;

--
-- TOC entry 3466 (class 1259 OID 5296077)
-- Dependencies: 4059 6
-- Name: cultured_cell; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE cultured_cell (
    cultured_cell_id integer NOT NULL,
    date_plated date,
    plating_density_value integer,
    number_of_passage integer,
    media text,
    preparation text,
    source text,
    tissue_product_storage text,
    cell_line_id text,
    lot_number text,
    cultured_by integer,
    cell_type integer,
    cultured_cell_desc text,
    plating_density_unit text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.cultured_cell OWNER TO ccdbd_dev;

--
-- TOC entry 3484 (class 1259 OID 5296177)
-- Dependencies: 4072 6
-- Name: culturedcell_celltype_junction; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE culturedcell_celltype_junction (
    culturedcell_celltype_id integer NOT NULL,
    cell_inst_id text,
    cultured_cell_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.culturedcell_celltype_junction OWNER TO ccdbd_dev;

--
-- TOC entry 3459 (class 1259 OID 5296038)
-- Dependencies: 4053 6
-- Name: species; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE species (
    species_id integer NOT NULL,
    organism_id integer,
    species_name text,
    onto_uri text,
    reference_url text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.species OWNER TO postgres;

--
-- TOC entry 3581 (class 1259 OID 5296805)
-- Dependencies: 4160 6
-- Name: specimen; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE specimen (
    specimen_id integer NOT NULL,
    is_intact boolean,
    slice_thickness_value double precision,
    slice_thickness_unit text,
    subject_id integer,
    description text,
    microtome text,
    deleted boolean DEFAULT false,
    specimen_nickname text,
    used_as_template boolean
);


ALTER TABLE public.specimen OWNER TO ccdbd_dev;

--
-- TOC entry 3442 (class 1259 OID 5295953)
-- Dependencies: 4040 6
-- Name: strain; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE strain (
    strain_id integer NOT NULL,
    strain_name text NOT NULL,
    onto_uri text,
    reference_url text,
    strain_desc text,
    species_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.strain OWNER TO ccdbd_dev;

--
-- TOC entry 3444 (class 1259 OID 5295965)
-- Dependencies: 4042 6
-- Name: subcellular_comp_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE subcellular_comp_types (
    subcellular_comp_id integer NOT NULL,
    subcellular_onto_id text,
    preferred_subcellular_name text,
    onto_uri text,
    reference_url text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.subcellular_comp_types OWNER TO postgres;

--
-- TOC entry 3585 (class 1259 OID 5296829)
-- Dependencies: 4164 6
-- Name: subcellular_instances; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE subcellular_instances (
    subcellular_inst_id text NOT NULL,
    subcellular_comp_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.subcellular_instances OWNER TO postgres;

--
-- TOC entry 3460 (class 1259 OID 5296044)
-- Dependencies: 4054 6
-- Name: subject; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE subject (
    subject_id integer NOT NULL,
    tissue_slice_id integer,
    cellular_fraction_id integer,
    intact_animal_id integer,
    cultured_cell_id integer,
    specimen_desc text,
    animal_pool_junction_id integer,
    subject_desc text,
    processingstep_desc_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.subject OWNER TO postgres;

--
-- TOC entry 3461 (class 1259 OID 5296050)
-- Dependencies: 4055 6
-- Name: subject_group; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE subject_group (
    subject_group_id integer NOT NULL,
    project_id integer,
    protocol_id integer,
    subject_group_name text,
    description text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.subject_group OWNER TO ccdbd_dev;

--
-- TOC entry 3462 (class 1259 OID 5296056)
-- Dependencies: 4056 6
-- Name: subject_set; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE subject_set (
    subject_set_id integer NOT NULL,
    subject_id integer,
    subject_group_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.subject_set OWNER TO ccdbd_dev;

--
-- TOC entry 3599 (class 1259 OID 5296899)
-- Dependencies: 4175 6
-- Name: tissue_anatomical_region_junction; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE tissue_anatomical_region_junction (
    tissue_anatomical_id integer NOT NULL,
    tissue_id integer,
    region_inst_id text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tissue_anatomical_region_junction OWNER TO ccdbd_dev;

--
-- TOC entry 3601 (class 1259 OID 5296911)
-- Dependencies: 4177 6
-- Name: tissue_slice; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE tissue_slice (
    tissue_slice_id integer NOT NULL,
    thickness_unit text,
    tissue_slice_desc text,
    microtome text,
    thickness double precision,
    normalized_thickness_value double precision,
    orientation text,
    tissue_product_storage text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tissue_slice OWNER TO postgres;

--
-- TOC entry 3625 (class 1259 OID 5359540)
-- Dependencies: 3766 6
-- Name: ccdb_debug_simple_summary_view; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW ccdb_debug_simple_summary_view AS
    SELECT m.mpid, m.image_basename, ((sg.subject_group_id || '----'::text) || sg.subject_group_name) AS subject_group_name, apj.animal_junction_pool_id, aset.animal_set_id, a.animal_id, st.strain_name, species.species_name, a.nickname, a.age_class, a.age_value, a.age_unit, a.gender, a.weight_value, a.weight_unit, art.preferred_anatomical_region_name, ts.thickness, ts.thickness_unit, ct.preferred_cell_name, sct.preferred_subcellular_name FROM (((((((((((((((((((((microscopy_products m LEFT JOIN specimen spec ON ((m.specimen_id = spec.specimen_id))) LEFT JOIN subject subj ON ((spec.subject_id = subj.subject_id))) LEFT JOIN subject_set subs ON ((subj.subject_id = subs.subject_id))) LEFT JOIN subject_group sg ON ((subs.subject_group_id = sg.subject_group_id))) LEFT JOIN animal_pool_junction apj ON ((apj.animal_junction_pool_id = subj.animal_pool_junction_id))) LEFT JOIN animal_set aset ON ((aset.animal_pool_junction_id = apj.animal_junction_pool_id))) LEFT JOIN animal a ON ((a.animal_id = aset.animal_id))) LEFT JOIN strain st ON ((st.strain_id = a.strain_id))) LEFT JOIN species species ON ((species.species_id = st.species_id))) LEFT JOIN tissue_slice ts ON ((ts.tissue_slice_id = subj.tissue_slice_id))) LEFT JOIN tissue_anatomical_region_junction tarj ON ((tarj.tissue_id = ts.tissue_slice_id))) LEFT JOIN anatomical_region_inst ari ON ((ari.region_inst_id = tarj.region_inst_id))) LEFT JOIN anatomical_region_types art ON ((art.anatomical_region_id = ari.anatomical_region_types_id))) LEFT JOIN cultured_cell cc ON ((cc.cultured_cell_id = subj.cultured_cell_id))) LEFT JOIN culturedcell_celltype_junction ccj ON ((ccj.cultured_cell_id = cc.cultured_cell_id))) LEFT JOIN cell_instances ci ON ((ci.cell_inst_id = ccj.cell_inst_id))) LEFT JOIN cell_types ct ON ((ct.cell_type_id = ci.cell_type_id))) LEFT JOIN cellular_fraction cf ON ((cf.cellular_fraction_id = subj.cellular_fraction_id))) LEFT JOIN cellularfraction_type_junction ctj ON ((ctj.cellular_fraction_id = cf.cellular_fraction_id))) LEFT JOIN subcellular_instances sist ON ((sist.subcellular_inst_id = ctj.subcellular_inist_id))) LEFT JOIN subcellular_comp_types sct ON ((sct.subcellular_comp_id = sist.subcellular_comp_id))) ORDER BY apj.animal_junction_pool_id, aset.animal_set_id, a.animal_id;


ALTER TABLE public.ccdb_debug_simple_summary_view OWNER TO postgres;

--
-- TOC entry 3436 (class 1259 OID 5295924)
-- Dependencies: 4036 6
-- Name: raw_images; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE raw_images (
    id integer NOT NULL,
    image_info_id integer,
    raw_image_set_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.raw_images OWNER TO postgres;

--
-- TOC entry 3437 (class 1259 OID 5295927)
-- Dependencies: 3744 6
-- Name: ccdb_display_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_display_view AS
    SELECT iset.mproduct_id, iset.raw_display_file AS display_file, 1 AS type FROM image_sets iset WHERE (iset.raw_display_file IS NOT NULL) UNION SELECT iset.mproduct_id, ii.display_file, 1 AS type FROM image_sets iset, raw_images ri, image_info ii WHERE (((iset.image_set_id = ri.raw_image_set_id) AND (ri.image_info_id = ii.image_info_id)) AND (ii.display_file IS NOT NULL));


ALTER TABLE public.ccdb_display_view OWNER TO ccdbd_dev;

--
-- TOC entry 3438 (class 1259 OID 5295931)
-- Dependencies: 4037 6
-- Name: ccdb_file; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_file (
    ccdb_file_id bigint NOT NULL,
    file_path text,
    note text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.ccdb_file OWNER TO ccdbd_dev;

--
-- TOC entry 3633 (class 1259 OID 5417308)
-- Dependencies: 4197 6
-- Name: ccdb_general_session; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_general_session (
    ccdb_general_session_id bigint NOT NULL,
    session_string text,
    username text,
    modified_date bigint,
    deleted boolean DEFAULT false
);


ALTER TABLE public.ccdb_general_session OWNER TO ccdbd_dev;

--
-- TOC entry 3447 (class 1259 OID 5295981)
-- Dependencies: 4044 6
-- Name: experiment; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE experiment (
    experiment_id integer NOT NULL,
    project_id integer,
    experimenters integer,
    experiment_title text,
    experiment_purpose text,
    experiement_date date,
    portal_screenname text,
    deleted boolean DEFAULT false NOT NULL
);


ALTER TABLE public.experiment OWNER TO postgres;

--
-- TOC entry 3449 (class 1259 OID 5295993)
-- Dependencies: 4046 6
-- Name: project; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE project (
    project_id integer NOT NULL,
    collaborators integer,
    leaders integer,
    publication_set_id integer,
    project_name text,
    project_desc text,
    funding_agency text,
    project_start_date date,
    project_end_date date,
    portal_screenname text,
    portal_userid bigint,
    deleted boolean DEFAULT false NOT NULL
);


ALTER TABLE public.project OWNER TO postgres;

--
-- TOC entry 3624 (class 1259 OID 5359297)
-- Dependencies: 3765 6
-- Name: ccdb_gridauth_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_gridauth_view AS
    SELECT p.project_id, p.portal_screenname AS project_owner, e.experiment_id, m.mpid, m.portal_screenname AS microscopy_owner FROM project p, experiment e, microscopy_products m WHERE ((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id));


ALTER TABLE public.ccdb_gridauth_view OWNER TO ccdbd_dev;

--
-- TOC entry 3439 (class 1259 OID 5295937)
-- Dependencies: 3745 6
-- Name: ccdb_image_workflow_img_view; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW ccdb_image_workflow_img_view AS
    SELECT image_info.thumbnail_file, image_info.display_file, image_info.mpid FROM image_info;


ALTER TABLE public.ccdb_image_workflow_img_view OWNER TO postgres;

--
-- TOC entry 3533 (class 1259 OID 5296535)
-- Dependencies: 4117 6
-- Name: microscopy_product_type; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE microscopy_product_type (
    microscopy_product_type_id integer NOT NULL,
    type text NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.microscopy_product_type OWNER TO ccdbd_dev;

--
-- TOC entry 3640 (class 1259 OID 5417425)
-- Dependencies: 3773 6
-- Name: ccdb_imageworkflow_pivot_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_imageworkflow_pivot_view AS
    SELECT m.mpid, ((m.mpid || '--'::text) || m.image_basename) AS name, ii.thumbnail_file AS image, p.project_desc, p.project_id, e.experiment_id, e.experiment_title, mt.type AS microscopy_product_type, ii.file_path, ii.image_info_id FROM project p, experiment e, (microscopy_products m LEFT JOIN microscopy_product_type mt ON ((mt.microscopy_product_type_id = m.microscopy_product_type_id))), image_info ii WHERE (((((((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id)) AND (m.mpid = ii.mpid)) AND (ii.file_path IS NOT NULL)) AND (ii.thumbnail_file IS NOT NULL)) AND (length(ii.thumbnail_file) > 0)) AND (((((ii.file_path ~~* '%.tif'::text) OR (ii.file_path ~~* '%.tiff'::text)) OR (ii.file_path ~~* '%.png'::text)) OR (ii.file_path ~~* '%.ppm'::text)) OR (ii.file_path ~~* '%.jpg'::text)));


ALTER TABLE public.ccdb_imageworkflow_pivot_view OWNER TO ccdbd_dev;

--
-- TOC entry 3521 (class 1259 OID 5296425)
-- Dependencies: 4105 6
-- Name: instrument; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE instrument (
    instrument_id integer NOT NULL,
    instrument_name text,
    instrument_type_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.instrument OWNER TO postgres;

--
-- TOC entry 3539 (class 1259 OID 5296568)
-- Dependencies: 4123 6
-- Name: organ_instances; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE organ_instances (
    organ_inst_id text NOT NULL,
    organ_type_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.organ_instances OWNER TO postgres;

--
-- TOC entry 3441 (class 1259 OID 5295947)
-- Dependencies: 4039 6
-- Name: organ_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE organ_types (
    organ_type_id integer NOT NULL,
    organ_onto_id text,
    preferred_organ_name text,
    onto_uri text,
    reference_url text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.organ_types OWNER TO postgres;

--
-- TOC entry 3584 (class 1259 OID 5296823)
-- Dependencies: 4163 6
-- Name: structure_instances; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE structure_instances (
    structure_inst_id text NOT NULL,
    structure_types_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.structure_instances OWNER TO postgres;

--
-- TOC entry 3443 (class 1259 OID 5295959)
-- Dependencies: 4041 6
-- Name: structure_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE structure_types (
    structure_id integer NOT NULL,
    structure_onto_id text,
    preferred_structure_name text,
    onto_uri text,
    reference_url text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.structure_types OWNER TO postgres;

--
-- TOC entry 3586 (class 1259 OID 5296835)
-- Dependencies: 4165 6
-- Name: system_instances; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE system_instances (
    system_inst_id text NOT NULL,
    system_type_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.system_instances OWNER TO postgres;

--
-- TOC entry 3445 (class 1259 OID 5295971)
-- Dependencies: 4043 6
-- Name: system_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE system_types (
    system_type_id integer NOT NULL,
    system_onto_id text,
    preferred_system_name text,
    onto_uri text,
    reference_url text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.system_types OWNER TO postgres;

--
-- TOC entry 3626 (class 1259 OID 5359545)
-- Dependencies: 3767 6
-- Name: ccdb_long_summary_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_long_summary_view AS
    SELECT p.project_id, p.project_desc, e.experiment_purpose, species.species_name, st.preferred_system_name, ot.preferred_organ_name, art.preferred_anatomical_region_name, ct.preferred_cell_name, stt.preferred_structure_name, mpt.type AS microscopy_product_type, m.mpid FROM project p, experiment e, (((((((((((((((((((((((((microscopy_products m LEFT JOIN anatomical_details ad ON ((m.anatomical_details_id = ad.anatomical_details_id))) LEFT JOIN anatomical_system_junctions asj ON ((ad.anatomical_details_id = asj.anatomical_details_id))) LEFT JOIN system_instances si ON ((asj.system_inst_id = si.system_inst_id))) LEFT JOIN system_types st ON ((si.system_type_id = st.system_type_id))) LEFT JOIN anatomical_structure_junctions astj ON ((astj.anatomical_details_id = ad.anatomical_details_id))) LEFT JOIN structure_instances sti ON ((sti.structure_inst_id = astj.structure_inst_id))) LEFT JOIN structure_types stt ON ((sti.structure_types_id = stt.structure_id))) LEFT JOIN anatomical_cell_junctions acj ON ((acj.anatomical_details_id = ad.anatomical_details_id))) LEFT JOIN cell_instances ci ON ((acj.cell_inst_id = ci.cell_inst_id))) LEFT JOIN cell_types ct ON ((ci.cell_type_id = ct.cell_type_id))) LEFT JOIN microscopy_product_type mpt ON ((mpt.microscopy_product_type_id = m.microscopy_product_type_id))) LEFT JOIN specimen spec ON ((spec.specimen_id = m.specimen_id))) LEFT JOIN subject_set subs ON ((subs.subject_id = spec.subject_id))) LEFT JOIN subject sub ON ((subs.subject_id = sub.subject_id))) LEFT JOIN animal_set aset ON ((sub.animal_pool_junction_id = aset.animal_set_id))) LEFT JOIN animal a ON ((a.animal_id = aset.animal_id))) LEFT JOIN strain str ON ((str.strain_id = a.strain_id))) LEFT JOIN species species ON ((species.species_id = str.species_id))) LEFT JOIN anatomical_organ_junctions aoj ON ((aoj.anatomical_details_id = ad.anatomical_details_id))) LEFT JOIN organ_instances oi ON ((oi.organ_inst_id = aoj.organ_inst_id))) LEFT JOIN organ_types ot ON ((ot.organ_type_id = oi.organ_type_id))) LEFT JOIN anatomical_region_junctions arj ON ((arj.anatomical_details_id = ad.anatomical_details_id))) LEFT JOIN anatomical_region_inst ari ON ((ari.region_inst_id = arj.region_inst_id))) LEFT JOIN anatomical_region_types art ON ((art.anatomical_region_id = ari.anatomical_region_types_id))) LEFT JOIN instrument instr ON ((instr.instrument_id = m.instrument_id))) WHERE ((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id));


ALTER TABLE public.ccdb_long_summary_view OWNER TO ccdbd_dev;

--
-- TOC entry 3446 (class 1259 OID 5295977)
-- Dependencies: 3746 6
-- Name: ccdb_onto_terms_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_onto_terms_view AS
    (((((SELECT st.preferred_system_name AS name, st.system_onto_id AS onto_id, st.onto_uri, st.reference_url FROM system_types st WHERE (st.onto_uri IS NOT NULL) UNION SELECT ct.preferred_cell_name AS name, ct.cell_onto_id AS onto_id, ct.onto_uri, ct.reference_url FROM cell_types ct WHERE (ct.onto_uri IS NOT NULL)) UNION SELECT ot.preferred_organ_name AS name, ot.organ_onto_id AS onto_id, ot.onto_uri, ot.reference_url FROM organ_types ot WHERE (ot.onto_uri IS NOT NULL)) UNION SELECT at.preferred_anatomical_region_name AS name, at.anatomical_region_onto_id AS onto_id, at.onto_uri, at.reference_url FROM anatomical_region_types at WHERE (at.onto_uri IS NOT NULL)) UNION SELECT stt.preferred_structure_name AS name, stt.structure_onto_id AS onto_id, stt.onto_uri, stt.reference_url FROM structure_types stt WHERE (stt.onto_uri IS NOT NULL)) UNION SELECT sct.preferred_subcellular_name AS name, sct.subcellular_onto_id AS onto_id, sct.onto_uri, sct.reference_url FROM subcellular_comp_types sct WHERE (sct.onto_uri IS NOT NULL)) UNION SELECT strain.strain_name AS name, strain.strain_name AS onto_id, strain.onto_uri, strain.reference_url FROM strain;


ALTER TABLE public.ccdb_onto_terms_view OWNER TO ccdbd_dev;

--
-- TOC entry 3448 (class 1259 OID 5295987)
-- Dependencies: 4045 6
-- Name: persons_2; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE persons_2 (
    person_id integer NOT NULL,
    last_name text,
    first_name text,
    email text,
    phone_number text,
    affiliated_institute text,
    notes text,
    portal_userid bigint,
    portal_screenname text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.persons_2 OWNER TO postgres;

--
-- TOC entry 3450 (class 1259 OID 5295999)
-- Dependencies: 3747 6
-- Name: ccdb_permission_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_permission_view AS
    ((SELECT m.mpid, m.image_basename, p.project_id, e.experiment_id, p.portal_screenname, true AS canread, true AS canwrite, true AS canshare FROM project p, experiment e, microscopy_products m WHERE (((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id)) AND (p.portal_screenname IS NOT NULL)) UNION SELECT m.mpid, m.image_basename, d.project_id, e.experiment_id, p.portal_screenname, d.can_read AS canread, d.can_write AS canwrite, d.can_share AS canshare FROM ccdb_data_permission d, persons_2 p, experiment e, microscopy_products m WHERE ((((d.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id)) AND (d.person_id = p.person_id)) AND (d.project_id IS NOT NULL))) UNION SELECT m.mpid, m.image_basename, proj.project_id, exp.experiment_id, p.portal_screenname, d.can_read AS canread, d.can_write AS canwrite, d.can_share AS canshare FROM ccdb_data_permission d, persons_2 p, microscopy_products m, project proj, experiment exp WHERE (((((d.microscopy_product_id = m.mpid) AND (d.person_id = p.person_id)) AND (d.microscopy_product_id IS NOT NULL)) AND (proj.project_id = exp.project_id)) AND (exp.experiment_id = m.experiment_experiment_id))) UNION SELECT m.mpid, m.image_basename, p.project_id, exp.experiment_id, m.portal_screenname, true AS canread, true AS canwrite, true AS canshare FROM microscopy_products m, project p, experiment exp WHERE (((p.project_id = exp.project_id) AND (exp.experiment_id = m.experiment_experiment_id)) AND (m.portal_screenname IS NOT NULL));


ALTER TABLE public.ccdb_permission_view OWNER TO ccdbd_dev;

--
-- TOC entry 3617 (class 1259 OID 5301067)
-- Dependencies: 4190 6
-- Name: processingstep_description; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE processingstep_description (
    processingstep_desc_id integer NOT NULL,
    processingstep_desc text,
    project_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.processingstep_description OWNER TO ccdbd_dev;

--
-- TOC entry 3627 (class 1259 OID 5359550)
-- Dependencies: 3768 6
-- Name: ccdb_processingstep_desc; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_processingstep_desc AS
    SELECT m.mpid, pd.processingstep_desc_id, pd.processingstep_desc FROM (((microscopy_products m LEFT JOIN specimen spec ON ((m.specimen_id = spec.specimen_id))) LEFT JOIN subject subs ON ((subs.subject_id = spec.subject_id))) LEFT JOIN processingstep_description pd ON ((subs.processingstep_desc_id = pd.processingstep_desc_id)));


ALTER TABLE public.ccdb_processingstep_desc OWNER TO ccdbd_dev;

--
-- TOC entry 3628 (class 1259 OID 5359555)
-- Dependencies: 3769 6
-- Name: ccdb_project2processingstep_desc; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_project2processingstep_desc AS
    SELECT p.project_id, cpd.processingstep_desc_id, cpd.processingstep_desc FROM ccdb_processingstep_desc cpd, project p, experiment e, microscopy_products m WHERE ((((((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id)) AND (m.mpid = cpd.mpid)) AND (cpd.processingstep_desc_id IS NOT NULL)) AND (cpd.processingstep_desc IS NOT NULL)) AND (length(btrim(cpd.processingstep_desc)) > 0)) UNION SELECT p.project_id, pd.processingstep_desc_id, pd.processingstep_desc FROM experiment e, microscopy_products m, (project p LEFT JOIN processingstep_description pd ON ((p.project_id = pd.project_id))) WHERE (((((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id)) AND (pd.processingstep_desc_id IS NOT NULL)) AND (pd.processingstep_desc IS NOT NULL)) AND (length(btrim(pd.processingstep_desc)) > 0));


ALTER TABLE public.ccdb_project2processingstep_desc OWNER TO ccdbd_dev;

--
-- TOC entry 3650 (class 1259 OID 20101171)
-- Dependencies: 6
-- Name: super_users; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE super_users (
    portal_screenname text NOT NULL
);


ALTER TABLE public.super_users OWNER TO ccdbd_dev;

--
-- TOC entry 3451 (class 1259 OID 5296004)
-- Dependencies: 3748 6
-- Name: ccdb_project_permission_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_project_permission_view AS
    ((SELECT DISTINCT d.project_id, p.portal_screenname, d.can_read AS canread, d.can_write AS canwrite, d.can_share AS canshare FROM ccdb_data_permission d, persons_2 p, experiment e, microscopy_products m WHERE ((((d.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id)) AND (d.person_id = p.person_id)) AND (d.project_id IS NOT NULL)) ORDER BY d.project_id, p.portal_screenname, d.can_read, d.can_write, d.can_share) UNION SELECT p.project_id, p.portal_screenname, true AS canread, true AS canwrite, true AS canshare FROM project p WHERE (p.portal_screenname IS NOT NULL)) UNION SELECT p.project_id, spu.portal_screenname, true AS canread, true AS canwrite, true AS canshare FROM project p, super_users spu;


ALTER TABLE public.ccdb_project_permission_view OWNER TO ccdbd_dev;

--
-- TOC entry 3452 (class 1259 OID 5296009)
-- Dependencies: 4047 6
-- Name: group_of_people; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE group_of_people (
    gp_id integer NOT NULL,
    group_id integer,
    person_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.group_of_people OWNER TO postgres;

--
-- TOC entry 3453 (class 1259 OID 5296012)
-- Dependencies: 4048 6
-- Name: groups; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE groups (
    group_id integer NOT NULL,
    group_name text,
    portal_screenname text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.groups OWNER TO postgres;

--
-- TOC entry 3454 (class 1259 OID 5296018)
-- Dependencies: 4049 6
-- Name: publication_junction; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE publication_junction (
    publication_junction_id integer NOT NULL,
    publication_set_id integer,
    publication_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.publication_junction OWNER TO ccdbd_dev;

--
-- TOC entry 3455 (class 1259 OID 5296021)
-- Dependencies: 4050 6
-- Name: publication_set; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE publication_set (
    publication_set_id integer NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.publication_set OWNER TO postgres;

--
-- TOC entry 3456 (class 1259 OID 5296024)
-- Dependencies: 4051 6
-- Name: publications; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE publications (
    publication_id integer NOT NULL,
    publication_desc text,
    pubmed_id text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.publications OWNER TO postgres;

--
-- TOC entry 3457 (class 1259 OID 5296030)
-- Dependencies: 3749 6
-- Name: ccdb_project_serach_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_project_serach_view AS
    ((((((((SELECT p.project_id, p.project_name AS keywords FROM project p WHERE ((p.project_name IS NOT NULL) AND (length(p.project_name) > 0)) UNION SELECT p.project_id, p.project_desc AS keywords FROM project p WHERE ((p.project_desc IS NOT NULL) AND (length(p.project_desc) > 0))) UNION SELECT p.project_id, p.funding_agency AS keywords FROM project p WHERE ((p.funding_agency IS NOT NULL) AND (length(p.funding_agency) > 0))) UNION SELECT p.project_id, p2.last_name AS keywords FROM project p, groups g, group_of_people gp, persons_2 p2 WHERE (((p.leaders = g.group_id) AND (g.group_id = gp.group_id)) AND (gp.person_id = p2.person_id))) UNION SELECT p.project_id, p2.first_name AS keywords FROM project p, groups g, group_of_people gp, persons_2 p2 WHERE (((p.leaders = g.group_id) AND (g.group_id = gp.group_id)) AND (gp.person_id = p2.person_id))) UNION SELECT p.project_id, p2.affiliated_institute AS keywords FROM project p, groups g, group_of_people gp, persons_2 p2 WHERE ((((p.leaders = g.group_id) AND (g.group_id = gp.group_id)) AND (gp.person_id = p2.person_id)) AND (p2.affiliated_institute IS NOT NULL))) UNION SELECT p.project_id, p2.last_name AS keywords FROM project p, groups g, group_of_people gp, persons_2 p2 WHERE (((p.collaborators = g.group_id) AND (g.group_id = gp.group_id)) AND (gp.person_id = p2.person_id))) UNION SELECT p.project_id, p2.first_name AS keywords FROM project p, groups g, group_of_people gp, persons_2 p2 WHERE (((p.collaborators = g.group_id) AND (g.group_id = gp.group_id)) AND (gp.person_id = p2.person_id))) UNION SELECT p.project_id, p2.affiliated_institute AS keywords FROM project p, groups g, group_of_people gp, persons_2 p2 WHERE ((((p.collaborators = g.group_id) AND (g.group_id = gp.group_id)) AND (gp.person_id = p2.person_id)) AND (p2.affiliated_institute IS NOT NULL))) UNION SELECT p.project_id, pub.publication_desc AS keywords FROM project p, publication_junction pj, publication_set ps, publications pub WHERE (((p.publication_set_id = ps.publication_set_id) AND (ps.publication_set_id = pj.publication_set_id)) AND (pj.publication_id = pub.publication_id));


ALTER TABLE public.ccdb_project_serach_view OWNER TO ccdbd_dev;

--
-- TOC entry 3458 (class 1259 OID 5296035)
-- Dependencies: 4052 6
-- Name: project_to_animal; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE project_to_animal (
    project_to_animal_id integer NOT NULL,
    project_id integer,
    animal_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.project_to_animal OWNER TO ccdbd_dev;

--
-- TOC entry 3618 (class 1259 OID 5301142)
-- Dependencies: 3764 6
-- Name: ccdb_project_to_animal_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_project_to_animal_view AS
    SELECT p.project_id, a.animal_id, a.treatments_treatment_id, a.age_unit, a.weight_unit, a.strain_id, a.gender, a.weight_value, a.age_value, a.weight_normalized_value, a.time_normalized_value, a.age_class, a.notes, a.manufacturer_id, a.litter_id, a.nickname, st.strain_name, st.onto_uri, st.reference_url, st.strain_desc, spec.species_id, spec.species_name FROM project p, subject_group sg, subject_set ss, subject s, animal_pool_junction apj, animal_set aset, animal a, strain st, species spec WHERE ((((((((p.project_id = sg.project_id) AND (sg.subject_group_id = ss.subject_group_id)) AND (ss.subject_id = s.subject_id)) AND (s.animal_pool_junction_id = apj.animal_junction_pool_id)) AND (apj.animal_junction_pool_id = aset.animal_pool_junction_id)) AND (aset.animal_id = a.animal_id)) AND (a.strain_id = st.strain_id)) AND (st.species_id = spec.species_id)) UNION SELECT ptoa.project_id, a.animal_id, a.treatments_treatment_id, a.age_unit, a.weight_unit, a.strain_id, a.gender, a.weight_value, a.age_value, a.weight_normalized_value, a.time_normalized_value, a.age_class, a.notes, a.manufacturer_id, a.litter_id, a.nickname, st.strain_name, st.onto_uri, st.reference_url, st.strain_desc, spec.species_id, spec.species_name FROM project_to_animal ptoa, animal a, strain st, species spec WHERE (((ptoa.animal_id = a.animal_id) AND (a.strain_id = st.strain_id)) AND (st.species_id = spec.species_id));


ALTER TABLE public.ccdb_project_to_animal_view OWNER TO ccdbd_dev;

--
-- TOC entry 3464 (class 1259 OID 5296070)
-- Dependencies: 4058 6
-- Name: project_to_subcellular_fraction; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE project_to_subcellular_fraction (
    project_to_subcellular_fraction_id integer NOT NULL,
    project_id integer,
    subcellular_fraction_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.project_to_subcellular_fraction OWNER TO ccdbd_dev;

--
-- TOC entry 3465 (class 1259 OID 5296073)
-- Dependencies: 3750 6
-- Name: ccdb_project_to_cellular_fraction_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_project_to_cellular_fraction_view AS
    SELECT p.project_id, cf.cellular_fraction_id, cf.cellular_fraction_desc FROM project p, subject_group sg, subject_set ss, subject s, cellular_fraction cf WHERE ((((p.project_id = sg.project_id) AND (sg.subject_group_id = ss.subject_group_id)) AND (ss.subject_id = s.subject_id)) AND (s.cellular_fraction_id = cf.cellular_fraction_id)) UNION SELECT ptosf.project_id, cf.cellular_fraction_id, cf.cellular_fraction_desc FROM project_to_subcellular_fraction ptosf, cellular_fraction cf WHERE (ptosf.subcellular_fraction_id = cf.cellular_fraction_id);


ALTER TABLE public.ccdb_project_to_cellular_fraction_view OWNER TO ccdbd_dev;

--
-- TOC entry 3467 (class 1259 OID 5296083)
-- Dependencies: 4060 6
-- Name: project_to_culturedcell; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE project_to_culturedcell (
    project_to_culturedcell_id integer NOT NULL,
    project_id integer,
    cultured_cell_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.project_to_culturedcell OWNER TO ccdbd_dev;

--
-- TOC entry 3468 (class 1259 OID 5296086)
-- Dependencies: 3751 6
-- Name: ccdb_project_to_cultured_cell_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_project_to_cultured_cell_view AS
    SELECT p.project_id, cc.cultured_cell_id, cc.date_plated, cc.plating_density_value, cc.number_of_passage, cc.media, cc.preparation, cc.source, cc.tissue_product_storage, cc.cell_line_id, cc.lot_number, cc.cultured_by, cc.cell_type, cc.cultured_cell_desc, cc.plating_density_unit FROM project p, subject_group sg, subject_set ss, subject s, cultured_cell cc WHERE ((((p.project_id = sg.project_id) AND (sg.subject_group_id = ss.subject_group_id)) AND (ss.subject_id = s.subject_id)) AND (s.cultured_cell_id = cc.cultured_cell_id)) UNION SELECT ptocc.project_id, cc.cultured_cell_id, cc.date_plated, cc.plating_density_value, cc.number_of_passage, cc.media, cc.preparation, cc.source, cc.tissue_product_storage, cc.cell_line_id, cc.lot_number, cc.cultured_by, cc.cell_type, cc.cultured_cell_desc, cc.plating_density_unit FROM project_to_culturedcell ptocc, cultured_cell cc WHERE (ptocc.cultured_cell_id = cc.cultured_cell_id);


ALTER TABLE public.ccdb_project_to_cultured_cell_view OWNER TO ccdbd_dev;

--
-- TOC entry 3629 (class 1259 OID 5359560)
-- Dependencies: 3770 6
-- Name: ccdb_project_view; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW ccdb_project_view AS
    SELECT p.project_id, p.project_name, m.mpid, m.anatomical_details_id, m.applied_protocol_id, m.x_resolution_unit, m.y_resolution_unit, m.instrument_id, m.experiment_experiment_id, m.x_size, m.y_size, m.x_resolution_value, m.y_resolution_value, m.image_basename, m.modified_date, m.submitted_date, m.curated_date, m.publish_date, m.x_res_normalized_value, m.y_res_normalized_value, m.microscopy_type_id, m.dawg_status_id, m.portal_screenname, m.z_resolution_unit, m.z_resolution_value, m.z_size, m.notes, m.portal_userid, m.ccdb_id, m.specimen_id, m.microscopy_product_type_id, mt.type FROM project p, experiment ex, microscopy_products m, microscopy_product_type mt WHERE (((p.project_id = ex.project_id) AND (ex.experiment_id = m.experiment_experiment_id)) AND (m.microscopy_product_type_id = mt.microscopy_product_type_id));


ALTER TABLE public.ccdb_project_view OWNER TO postgres;

--
-- TOC entry 3469 (class 1259 OID 5296091)
-- Dependencies: 4061 6
-- Name: member_reconstructions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE member_reconstructions (
    id integer NOT NULL,
    super_recon_id integer,
    recon_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.member_reconstructions OWNER TO postgres;

--
-- TOC entry 3470 (class 1259 OID 5296094)
-- Dependencies: 4062 6
-- Name: super_reconstructions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE super_reconstructions (
    super_recon_id integer NOT NULL,
    software_id integer,
    srecon_thumbnail_file bytea,
    srecon_display_file bytea,
    deleted boolean DEFAULT false
);


ALTER TABLE public.super_reconstructions OWNER TO postgres;

--
-- TOC entry 3471 (class 1259 OID 5296100)
-- Dependencies: 3752 6
-- Name: ccdb_resource_lookup_view; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW ccdb_resource_lookup_view AS
    (SELECT r.recon_id AS resource_id, 'recon' AS table_name, iss.mproduct_id FROM reconstructions r, image_sets_used isd, image_sets iss WHERE ((r.recon_id = isd.recon_id) AND (isd.image_set_id = iss.image_set_id)) UNION SELECT i.image_info_id AS resource_id, 'image_info' AS table_name, i.mpid AS mproduct_id FROM image_info i) UNION SELECT s.segmentation_set_id AS resource_id, 'seg' AS table_name, iss.mproduct_id FROM reconstructions r, image_sets_used isd, image_sets iss, member_reconstructions mr, super_reconstructions sr, segmentation_sets ss, segmentation s WHERE ((((((r.recon_id = isd.recon_id) AND (isd.image_set_id = iss.image_set_id)) AND (r.recon_id = mr.recon_id)) AND (mr.super_recon_id = sr.super_recon_id)) AND (sr.super_recon_id = ss.recon_id)) AND (ss.segmentation_set_id = s.segmentation_set_id));


ALTER TABLE public.ccdb_resource_lookup_view OWNER TO postgres;

--
-- TOC entry 3645 (class 1259 OID 8589759)
-- Dependencies: 3774 6
-- Name: ccdb_simple_summary_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_simple_summary_view AS
    SELECT m.mpid, m.image_basename, ((sg.subject_group_id || '----'::text) || sg.subject_group_name) AS subject_group_name, st.strain_name, species.species_name, a.nickname, a.age_class, a.age_value, a.age_unit, a.gender, a.weight_value, a.weight_unit, art.preferred_anatomical_region_name, ts.thickness, ts.thickness_unit, ct.preferred_cell_name, sct.preferred_subcellular_name, spec.specimen_nickname FROM (((((((((((((((((((((microscopy_products m LEFT JOIN specimen spec ON ((m.specimen_id = spec.specimen_id))) LEFT JOIN subject subj ON ((spec.subject_id = subj.subject_id))) LEFT JOIN subject_set subs ON ((subj.subject_id = subs.subject_id))) LEFT JOIN subject_group sg ON ((subs.subject_group_id = sg.subject_group_id))) LEFT JOIN animal_pool_junction apj ON ((apj.animal_junction_pool_id = subj.animal_pool_junction_id))) LEFT JOIN animal_set aset ON ((aset.animal_pool_junction_id = apj.animal_junction_pool_id))) LEFT JOIN animal a ON ((a.animal_id = aset.animal_id))) LEFT JOIN strain st ON ((st.strain_id = a.strain_id))) LEFT JOIN species species ON ((species.species_id = st.species_id))) LEFT JOIN tissue_slice ts ON ((ts.tissue_slice_id = subj.tissue_slice_id))) LEFT JOIN tissue_anatomical_region_junction tarj ON ((tarj.tissue_id = ts.tissue_slice_id))) LEFT JOIN anatomical_region_inst ari ON ((ari.region_inst_id = tarj.region_inst_id))) LEFT JOIN anatomical_region_types art ON ((art.anatomical_region_id = ari.anatomical_region_types_id))) LEFT JOIN cultured_cell cc ON ((cc.cultured_cell_id = subj.cultured_cell_id))) LEFT JOIN culturedcell_celltype_junction ccj ON ((ccj.cultured_cell_id = cc.cultured_cell_id))) LEFT JOIN cell_instances ci ON ((ci.cell_inst_id = ccj.cell_inst_id))) LEFT JOIN cell_types ct ON ((ct.cell_type_id = ci.cell_type_id))) LEFT JOIN cellular_fraction cf ON ((cf.cellular_fraction_id = subj.cellular_fraction_id))) LEFT JOIN cellularfraction_type_junction ctj ON ((ctj.cellular_fraction_id = cf.cellular_fraction_id))) LEFT JOIN subcellular_instances sist ON ((sist.subcellular_inst_id = ctj.subcellular_inist_id))) LEFT JOIN subcellular_comp_types sct ON ((sct.subcellular_comp_id = sist.subcellular_comp_id))) ORDER BY apj.animal_junction_pool_id, aset.animal_set_id, a.animal_id, tarj.tissue_anatomical_id, ccj.culturedcell_celltype_id, ctj.cellularfraction_type_junction_id;


ALTER TABLE public.ccdb_simple_summary_view OWNER TO ccdbd_dev;

--
-- TOC entry 3646 (class 1259 OID 19843853)
-- Dependencies: 3775 6
-- Name: ccdb_simple_summary_view2; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_simple_summary_view2 AS
    SELECT m.mpid, m.image_basename, sg.subject_group_name, st.strain_name, species.species_name, a.nickname, a.age_class, a.age_value, a.age_unit, a.gender, a.weight_value, a.weight_unit, art.preferred_anatomical_region_name, ts.thickness, ts.thickness_unit, ct.preferred_cell_name, sct.preferred_subcellular_name, spec.specimen_nickname, g.project_id FROM ccdb_gridauth_view g, (((((((((((((((((((((microscopy_products m LEFT JOIN specimen spec ON ((m.specimen_id = spec.specimen_id))) LEFT JOIN subject subj ON ((spec.subject_id = subj.subject_id))) LEFT JOIN subject_set subs ON ((subj.subject_id = subs.subject_id))) LEFT JOIN subject_group sg ON ((subs.subject_group_id = sg.subject_group_id))) LEFT JOIN animal_pool_junction apj ON ((apj.animal_junction_pool_id = subj.animal_pool_junction_id))) LEFT JOIN animal_set aset ON ((aset.animal_pool_junction_id = apj.animal_junction_pool_id))) LEFT JOIN animal a ON ((a.animal_id = aset.animal_id))) LEFT JOIN strain st ON ((st.strain_id = a.strain_id))) LEFT JOIN species species ON ((species.species_id = st.species_id))) LEFT JOIN tissue_slice ts ON ((ts.tissue_slice_id = subj.tissue_slice_id))) LEFT JOIN tissue_anatomical_region_junction tarj ON ((tarj.tissue_id = ts.tissue_slice_id))) LEFT JOIN anatomical_region_inst ari ON ((ari.region_inst_id = tarj.region_inst_id))) LEFT JOIN anatomical_region_types art ON ((art.anatomical_region_id = ari.anatomical_region_types_id))) LEFT JOIN cultured_cell cc ON ((cc.cultured_cell_id = subj.cultured_cell_id))) LEFT JOIN culturedcell_celltype_junction ccj ON ((ccj.cultured_cell_id = cc.cultured_cell_id))) LEFT JOIN cell_instances ci ON ((ci.cell_inst_id = ccj.cell_inst_id))) LEFT JOIN cell_types ct ON ((ct.cell_type_id = ci.cell_type_id))) LEFT JOIN cellular_fraction cf ON ((cf.cellular_fraction_id = subj.cellular_fraction_id))) LEFT JOIN cellularfraction_type_junction ctj ON ((ctj.cellular_fraction_id = cf.cellular_fraction_id))) LEFT JOIN subcellular_instances sist ON ((sist.subcellular_inst_id = ctj.subcellular_inist_id))) LEFT JOIN subcellular_comp_types sct ON ((sct.subcellular_comp_id = sist.subcellular_comp_id))) WHERE (g.mpid = m.mpid) ORDER BY apj.animal_junction_pool_id, aset.animal_set_id, a.animal_id, tarj.tissue_anatomical_id, ccj.culturedcell_celltype_id, ctj.cellularfraction_type_junction_id;


ALTER TABLE public.ccdb_simple_summary_view2 OWNER TO ccdbd_dev;

--
-- TOC entry 3651 (class 1259 OID 26140786)
-- Dependencies: 3777 6
-- Name: ccdb_simple_summary_view3; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_simple_summary_view3 AS
    SELECT m.mpid, m.image_basename, sg.subject_group_name, st.strain_name, species.species_name, a.nickname, a.age_class, a.age_value, a.age_unit, a.gender, a.weight_value, a.weight_unit, art.preferred_anatomical_region_name, ts.thickness, ts.thickness_unit, ct.preferred_cell_name, sct.preferred_subcellular_name, spec.specimen_nickname, g.project_id, spec.specimen_id, subj.subject_id, ts.tissue_slice_id, ts.microtome, ts.orientation, cc.cultured_cell_id, cc.date_plated, cc.plating_density_value, cc.plating_density_unit, cc.number_of_passage, cc.media, cc.preparation, cc.source, cc.tissue_product_storage, cc.lot_number, cc.cultured_cell_desc FROM ccdb_gridauth_view g, (((((((((((((((((((((microscopy_products m LEFT JOIN specimen spec ON ((m.specimen_id = spec.specimen_id))) LEFT JOIN subject subj ON ((spec.subject_id = subj.subject_id))) LEFT JOIN subject_set subs ON ((subj.subject_id = subs.subject_id))) LEFT JOIN subject_group sg ON ((subs.subject_group_id = sg.subject_group_id))) LEFT JOIN animal_pool_junction apj ON ((apj.animal_junction_pool_id = subj.animal_pool_junction_id))) LEFT JOIN animal_set aset ON ((aset.animal_pool_junction_id = apj.animal_junction_pool_id))) LEFT JOIN animal a ON ((a.animal_id = aset.animal_id))) LEFT JOIN strain st ON ((st.strain_id = a.strain_id))) LEFT JOIN species species ON ((species.species_id = st.species_id))) LEFT JOIN tissue_slice ts ON ((ts.tissue_slice_id = subj.tissue_slice_id))) LEFT JOIN tissue_anatomical_region_junction tarj ON ((tarj.tissue_id = ts.tissue_slice_id))) LEFT JOIN anatomical_region_inst ari ON ((ari.region_inst_id = tarj.region_inst_id))) LEFT JOIN anatomical_region_types art ON ((art.anatomical_region_id = ari.anatomical_region_types_id))) LEFT JOIN cultured_cell cc ON ((cc.cultured_cell_id = subj.cultured_cell_id))) LEFT JOIN culturedcell_celltype_junction ccj ON ((ccj.cultured_cell_id = cc.cultured_cell_id))) LEFT JOIN cell_instances ci ON ((ci.cell_inst_id = ccj.cell_inst_id))) LEFT JOIN cell_types ct ON ((ct.cell_type_id = ci.cell_type_id))) LEFT JOIN cellular_fraction cf ON ((cf.cellular_fraction_id = subj.cellular_fraction_id))) LEFT JOIN cellularfraction_type_junction ctj ON ((ctj.cellular_fraction_id = cf.cellular_fraction_id))) LEFT JOIN subcellular_instances sist ON ((sist.subcellular_inst_id = ctj.subcellular_inist_id))) LEFT JOIN subcellular_comp_types sct ON ((sct.subcellular_comp_id = sist.subcellular_comp_id))) WHERE ((g.mpid = m.mpid) AND (spec.deleted = false)) ORDER BY apj.animal_junction_pool_id, aset.animal_set_id, a.animal_id, tarj.tissue_anatomical_id, ccj.culturedcell_celltype_id, ctj.cellularfraction_type_junction_id;


ALTER TABLE public.ccdb_simple_summary_view3 OWNER TO ccdbd_dev;

--
-- TOC entry 3652 (class 1259 OID 26205300)
-- Dependencies: 3778 6
-- Name: ccdb_simple_summary_view4; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_simple_summary_view4 AS
    SELECT sg.subject_group_name, st.strain_name, species.species_name, a.nickname, a.age_class, a.age_value, a.age_unit, a.gender, a.weight_value, a.weight_unit, art.preferred_anatomical_region_name, ts.thickness, ts.thickness_unit, ct.preferred_cell_name, sct.preferred_subcellular_name, spec.specimen_nickname, p.project_id, spec.specimen_id, subj.subject_id, ts.tissue_slice_id, ts.microtome, ts.orientation, cc.cultured_cell_id, cc.date_plated, cc.plating_density_value, cc.plating_density_unit, cc.number_of_passage, cc.media, cc.preparation, cc.source, cc.tissue_product_storage, cc.lot_number, cc.cultured_cell_desc FROM (((((((((((((((((((((project p LEFT JOIN subject_group sg ON ((sg.project_id = p.project_id))) LEFT JOIN subject_set subs ON ((subs.subject_group_id = sg.subject_group_id))) LEFT JOIN subject subj ON ((subs.subject_id = subj.subject_id))) LEFT JOIN specimen spec ON ((spec.subject_id = subj.subject_id))) LEFT JOIN animal_pool_junction apj ON ((apj.animal_junction_pool_id = subj.animal_pool_junction_id))) LEFT JOIN animal_set aset ON ((aset.animal_pool_junction_id = apj.animal_junction_pool_id))) LEFT JOIN animal a ON ((a.animal_id = aset.animal_id))) LEFT JOIN strain st ON ((st.strain_id = a.strain_id))) LEFT JOIN species species ON ((species.species_id = st.species_id))) LEFT JOIN tissue_slice ts ON ((ts.tissue_slice_id = subj.tissue_slice_id))) LEFT JOIN tissue_anatomical_region_junction tarj ON ((tarj.tissue_id = ts.tissue_slice_id))) LEFT JOIN anatomical_region_inst ari ON ((ari.region_inst_id = tarj.region_inst_id))) LEFT JOIN anatomical_region_types art ON ((art.anatomical_region_id = ari.anatomical_region_types_id))) LEFT JOIN cultured_cell cc ON ((cc.cultured_cell_id = subj.cultured_cell_id))) LEFT JOIN culturedcell_celltype_junction ccj ON ((ccj.cultured_cell_id = cc.cultured_cell_id))) LEFT JOIN cell_instances ci ON ((ci.cell_inst_id = ccj.cell_inst_id))) LEFT JOIN cell_types ct ON ((ct.cell_type_id = ci.cell_type_id))) LEFT JOIN cellular_fraction cf ON ((cf.cellular_fraction_id = subj.cellular_fraction_id))) LEFT JOIN cellularfraction_type_junction ctj ON ((ctj.cellular_fraction_id = cf.cellular_fraction_id))) LEFT JOIN subcellular_instances sist ON ((sist.subcellular_inst_id = ctj.subcellular_inist_id))) LEFT JOIN subcellular_comp_types sct ON ((sct.subcellular_comp_id = sist.subcellular_comp_id))) WHERE ((spec.deleted = false) AND (spec.used_as_template = true)) ORDER BY apj.animal_junction_pool_id, aset.animal_set_id, a.animal_id, tarj.tissue_anatomical_id, ccj.culturedcell_celltype_id, ctj.cellularfraction_type_junction_id;


ALTER TABLE public.ccdb_simple_summary_view4 OWNER TO ccdbd_dev;

--
-- TOC entry 782 (class 1255 OID 5359539)
-- Dependencies: 1860 6
-- Name: getusefulinfo(text, text, text); Type: FUNCTION; Schema: public; Owner: ccdbd_dev
--

CREATE FUNCTION getusefulinfo(option1 text, option2 text, option3 text) RETURNS text
    AS $$
begin
if option1 is not null and length(trim(option1)) > 0 then
	return option1;
elsif option2 is not null and length(trim(option2)) > 0 then
	return option2;
elsif option3 is not null and length(trim(option3)) > 0 then
	return option3;
end if;
      return null;
 END;
$$
    LANGUAGE plpgsql;


ALTER FUNCTION public.getusefulinfo(option1 text, option2 text, option3 text) OWNER TO ccdbd_dev;

--
-- TOC entry 3630 (class 1259 OID 5359565)
-- Dependencies: 3771 6
-- Name: ccdb_simpleui_permission_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_simpleui_permission_view AS
    ((SELECT microscopy_products.mpid, getusefulinfo(microscopy_products.notes, microscopy_products.image_basename, 'No metadata yet'::text) AS notes, microscopy_products.portal_screenname FROM microscopy_products WHERE (microscopy_products.deleted = false) UNION SELECT m.mpid, getusefulinfo(m.notes, m.image_basename, 'No metadata yet'::text) AS notes, p.portal_screenname FROM ccdb_data_permission cdp, microscopy_products m, persons_2 p WHERE (((((cdp.microscopy_product_id = m.mpid) AND (cdp.person_id = p.person_id)) AND (cdp.can_read = true)) AND (cdp.can_write = true)) AND (m.deleted = false))) UNION SELECT m.mpid, getusefulinfo(m.notes, m.image_basename, 'No metadata yet'::text) AS notes, u.portal_screenname FROM microscopy_products m, super_users u WHERE (m.deleted = false)) UNION SELECT m.mpid, getusefulinfo(m.notes, m.image_basename, 'No metadata yet'::text) AS notes, p.portal_screenname FROM ccdb_data_permission cdp, microscopy_products m, persons_2 p, ccdb_gridauth_view cv WHERE ((((((cdp.project_id = cv.project_id) AND (cv.mpid = m.mpid)) AND (cdp.person_id = p.person_id)) AND (cdp.can_read = true)) AND (cdp.can_write = true)) AND (m.deleted = false)) ORDER BY 1 DESC;


ALTER TABLE public.ccdb_simpleui_permission_view OWNER TO ccdbd_dev;

--
-- TOC entry 3472 (class 1259 OID 5296105)
-- Dependencies: 3753 6
-- Name: ccdb_subject_to_animals_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_subject_to_animals_view AS
    SELECT s.subject_id, a.animal_id, a.treatments_treatment_id, a.age_unit, a.weight_unit, a.strain_id, a.gender, a.weight_value, a.age_value, a.weight_normalized_value, a.time_normalized_value, a.age_class, a.notes, a.manufacturer_id, a.litter_id FROM project p, subject_group sg, subject_set ss, subject s, animal_pool_junction apj, animal_set aset, animal a, strain st, species spec WHERE ((((((((p.project_id = sg.project_id) AND (sg.subject_group_id = ss.subject_group_id)) AND (ss.subject_id = s.subject_id)) AND (s.animal_pool_junction_id = apj.animal_junction_pool_id)) AND (apj.animal_junction_pool_id = aset.animal_pool_junction_id)) AND (aset.animal_id = a.animal_id)) AND (a.strain_id = st.strain_id)) AND (st.species_id = spec.species_id));


ALTER TABLE public.ccdb_subject_to_animals_view OWNER TO ccdbd_dev;

--
-- TOC entry 3473 (class 1259 OID 5296110)
-- Dependencies: 3754 6
-- Name: ccdb_subject_to_strains_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_subject_to_strains_view AS
    SELECT s.subject_id, st.strain_id, st.strain_name, st.onto_uri, st.reference_url, st.strain_desc, spec.species_id, spec.species_name FROM project p, subject_group sg, subject_set ss, subject s, animal_pool_junction apj, animal_set aset, animal a, strain st, species spec WHERE ((((((((p.project_id = sg.project_id) AND (sg.subject_group_id = ss.subject_group_id)) AND (ss.subject_id = s.subject_id)) AND (s.animal_pool_junction_id = apj.animal_junction_pool_id)) AND (apj.animal_junction_pool_id = aset.animal_pool_junction_id)) AND (aset.animal_id = a.animal_id)) AND (a.strain_id = st.strain_id)) AND (st.species_id = spec.species_id));


ALTER TABLE public.ccdb_subject_to_strains_view OWNER TO ccdbd_dev;

--
-- TOC entry 3631 (class 1259 OID 5359569)
-- Dependencies: 3772 6
-- Name: ccdb_summary_result_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_summary_result_view AS
    SELECT p.project_id, m.mpid, ct.preferred_cell_name AS cell_type, st.preferred_system_name, stt.preferred_structure_name, mpt.type AS microscopy_product_type, m.portal_screenname FROM project p, experiment e, (((((((((((microscopy_products m LEFT JOIN anatomical_details ad ON ((m.anatomical_details_id = ad.anatomical_details_id))) LEFT JOIN anatomical_system_junctions asj ON ((ad.anatomical_details_id = asj.anatomical_details_id))) LEFT JOIN system_instances si ON ((asj.system_inst_id = si.system_inst_id))) LEFT JOIN system_types st ON ((si.system_type_id = st.system_type_id))) LEFT JOIN anatomical_structure_junctions astj ON ((astj.anatomical_details_id = ad.anatomical_details_id))) LEFT JOIN structure_instances sti ON ((sti.structure_inst_id = astj.structure_inst_id))) LEFT JOIN structure_types stt ON ((sti.structure_types_id = stt.structure_id))) LEFT JOIN anatomical_cell_junctions acj ON ((acj.anatomical_details_id = ad.anatomical_details_id))) LEFT JOIN cell_instances ci ON ((acj.cell_inst_id = ci.cell_inst_id))) LEFT JOIN cell_types ct ON ((ci.cell_type_id = ct.cell_type_id))) LEFT JOIN microscopy_product_type mpt ON ((mpt.microscopy_product_type_id = m.microscopy_product_type_id))) WHERE ((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id));


ALTER TABLE public.ccdb_summary_result_view OWNER TO ccdbd_dev;

--
-- TOC entry 3474 (class 1259 OID 5296114)
-- Dependencies: 3755 6
-- Name: ccdb_thumbnail_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW ccdb_thumbnail_view AS
    SELECT iset.mproduct_id, iset.raw_thumbnail_file AS thumbnail_file, 1 AS type FROM image_sets iset WHERE ((iset.raw_thumbnail_file IS NOT NULL) AND (length(iset.raw_thumbnail_file) > 0)) UNION SELECT iset.mproduct_id, ii.thumbnail_file, 1 AS type FROM image_sets iset, raw_images ri, image_info ii WHERE ((((iset.image_set_id = ri.raw_image_set_id) AND (ri.image_info_id = ii.image_info_id)) AND (ii.thumbnail_file IS NOT NULL)) AND (length(ii.thumbnail_file) > 0));


ALTER TABLE public.ccdb_thumbnail_view OWNER TO ccdbd_dev;

--
-- TOC entry 3475 (class 1259 OID 5296118)
-- Dependencies: 4063 6
-- Name: ccdb_upload_session; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ccdb_upload_session (
    upload_session_id integer NOT NULL,
    session_string text NOT NULL,
    mpid integer,
    created_time timestamp without time zone,
    email_address text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.ccdb_upload_session OWNER TO ccdbd_dev;

--
-- TOC entry 3478 (class 1259 OID 5296136)
-- Dependencies: 4066 6
-- Name: channel_protocol_step_association; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE channel_protocol_step_association (
    association_id integer NOT NULL,
    sp_protocol_step_id integer,
    acquisition_channel_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.channel_protocol_step_association OWNER TO postgres;

--
-- TOC entry 1236 (class 0 OID 0)
-- Name: chkpass; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE chkpass;


--
-- TOC entry 20 (class 1255 OID 5296143)
-- Dependencies: 6 1236
-- Name: chkpass_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION chkpass_in(cstring) RETURNS chkpass
    AS '$libdir/chkpass', 'chkpass_in'
    LANGUAGE c STRICT;


ALTER FUNCTION public.chkpass_in(cstring) OWNER TO postgres;

--
-- TOC entry 21 (class 1255 OID 5296144)
-- Dependencies: 6 1236
-- Name: chkpass_out(chkpass); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION chkpass_out(chkpass) RETURNS cstring
    AS '$libdir/chkpass', 'chkpass_out'
    LANGUAGE c STRICT;


ALTER FUNCTION public.chkpass_out(chkpass) OWNER TO postgres;

--
-- TOC entry 1235 (class 1247 OID 5296142)
-- Dependencies: 21 6 20
-- Name: chkpass; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE chkpass (
    INTERNALLENGTH = 16,
    INPUT = chkpass_in,
    OUTPUT = chkpass_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.chkpass OWNER TO postgres;

--
-- TOC entry 5018 (class 0 OID 0)
-- Dependencies: 1235
-- Name: TYPE chkpass; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE chkpass IS 'password type with checks';


--
-- TOC entry 3479 (class 1259 OID 5296146)
-- Dependencies: 4067 6
-- Name: confocal_images_done; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE confocal_images_done (
    confocal_image_id integer NOT NULL,
    fluorescent_images_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.confocal_images_done OWNER TO postgres;

--
-- TOC entry 3480 (class 1259 OID 5296149)
-- Dependencies: 4068 6
-- Name: contextual_help_links; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE contextual_help_links (
    id integer NOT NULL,
    context_description text,
    url text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.contextual_help_links OWNER TO postgres;

--
-- TOC entry 3481 (class 1259 OID 5296155)
-- Dependencies: 4069 6
-- Name: contour_components; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE contour_components (
    contour_id integer NOT NULL,
    seg_id integer,
    contour_object polygon,
    contour_z_value double precision,
    ontology_name integer,
    ontology_id text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.contour_components OWNER TO postgres;

--
-- TOC entry 3482 (class 1259 OID 5296161)
-- Dependencies: 4070 6
-- Name: coverslips; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE coverslips (
    coverslip_id integer NOT NULL,
    coverslip_name text,
    thickness_unit text,
    thickness_value double precision,
    thickness_normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.coverslips OWNER TO postgres;

--
-- TOC entry 3483 (class 1259 OID 5296167)
-- Dependencies: 4071 6
-- Name: cropped_reconstructions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE cropped_reconstructions (
    cropped_recon_id integer NOT NULL,
    recon_id integer,
    cropping_coordinate1_x numeric,
    cropping_coordinate1_y numeric,
    cropping_coordinate1_z numeric,
    cropping_coordinate2_x numeric,
    cropping_coordinate2_y numeric,
    cropping_coordinate2_z numeric,
    notes text,
    curation_notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.cropped_reconstructions OWNER TO postgres;

--
-- TOC entry 1250 (class 0 OID 0)
-- Name: cube; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE cube;


--
-- TOC entry 22 (class 1255 OID 5296174)
-- Dependencies: 6 1250
-- Name: cube_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_in(cstring) RETURNS cube
    AS '$libdir/cube', 'cube_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_in(cstring) OWNER TO postgres;

--
-- TOC entry 23 (class 1255 OID 5296175)
-- Dependencies: 6 1250
-- Name: cube_out(cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_out(cube) RETURNS cstring
    AS '$libdir/cube', 'cube_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_out(cube) OWNER TO postgres;

--
-- TOC entry 1249 (class 1247 OID 5296173)
-- Dependencies: 6 23 22
-- Name: cube; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE cube (
    INTERNALLENGTH = variable,
    INPUT = cube_in,
    OUTPUT = cube_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.cube OWNER TO postgres;

--
-- TOC entry 5024 (class 0 OID 0)
-- Dependencies: 1249
-- Name: TYPE cube; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE cube IS 'multi-dimensional cube ''(FLOAT-1, FLOAT-2, ..., FLOAT-N), (FLOAT-1, FLOAT-2, ..., FLOAT-N)''';


--
-- TOC entry 3485 (class 1259 OID 5296183)
-- Dependencies: 4073 6
-- Name: current_density; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE current_density (
    current_density_unit text NOT NULL,
    normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.current_density OWNER TO postgres;

--
-- TOC entry 3486 (class 1259 OID 5296189)
-- Dependencies: 4074 6
-- Name: data_input_statuses; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE data_input_statuses (
    data_input_status_id integer NOT NULL,
    status text NOT NULL,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.data_input_statuses OWNER TO ccdbd_dev;

--
-- TOC entry 3487 (class 1259 OID 5296195)
-- Dependencies: 4075 6
-- Name: dawg_status_type; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE dawg_status_type (
    dawg_status_type_id integer NOT NULL,
    type text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.dawg_status_type OWNER TO ccdbd_dev;

--
-- TOC entry 3488 (class 1259 OID 5296201)
-- Dependencies: 3756 6
-- Name: dawg_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW dawg_view AS
    SELECT m.mpid, ('/telescience/home/CCDB_DATA_USER.portal/CCDB_DATA_USER/'::text || dawg.type) AS prefix, (((('/project_'::text || p.project_id) || '/'::text) || 'microscopy_'::text) || m.mpid) AS postfix FROM project p, experiment e, microscopy_products m, dawg_status_type dawg WHERE (((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_experiment_id)) AND (m.dawg_status_id = dawg.dawg_status_type_id));


ALTER TABLE public.dawg_view OWNER TO ccdbd_dev;

--
-- TOC entry 1234 (class 1247 OID 5296207)
-- Dependencies: 6 3489
-- Name: dblink_pkey_results; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE dblink_pkey_results AS (
	"position" integer,
	colname text
);


ALTER TYPE public.dblink_pkey_results OWNER TO postgres;

--
-- TOC entry 3490 (class 1259 OID 5296208)
-- Dependencies: 4076 6
-- Name: dehydration_steps; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE dehydration_steps (
    dehydration_step_id integer NOT NULL,
    time_unit text,
    dehydration_id integer,
    step_item text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.dehydration_steps OWNER TO postgres;

--
-- TOC entry 3491 (class 1259 OID 5296214)
-- Dependencies: 4077 6
-- Name: detectors; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE detectors (
    detector_id integer NOT NULL,
    manufacturer_id integer,
    detector_type text,
    gain numeric,
    voltage_unit text,
    voltage_value numeric,
    voltage_normalized_value numeric,
    "offset" numeric,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.detectors OWNER TO postgres;

--
-- TOC entry 3492 (class 1259 OID 5296220)
-- Dependencies: 4078 6
-- Name: devices; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE devices (
    device_id integer NOT NULL,
    device_name text,
    device_model text,
    serial_number text,
    notes text,
    manufacturer integer,
    camera integer,
    scanner integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.devices OWNER TO postgres;

--
-- TOC entry 3493 (class 1259 OID 5296226)
-- Dependencies: 4079 6
-- Name: dichroics; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE dichroics (
    dichroics_id integer NOT NULL,
    filter_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.dichroics OWNER TO postgres;

--
-- TOC entry 3494 (class 1259 OID 5296232)
-- Dependencies: 4080 4081 6
-- Name: dif_log_product_access; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE dif_log_product_access (
    product_access_id integer NOT NULL,
    portal_user_name text NOT NULL,
    access_time timestamp without time zone NOT NULL,
    product_status_id integer,
    my_to_do_list text,
    is_locked boolean DEFAULT false,
    deleted boolean DEFAULT false
);


ALTER TABLE public.dif_log_product_access OWNER TO ccdbd_dev;

--
-- TOC entry 3495 (class 1259 OID 5296239)
-- Dependencies: 4082 6
-- Name: processed_image_sets; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE processed_image_sets (
    id integer NOT NULL,
    source_image_set_id integer NOT NULL,
    result_image_set_id integer NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.processed_image_sets OWNER TO postgres;

--
-- TOC entry 3496 (class 1259 OID 5296242)
-- Dependencies: 3757 6
-- Name: dif_original_imaget_sets_with_image_data; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW dif_original_imaget_sets_with_image_data AS
    SELECT i.image_info_id, i.file_path, i.image_size, i.display_file, i.thumbnail_file, i.mpid, i.wib_url, i.modified_time, iset.image_set_id, iset.mproduct_id, iset.raw_display_file, iset.raw_thumbnail_file, iset.set_name, iset.notes, iset.session_id, iset.acquisition_date, iset.magnification, iset.x_size, iset.y_size, iset.z_size, iset.x_resolution, iset.y_resolution, iset.z_resolution, iset.downloadable_file_desc, iset.downsampled_file_desc, iset.display_image_desc, iset.raw_animation_desc, iset.digitizing_info, iset.data_file_format FROM raw_images r, image_info i, image_sets iset WHERE (((r.raw_image_set_id = iset.image_set_id) AND (r.image_info_id = i.image_info_id)) AND (iset.image_set_id IN (SELECT iset_inner.image_set_id FROM image_sets iset_inner WHERE (NOT (iset_inner.image_set_id IN (SELECT processed_image_sets.result_image_set_id FROM processed_image_sets))))));


ALTER TABLE public.dif_original_imaget_sets_with_image_data OWNER TO ccdbd_dev;

--
-- TOC entry 3497 (class 1259 OID 5296247)
-- Dependencies: 4083 4084 6
-- Name: product_status; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE product_status (
    product_status_id integer NOT NULL,
    product_id integer NOT NULL,
    portal_user_name text NOT NULL,
    status_id integer NOT NULL,
    project_id integer NOT NULL,
    is_checked_out boolean DEFAULT false,
    deleted boolean DEFAULT false
);


ALTER TABLE public.product_status OWNER TO ccdbd_dev;

--
-- TOC entry 3498 (class 1259 OID 5296254)
-- Dependencies: 3758 6
-- Name: dif_projects_products_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW dif_projects_products_view AS
    SELECT left_side.project_id, left_side.mpid, left_side.image_basename, left_side.portal_screenname, right_side.status FROM ((SELECT p.project_id, m.mpid, m.image_basename, m.portal_screenname FROM microscopy_products m, experiment e, project p WHERE ((m.experiment_experiment_id = e.experiment_id) AND (e.project_id = p.project_id))) left_side LEFT JOIN (SELECT m2.mpid, di2.status FROM microscopy_products m2, product_status ps2, data_input_statuses di2 WHERE ((ps2.product_id = m2.mpid) AND (ps2.status_id = di2.data_input_status_id))) right_side ON ((left_side.mpid = right_side.mpid)));


ALTER TABLE public.dif_projects_products_view OWNER TO ccdbd_dev;

--
-- TOC entry 3499 (class 1259 OID 5296258)
-- Dependencies: 3759 6
-- Name: dif_user_defined_imaget_sets_with_image_data; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW dif_user_defined_imaget_sets_with_image_data AS
    SELECT i.image_info_id, i.file_path, i.image_size, i.display_file, i.thumbnail_file, i.mpid, i.wib_url, i.modified_time, iset.image_set_id, iset.mproduct_id, iset.raw_display_file, iset.raw_thumbnail_file, iset.set_name, iset.notes, iset.session_id, iset.acquisition_date, iset.magnification, iset.x_size, iset.y_size, iset.z_size, iset.x_resolution, iset.y_resolution, iset.z_resolution, iset.downloadable_file_desc, iset.downsampled_file_desc, iset.display_image_desc, iset.raw_animation_desc, iset.digitizing_info, iset.data_file_format FROM raw_images r, image_info i, image_sets iset WHERE (((r.raw_image_set_id = iset.image_set_id) AND (r.image_info_id = i.image_info_id)) AND (iset.image_set_id IN (SELECT iset_inner.image_set_id FROM image_sets iset_inner WHERE (iset_inner.image_set_id IN (SELECT processed_image_sets.result_image_set_id FROM processed_image_sets)))));


ALTER TABLE public.dif_user_defined_imaget_sets_with_image_data OWNER TO ccdbd_dev;

--
-- TOC entry 3500 (class 1259 OID 5296263)
-- Dependencies: 4085 6
-- Name: digitizing_info; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE digitizing_info (
    digitizing_info_id integer NOT NULL,
    bit_depth integer,
    digitized_by integer,
    digitizing_platform integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.digitizing_info OWNER TO ccdbd_dev;

--
-- TOC entry 3501 (class 1259 OID 5296269)
-- Dependencies: 4086 6
-- Name: down_sampled_reconstructions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE down_sampled_reconstructions (
    down_sampled_recon_id integer NOT NULL,
    recon_id integer,
    down_sampled_desc text,
    volume_dimension_x integer,
    volume_dimension_y integer,
    volume_dimension_z integer,
    voxel_scale_x numeric,
    voxel_scale_y numeric,
    voxel_scale_z integer,
    notes text,
    curation_notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.down_sampled_reconstructions OWNER TO postgres;

--
-- TOC entry 1294 (class 0 OID 0)
-- Name: ean13; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ean13;


--
-- TOC entry 24 (class 1255 OID 5296276)
-- Dependencies: 6 1294
-- Name: ean13_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ean13_in(cstring) RETURNS ean13
    AS '$libdir/isn', 'ean13_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ean13_in(cstring) OWNER TO postgres;

--
-- TOC entry 25 (class 1255 OID 5296277)
-- Dependencies: 6 1294
-- Name: ean13_out(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ean13_out(ean13) RETURNS cstring
    AS '$libdir/isn', 'ean13_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ean13_out(ean13) OWNER TO postgres;

--
-- TOC entry 1293 (class 1247 OID 5296275)
-- Dependencies: 24 25 6
-- Name: ean13; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ean13 (
    INTERNALLENGTH = 8,
    INPUT = ean13_in,
    OUTPUT = public.ean13_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.ean13 OWNER TO postgres;

--
-- TOC entry 5037 (class 0 OID 0)
-- Dependencies: 1293
-- Name: TYPE ean13; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE ean13 IS 'International European Article Number (EAN13)';


--
-- TOC entry 3502 (class 1259 OID 5296279)
-- Dependencies: 4087 6
-- Name: embedding_medium; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE embedding_medium (
    embedding_medium_id integer NOT NULL,
    embedding_medium text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.embedding_medium OWNER TO postgres;

--
-- TOC entry 3503 (class 1259 OID 5296285)
-- Dependencies: 4088 6
-- Name: embedding_steps; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE embedding_steps (
    step_id integer NOT NULL,
    embedding_id integer,
    step_item text,
    reagent integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.embedding_steps OWNER TO postgres;

--
-- TOC entry 3504 (class 1259 OID 5296291)
-- Dependencies: 4089 6
-- Name: emission_filters; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE emission_filters (
    emission_filter_id integer NOT NULL,
    notes text,
    filter_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.emission_filters OWNER TO postgres;

--
-- TOC entry 3505 (class 1259 OID 5296297)
-- Dependencies: 4090 6
-- Name: emproduct; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE emproduct (
    emproduct_id integer NOT NULL,
    mproduct integer,
    accelerating_voltage_value double precision,
    magnification integer,
    spot_size_value double precision,
    ext_filename text,
    em_param_file text,
    energy_filter_type text,
    accelerating_voltage_unit text,
    accelerating_voltage_normalized_value double precision,
    notes text,
    spot_size_unit text,
    spot_size_normalized_value double precision,
    embedding_medium integer,
    deleted boolean DEFAULT false,
    energy_filter_dispersion text,
    energy_filter_slit text
);


ALTER TABLE public.emproduct OWNER TO postgres;

--
-- TOC entry 3506 (class 1259 OID 5296303)
-- Dependencies: 4091 6
-- Name: epifluorescent_images_done; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE epifluorescent_images_done (
    epifluorescent_image_id integer NOT NULL,
    fluorescent_images_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.epifluorescent_images_done OWNER TO postgres;

--
-- TOC entry 3507 (class 1259 OID 5296306)
-- Dependencies: 4092 6
-- Name: excitation_filters; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE excitation_filters (
    excitation_filter_id integer NOT NULL,
    filter_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.excitation_filters OWNER TO postgres;

--
-- TOC entry 3621 (class 1259 OID 5301486)
-- Dependencies: 4193 6
-- Name: external_api_user; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE external_api_user (
    external_api_user_id integer NOT NULL,
    software_key text,
    programmer_name text,
    programmer_email text,
    registered_timestamp timestamp without time zone,
    deleted boolean DEFAULT false
);


ALTER TABLE public.external_api_user OWNER TO ccdbd_dev;

--
-- TOC entry 3620 (class 1259 OID 5301224)
-- Dependencies: 4192 6
-- Name: file_format_mappings; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE file_format_mappings (
    file_format_mapping_id integer NOT NULL,
    purpose_id integer,
    file_format_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.file_format_mappings OWNER TO ccdbd_dev;

--
-- TOC entry 3619 (class 1259 OID 5301216)
-- Dependencies: 4191 6
-- Name: file_format_purposes; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE file_format_purposes (
    file_format_purpose_id integer NOT NULL,
    data_section integer,
    purpose text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.file_format_purposes OWNER TO ccdbd_dev;

--
-- TOC entry 3508 (class 1259 OID 5296312)
-- Dependencies: 4093 6
-- Name: file_formats; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE file_formats (
    file_format_id integer NOT NULL,
    file_format text,
    description text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.file_formats OWNER TO postgres;

--
-- TOC entry 3509 (class 1259 OID 5296318)
-- Dependencies: 4094 6
-- Name: filters; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE filters (
    filter_id integer NOT NULL,
    manufacturer_id integer,
    model text,
    serial_number text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.filters OWNER TO postgres;

--
-- TOC entry 3510 (class 1259 OID 5296324)
-- Dependencies: 4095 6
-- Name: fluorescent_images; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE fluorescent_images (
    fluorescent_images_id integer NOT NULL,
    channel_id integer,
    filter text,
    fluorophot text,
    color text,
    excitation_wave_length integer,
    emission_wave_length integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.fluorescent_images OWNER TO postgres;

--
-- TOC entry 3634 (class 1259 OID 5417316)
-- Dependencies: 4198 6
-- Name: fluors; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE fluors (
    fluor_id integer NOT NULL,
    fluor_name text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.fluors OWNER TO postgres;

--
-- TOC entry 1317 (class 1247 OID 5296332)
-- Dependencies: 6 3511
-- Name: frame; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE frame AS (
	level integer,
	targetname text,
	func oid,
	linenumber integer,
	args text
);


ALTER TYPE public.frame OWNER TO postgres;

--
-- TOC entry 1320 (class 0 OID 0)
-- Name: gbtreekey16; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey16;


--
-- TOC entry 26 (class 1255 OID 5296334)
-- Dependencies: 6 1320
-- Name: gbtreekey16_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey16_in(cstring) RETURNS gbtreekey16
    AS '$libdir/btree_gist', 'gbtreekey_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey16_in(cstring) OWNER TO postgres;

--
-- TOC entry 27 (class 1255 OID 5296335)
-- Dependencies: 6 1320
-- Name: gbtreekey16_out(gbtreekey16); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey16_out(gbtreekey16) RETURNS cstring
    AS '$libdir/btree_gist', 'gbtreekey_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey16_out(gbtreekey16) OWNER TO postgres;

--
-- TOC entry 1319 (class 1247 OID 5296333)
-- Dependencies: 6 27 26
-- Name: gbtreekey16; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey16 (
    INTERNALLENGTH = 16,
    INPUT = gbtreekey16_in,
    OUTPUT = gbtreekey16_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.gbtreekey16 OWNER TO postgres;

--
-- TOC entry 1323 (class 0 OID 0)
-- Name: gbtreekey32; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey32;


--
-- TOC entry 28 (class 1255 OID 5296338)
-- Dependencies: 6 1323
-- Name: gbtreekey32_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey32_in(cstring) RETURNS gbtreekey32
    AS '$libdir/btree_gist', 'gbtreekey_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey32_in(cstring) OWNER TO postgres;

--
-- TOC entry 29 (class 1255 OID 5296339)
-- Dependencies: 6 1323
-- Name: gbtreekey32_out(gbtreekey32); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey32_out(gbtreekey32) RETURNS cstring
    AS '$libdir/btree_gist', 'gbtreekey_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey32_out(gbtreekey32) OWNER TO postgres;

--
-- TOC entry 1322 (class 1247 OID 5296337)
-- Dependencies: 29 28 6
-- Name: gbtreekey32; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey32 (
    INTERNALLENGTH = 32,
    INPUT = gbtreekey32_in,
    OUTPUT = gbtreekey32_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.gbtreekey32 OWNER TO postgres;

--
-- TOC entry 1326 (class 0 OID 0)
-- Name: gbtreekey4; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey4;


--
-- TOC entry 30 (class 1255 OID 5296342)
-- Dependencies: 6 1326
-- Name: gbtreekey4_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey4_in(cstring) RETURNS gbtreekey4
    AS '$libdir/btree_gist', 'gbtreekey_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey4_in(cstring) OWNER TO postgres;

--
-- TOC entry 31 (class 1255 OID 5296343)
-- Dependencies: 6 1326
-- Name: gbtreekey4_out(gbtreekey4); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey4_out(gbtreekey4) RETURNS cstring
    AS '$libdir/btree_gist', 'gbtreekey_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey4_out(gbtreekey4) OWNER TO postgres;

--
-- TOC entry 1325 (class 1247 OID 5296341)
-- Dependencies: 30 6 31
-- Name: gbtreekey4; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey4 (
    INTERNALLENGTH = 4,
    INPUT = gbtreekey4_in,
    OUTPUT = gbtreekey4_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.gbtreekey4 OWNER TO postgres;

--
-- TOC entry 1330 (class 0 OID 0)
-- Name: gbtreekey8; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey8;


--
-- TOC entry 32 (class 1255 OID 5296346)
-- Dependencies: 6 1330
-- Name: gbtreekey8_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey8_in(cstring) RETURNS gbtreekey8
    AS '$libdir/btree_gist', 'gbtreekey_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey8_in(cstring) OWNER TO postgres;

--
-- TOC entry 33 (class 1255 OID 5296347)
-- Dependencies: 6 1330
-- Name: gbtreekey8_out(gbtreekey8); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey8_out(gbtreekey8) RETURNS cstring
    AS '$libdir/btree_gist', 'gbtreekey_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey8_out(gbtreekey8) OWNER TO postgres;

--
-- TOC entry 1329 (class 1247 OID 5296345)
-- Dependencies: 33 32 6
-- Name: gbtreekey8; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey8 (
    INTERNALLENGTH = 8,
    INPUT = gbtreekey8_in,
    OUTPUT = gbtreekey8_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.gbtreekey8 OWNER TO postgres;

--
-- TOC entry 1333 (class 0 OID 0)
-- Name: gbtreekey_var; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey_var;


--
-- TOC entry 34 (class 1255 OID 5296350)
-- Dependencies: 6 1333
-- Name: gbtreekey_var_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey_var_in(cstring) RETURNS gbtreekey_var
    AS '$libdir/btree_gist', 'gbtreekey_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey_var_in(cstring) OWNER TO postgres;

--
-- TOC entry 35 (class 1255 OID 5296351)
-- Dependencies: 6 1333
-- Name: gbtreekey_var_out(gbtreekey_var); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbtreekey_var_out(gbtreekey_var) RETURNS cstring
    AS '$libdir/btree_gist', 'gbtreekey_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbtreekey_var_out(gbtreekey_var) OWNER TO postgres;

--
-- TOC entry 1332 (class 1247 OID 5296349)
-- Dependencies: 6 34 35
-- Name: gbtreekey_var; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gbtreekey_var (
    INTERNALLENGTH = variable,
    INPUT = gbtreekey_var_in,
    OUTPUT = gbtreekey_var_out,
    ALIGNMENT = int4,
    STORAGE = extended
);


ALTER TYPE public.gbtreekey_var OWNER TO postgres;

SET default_with_oids = true;

--
-- TOC entry 3512 (class 1259 OID 5296359)
-- Dependencies: 4096 6
-- Name: geometry_columns; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE geometry_columns (
    f_table_catalog character varying(256) NOT NULL,
    f_table_schema character varying(256) NOT NULL,
    f_table_name character varying(256) NOT NULL,
    f_geometry_column character varying(256) NOT NULL,
    coord_dimension integer NOT NULL,
    srid integer NOT NULL,
    type character varying(30) NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.geometry_columns OWNER TO postgres;

--
-- TOC entry 1339 (class 0 OID 0)
-- Name: ghstore; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ghstore;


--
-- TOC entry 36 (class 1255 OID 5296366)
-- Dependencies: 6 1339
-- Name: ghstore_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_in(cstring) RETURNS ghstore
    AS '$libdir/hstore', 'ghstore_in'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ghstore_in(cstring) OWNER TO postgres;

--
-- TOC entry 37 (class 1255 OID 5296367)
-- Dependencies: 6 1339
-- Name: ghstore_out(ghstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_out(ghstore) RETURNS cstring
    AS '$libdir/hstore', 'ghstore_out'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ghstore_out(ghstore) OWNER TO postgres;

--
-- TOC entry 1338 (class 1247 OID 5296365)
-- Dependencies: 37 6 36
-- Name: ghstore; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ghstore (
    INTERNALLENGTH = variable,
    INPUT = ghstore_in,
    OUTPUT = ghstore_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.ghstore OWNER TO postgres;

SET default_with_oids = false;

--
-- TOC entry 3513 (class 1259 OID 5296369)
-- Dependencies: 4097 6
-- Name: google_authentication; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE google_authentication (
    google_auth_id integer NOT NULL,
    google_user_id text,
    sid text,
    lsid text,
    auth text,
    login_time timestamp without time zone,
    deleted boolean DEFAULT false
);


ALTER TABLE public.google_authentication OWNER TO postgres;

--
-- TOC entry 3514 (class 1259 OID 5296375)
-- Dependencies: 4098 6
-- Name: google_users; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE google_users (
    google_user_id text NOT NULL,
    db_permission integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.google_users OWNER TO postgres;

--
-- TOC entry 1346 (class 0 OID 0)
-- Name: gtrgm; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gtrgm;


--
-- TOC entry 38 (class 1255 OID 5296382)
-- Dependencies: 6 1346
-- Name: gtrgm_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_in(cstring) RETURNS gtrgm
    AS '$libdir/pg_trgm', 'gtrgm_in'
    LANGUAGE c STRICT;


ALTER FUNCTION public.gtrgm_in(cstring) OWNER TO postgres;

--
-- TOC entry 39 (class 1255 OID 5296383)
-- Dependencies: 6 1346
-- Name: gtrgm_out(gtrgm); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_out(gtrgm) RETURNS cstring
    AS '$libdir/pg_trgm', 'gtrgm_out'
    LANGUAGE c STRICT;


ALTER FUNCTION public.gtrgm_out(gtrgm) OWNER TO postgres;

--
-- TOC entry 1345 (class 1247 OID 5296381)
-- Dependencies: 38 6 39
-- Name: gtrgm; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE gtrgm (
    INTERNALLENGTH = variable,
    INPUT = gtrgm_in,
    OUTPUT = gtrgm_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.gtrgm OWNER TO postgres;

--
-- TOC entry 1349 (class 0 OID 0)
-- Name: hstore; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE hstore;


--
-- TOC entry 40 (class 1255 OID 5296389)
-- Dependencies: 6 1349
-- Name: hstore_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hstore_in(cstring) RETURNS hstore
    AS '$libdir/hstore', 'hstore_in'
    LANGUAGE c STRICT;


ALTER FUNCTION public.hstore_in(cstring) OWNER TO postgres;

--
-- TOC entry 41 (class 1255 OID 5296390)
-- Dependencies: 6 1349
-- Name: hstore_out(hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hstore_out(hstore) RETURNS cstring
    AS '$libdir/hstore', 'hstore_out'
    LANGUAGE c STRICT;


ALTER FUNCTION public.hstore_out(hstore) OWNER TO postgres;

--
-- TOC entry 1348 (class 1247 OID 5296388)
-- Dependencies: 6 40 41
-- Name: hstore; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE hstore (
    INTERNALLENGTH = variable,
    INPUT = hstore_in,
    OUTPUT = hstore_out,
    ALIGNMENT = int4,
    STORAGE = extended
);


ALTER TYPE public.hstore OWNER TO postgres;

--
-- TOC entry 3515 (class 1259 OID 5296392)
-- Dependencies: 4099 6
-- Name: image2d_annotation_xml_set; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE image2d_annotation_xml_set (
    image2d_annotation_xml_set_id bigint NOT NULL,
    image_info_id integer,
    xml_file_id bigint,
    deleted boolean DEFAULT false
);


ALTER TABLE public.image2d_annotation_xml_set OWNER TO ccdbd_dev;

--
-- TOC entry 3516 (class 1259 OID 5296395)
-- Dependencies: 4100 6
-- Name: image_info_copy; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE image_info_copy (
    image_info_id integer NOT NULL,
    file_path text,
    image_size bigint,
    display_file bytea,
    thumbnail_file bytea,
    mpid integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.image_info_copy OWNER TO postgres;

--
-- TOC entry 3517 (class 1259 OID 5296401)
-- Dependencies: 4101 6
-- Name: image_types; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE image_types (
    image_type_id integer NOT NULL,
    format_name text,
    file_extension_name text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.image_types OWNER TO ccdbd_dev;

--
-- TOC entry 3518 (class 1259 OID 5296407)
-- Dependencies: 4102 6
-- Name: image_workflow_tester; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE image_workflow_tester (
    user_name text NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.image_workflow_tester OWNER TO postgres;

--
-- TOC entry 3519 (class 1259 OID 5296413)
-- Dependencies: 4103 6
-- Name: imaging_product_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE imaging_product_types (
    imaging_product_type_id integer NOT NULL,
    imaging_product_type text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.imaging_product_types OWNER TO postgres;

--
-- TOC entry 3520 (class 1259 OID 5296419)
-- Dependencies: 4104 6
-- Name: immersion_medium; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE immersion_medium (
    immersion_medium_id integer NOT NULL,
    immersion_medium text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.immersion_medium OWNER TO postgres;

--
-- TOC entry 3522 (class 1259 OID 5296431)
-- Dependencies: 4106 6
-- Name: instrument_type; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE instrument_type (
    instrument_type_id integer NOT NULL,
    instrument_type text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.instrument_type OWNER TO ccdbd_dev;

--
-- TOC entry 1371 (class 0 OID 0)
-- Name: intbig_gkey; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE intbig_gkey;


--
-- TOC entry 42 (class 1255 OID 5296438)
-- Dependencies: 6 1371
-- Name: _intbig_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _intbig_in(cstring) RETURNS intbig_gkey
    AS '$libdir/_int', '_intbig_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._intbig_in(cstring) OWNER TO postgres;

--
-- TOC entry 43 (class 1255 OID 5296439)
-- Dependencies: 6 1371
-- Name: _intbig_out(intbig_gkey); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _intbig_out(intbig_gkey) RETURNS cstring
    AS '$libdir/_int', '_intbig_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._intbig_out(intbig_gkey) OWNER TO postgres;

--
-- TOC entry 1370 (class 1247 OID 5296437)
-- Dependencies: 42 6 43
-- Name: intbig_gkey; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE intbig_gkey (
    INTERNALLENGTH = variable,
    INPUT = _intbig_in,
    OUTPUT = _intbig_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.intbig_gkey OWNER TO postgres;

--
-- TOC entry 1374 (class 0 OID 0)
-- Name: isbn; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE isbn;


--
-- TOC entry 44 (class 1255 OID 5296442)
-- Dependencies: 6 1374
-- Name: isbn_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isbn_in(cstring) RETURNS isbn
    AS '$libdir/isn', 'isbn_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isbn_in(cstring) OWNER TO postgres;

--
-- TOC entry 45 (class 1255 OID 5296443)
-- Dependencies: 6 1374
-- Name: isn_out(isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isn_out(isbn) RETURNS cstring
    AS '$libdir/isn', 'isn_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isn_out(isbn) OWNER TO postgres;

--
-- TOC entry 1373 (class 1247 OID 5296441)
-- Dependencies: 44 6 45
-- Name: isbn; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE isbn (
    INTERNALLENGTH = 8,
    INPUT = isbn_in,
    OUTPUT = public.isn_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.isbn OWNER TO postgres;

--
-- TOC entry 5057 (class 0 OID 0)
-- Dependencies: 1373
-- Name: TYPE isbn; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE isbn IS 'International Standard Book Number (ISBN)';


--
-- TOC entry 1377 (class 0 OID 0)
-- Name: isbn13; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE isbn13;


--
-- TOC entry 46 (class 1255 OID 5296446)
-- Dependencies: 6 1377
-- Name: ean13_out(isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ean13_out(isbn13) RETURNS cstring
    AS '$libdir/isn', 'ean13_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ean13_out(isbn13) OWNER TO postgres;

--
-- TOC entry 47 (class 1255 OID 5296447)
-- Dependencies: 6 1377
-- Name: isbn13_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isbn13_in(cstring) RETURNS isbn13
    AS '$libdir/isn', 'isbn_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isbn13_in(cstring) OWNER TO postgres;

--
-- TOC entry 1376 (class 1247 OID 5296445)
-- Dependencies: 6 47 46
-- Name: isbn13; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE isbn13 (
    INTERNALLENGTH = 8,
    INPUT = isbn13_in,
    OUTPUT = public.ean13_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.isbn13 OWNER TO postgres;

--
-- TOC entry 5058 (class 0 OID 0)
-- Dependencies: 1376
-- Name: TYPE isbn13; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE isbn13 IS 'International Standard Book Number 13 (ISBN13)';


--
-- TOC entry 1381 (class 0 OID 0)
-- Name: ismn; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ismn;


--
-- TOC entry 48 (class 1255 OID 5296450)
-- Dependencies: 6 1381
-- Name: ismn_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ismn_in(cstring) RETURNS ismn
    AS '$libdir/isn', 'ismn_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ismn_in(cstring) OWNER TO postgres;

--
-- TOC entry 49 (class 1255 OID 5296451)
-- Dependencies: 6 1381
-- Name: isn_out(ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isn_out(ismn) RETURNS cstring
    AS '$libdir/isn', 'isn_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isn_out(ismn) OWNER TO postgres;

--
-- TOC entry 1380 (class 1247 OID 5296449)
-- Dependencies: 49 6 48
-- Name: ismn; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ismn (
    INTERNALLENGTH = 8,
    INPUT = ismn_in,
    OUTPUT = public.isn_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.ismn OWNER TO postgres;

--
-- TOC entry 5059 (class 0 OID 0)
-- Dependencies: 1380
-- Name: TYPE ismn; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE ismn IS 'International Standard Music Number (ISMN)';


--
-- TOC entry 1384 (class 0 OID 0)
-- Name: ismn13; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ismn13;


--
-- TOC entry 50 (class 1255 OID 5296454)
-- Dependencies: 6 1384
-- Name: ean13_out(ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ean13_out(ismn13) RETURNS cstring
    AS '$libdir/isn', 'ean13_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ean13_out(ismn13) OWNER TO postgres;

--
-- TOC entry 51 (class 1255 OID 5296455)
-- Dependencies: 6 1384
-- Name: ismn13_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ismn13_in(cstring) RETURNS ismn13
    AS '$libdir/isn', 'ismn_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ismn13_in(cstring) OWNER TO postgres;

--
-- TOC entry 1383 (class 1247 OID 5296453)
-- Dependencies: 50 6 51
-- Name: ismn13; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ismn13 (
    INTERNALLENGTH = 8,
    INPUT = ismn13_in,
    OUTPUT = public.ean13_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.ismn13 OWNER TO postgres;

--
-- TOC entry 5060 (class 0 OID 0)
-- Dependencies: 1383
-- Name: TYPE ismn13; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE ismn13 IS 'International Standard Music Number 13 (ISMN13)';


--
-- TOC entry 1386 (class 0 OID 0)
-- Name: issn; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE issn;


--
-- TOC entry 52 (class 1255 OID 5296458)
-- Dependencies: 6 1386
-- Name: isn_out(issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isn_out(issn) RETURNS cstring
    AS '$libdir/isn', 'isn_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isn_out(issn) OWNER TO postgres;

--
-- TOC entry 53 (class 1255 OID 5296459)
-- Dependencies: 6 1386
-- Name: issn_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION issn_in(cstring) RETURNS issn
    AS '$libdir/isn', 'issn_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.issn_in(cstring) OWNER TO postgres;

--
-- TOC entry 1385 (class 1247 OID 5296457)
-- Dependencies: 52 6 53
-- Name: issn; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE issn (
    INTERNALLENGTH = 8,
    INPUT = issn_in,
    OUTPUT = public.isn_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.issn OWNER TO postgres;

--
-- TOC entry 5061 (class 0 OID 0)
-- Dependencies: 1385
-- Name: TYPE issn; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE issn IS 'International Standard Serial Number (ISSN)';


--
-- TOC entry 1389 (class 0 OID 0)
-- Name: issn13; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE issn13;


--
-- TOC entry 54 (class 1255 OID 5296462)
-- Dependencies: 6 1389
-- Name: ean13_out(issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ean13_out(issn13) RETURNS cstring
    AS '$libdir/isn', 'ean13_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ean13_out(issn13) OWNER TO postgres;

--
-- TOC entry 55 (class 1255 OID 5296463)
-- Dependencies: 6 1389
-- Name: issn13_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION issn13_in(cstring) RETURNS issn13
    AS '$libdir/isn', 'issn_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.issn13_in(cstring) OWNER TO postgres;

--
-- TOC entry 1388 (class 1247 OID 5296461)
-- Dependencies: 54 6 55
-- Name: issn13; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE issn13 (
    INTERNALLENGTH = 8,
    INPUT = issn13_in,
    OUTPUT = public.ean13_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.issn13 OWNER TO postgres;

--
-- TOC entry 5062 (class 0 OID 0)
-- Dependencies: 1388
-- Name: TYPE issn13; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE issn13 IS 'International Standard Serial Number 13 (ISSN13)';


--
-- TOC entry 3654 (class 1259 OID 26225878)
-- Dependencies: 3780 6
-- Name: keywords_experiment_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW keywords_experiment_view AS
    (SELECT ((((p.email || ' '::text) || p.first_name) || ' '::text) || p.last_name) AS keywords, e.experiment_id, e.project_id FROM group_of_people gp, groups g, persons_2 p, experiment e WHERE ((((gp.group_id = g.group_id) AND (gp.person_id = p.person_id)) AND (e.experimenters = g.group_id)) AND (e.deleted = false)) UNION SELECT experiment.experiment_title AS keywords, experiment.experiment_id, experiment.project_id FROM experiment WHERE ((length(experiment.experiment_title) > 0) AND (experiment.deleted = false))) UNION SELECT experiment.experiment_purpose AS keywords, experiment.experiment_id, experiment.project_id FROM experiment WHERE ((length(experiment.experiment_purpose) > 0) AND (experiment.deleted = false));


ALTER TABLE public.keywords_experiment_view OWNER TO ccdbd_dev;

--
-- TOC entry 3655 (class 1259 OID 26225882)
-- Dependencies: 3781 6
-- Name: keywords_microscopy_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW keywords_microscopy_view AS
    ((((SELECT (microscopy_products.mpid || ''::text) AS keywords, microscopy_products.mpid, microscopy_products.experiment_experiment_id AS experiment_id FROM microscopy_products UNION SELECT (i.instrument_name || it.instrument_type) AS keywords, m.mpid, m.experiment_experiment_id AS experiment_id FROM microscopy_products m, instrument i, instrument_type it WHERE ((m.instrument_id = i.instrument_id) AND (i.instrument_type_id = it.instrument_type_id))) UNION SELECT mt.type AS keywords, m.mpid, m.experiment_experiment_id AS experiment_id FROM microscopy_product_type mt, microscopy_products m WHERE (mt.microscopy_product_type_id = m.microscopy_product_type_id)) UNION SELECT microscopy_products.image_basename AS keywords, microscopy_products.mpid, microscopy_products.experiment_experiment_id AS experiment_id FROM microscopy_products WHERE ((length(microscopy_products.image_basename) > 0) AND (microscopy_products.deleted = false))) UNION SELECT microscopy_products.notes AS keywords, microscopy_products.mpid, microscopy_products.experiment_experiment_id AS experiment_id FROM microscopy_products WHERE ((length(microscopy_products.notes) > 0) AND (microscopy_products.deleted = false))) UNION SELECT microscopy_products.portal_screenname AS keywords, microscopy_products.mpid, microscopy_products.experiment_experiment_id AS experiment_id FROM microscopy_products WHERE (((length(microscopy_products.notes) > 0) AND (microscopy_products.deleted = false)) AND (microscopy_products.portal_screenname IS NOT NULL));


ALTER TABLE public.keywords_microscopy_view OWNER TO ccdbd_dev;

--
-- TOC entry 3653 (class 1259 OID 26225873)
-- Dependencies: 3779 6
-- Name: keywords_project_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW keywords_project_view AS
    (((((SELECT (project.project_id || ''::text) AS keywords, project.project_id FROM project WHERE (project.deleted = false) UNION SELECT ((((p.email || ' '::text) || p.first_name) || ' '::text) || p.last_name) AS keywords, pr.project_id FROM group_of_people gp, groups g, persons_2 p, project pr WHERE ((((gp.group_id = g.group_id) AND (gp.person_id = p.person_id)) AND (pr.collaborators = g.group_id)) AND (pr.deleted = false))) UNION SELECT ((((p.email || ' '::text) || p.first_name) || ' '::text) || p.last_name) AS keywords, pr.project_id FROM group_of_people gp, groups g, persons_2 p, project pr WHERE ((((gp.group_id = g.group_id) AND (gp.person_id = p.person_id)) AND (pr.leaders = g.group_id)) AND (pr.deleted = false))) UNION SELECT (pub.publication_desc || pub.pubmed_id) AS keywords, p.project_id FROM project p, publication_set ps, publications pub, publication_junction pj WHERE ((((p.publication_set_id = ps.publication_set_id) AND (ps.publication_set_id = pj.publication_set_id)) AND (pj.publication_id = pub.publication_id)) AND (p.deleted = false))) UNION SELECT project.project_name AS keywords, project.project_id FROM project WHERE ((length(project.project_name) > 0) AND (project.deleted = false))) UNION SELECT project.project_desc AS keywords, project.project_id FROM project WHERE ((length(project.project_desc) > 0) AND (project.deleted = false))) UNION SELECT project.funding_agency AS keywords, project.project_id FROM project WHERE ((length(project.funding_agency) > 0) AND (project.deleted = false));


ALTER TABLE public.keywords_project_view OWNER TO ccdbd_dev;

--
-- TOC entry 3656 (class 1259 OID 26225888)
-- Dependencies: 3782 6
-- Name: keywords_overall_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW keywords_overall_view AS
    SELECT ((p.keywords || e.keywords) || m.keywords) AS keywords, m.mpid FROM keywords_project_view p, keywords_experiment_view e, keywords_microscopy_view m WHERE ((p.project_id = e.project_id) AND (e.experiment_id = m.experiment_id));


ALTER TABLE public.keywords_overall_view OWNER TO ccdbd_dev;

--
-- TOC entry 3523 (class 1259 OID 5296465)
-- Dependencies: 4107 6
-- Name: lasers; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE lasers (
    laser_id integer NOT NULL,
    pump_light_source integer,
    light_source integer,
    laser_type text,
    medium text,
    wave_length_unit text,
    wave_length_value integer,
    wave_length_normalized_value integer,
    frequency_doubled boolean,
    tunable boolean,
    pulse text,
    power double precision,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.lasers OWNER TO postgres;

--
-- TOC entry 3524 (class 1259 OID 5296471)
-- Dependencies: 4108 6
-- Name: length_measurement; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE length_measurement (
    length_unit text NOT NULL,
    normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.length_measurement OWNER TO postgres;

--
-- TOC entry 3525 (class 1259 OID 5296477)
-- Dependencies: 4109 6
-- Name: lenses; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE lenses (
    lens_id integer NOT NULL,
    lens text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.lenses OWNER TO postgres;

--
-- TOC entry 3526 (class 1259 OID 5296483)
-- Dependencies: 4110 6
-- Name: light_sources; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE light_sources (
    light_source_id integer NOT NULL,
    manufacturer_id integer,
    model text,
    serial_number text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.light_sources OWNER TO postgres;

--
-- TOC entry 3527 (class 1259 OID 5296489)
-- Dependencies: 4111 6
-- Name: litter; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE litter (
    litter_id integer NOT NULL,
    litter_name text,
    litter_desc text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.litter OWNER TO ccdbd_dev;

--
-- TOC entry 3635 (class 1259 OID 5417324)
-- Dependencies: 4199 6
-- Name: lm_channels; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE lm_channels (
    lm_channel_id integer NOT NULL,
    acquisition_channel integer,
    aux_light_source integer,
    detector integer,
    filter integer,
    light_source integer,
    channel_name text,
    samples_per_pixel integer,
    light_attenuation double precision,
    light_wave_length integer,
    detector_offset double precision,
    detector_gain double precision,
    illumination_type text,
    pinhole_size double precision,
    photometric_interpretation text,
    mode text,
    contrast_method text,
    aux_light_attenuation double precision,
    aux_technique text,
    aux_wave_length integer,
    excitation_wave_length integer,
    emission_wave_length integer,
    fluor text,
    nd_filter double precision,
    color text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.lm_channels OWNER TO postgres;

--
-- TOC entry 3528 (class 1259 OID 5296495)
-- Dependencies: 4112 6
-- Name: lm_product; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE lm_product (
    lmproduct_id integer NOT NULL,
    mproduct integer,
    lens_magnification integer,
    numerical_aperture text,
    refractive_index text,
    notes text,
    lens integer,
    immersion_medium integer,
    mounting_medium integer,
    coverslips integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.lm_product OWNER TO postgres;

--
-- TOC entry 3529 (class 1259 OID 5296501)
-- Dependencies: 4113 6
-- Name: lmproduct_channels; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE lmproduct_channels (
    channel_id integer NOT NULL,
    lmproduct_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.lmproduct_channels OWNER TO postgres;

--
-- TOC entry 1408 (class 0 OID 0)
-- Name: lquery; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE lquery;


--
-- TOC entry 56 (class 1255 OID 5296505)
-- Dependencies: 6 1408
-- Name: lquery_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lquery_in(cstring) RETURNS lquery
    AS '$libdir/ltree', 'lquery_in'
    LANGUAGE c STRICT;


ALTER FUNCTION public.lquery_in(cstring) OWNER TO postgres;

--
-- TOC entry 57 (class 1255 OID 5296506)
-- Dependencies: 6 1408
-- Name: lquery_out(lquery); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lquery_out(lquery) RETURNS cstring
    AS '$libdir/ltree', 'lquery_out'
    LANGUAGE c STRICT;


ALTER FUNCTION public.lquery_out(lquery) OWNER TO postgres;

--
-- TOC entry 1407 (class 1247 OID 5296504)
-- Dependencies: 6 56 57
-- Name: lquery; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE lquery (
    INTERNALLENGTH = variable,
    INPUT = lquery_in,
    OUTPUT = lquery_out,
    ALIGNMENT = int4,
    STORAGE = extended
);


ALTER TYPE public.lquery OWNER TO postgres;

--
-- TOC entry 1411 (class 0 OID 0)
-- Name: ltree; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ltree;


--
-- TOC entry 58 (class 1255 OID 5296509)
-- Dependencies: 6 1411
-- Name: ltree_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_in(cstring) RETURNS ltree
    AS '$libdir/ltree', 'ltree_in'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ltree_in(cstring) OWNER TO postgres;

--
-- TOC entry 59 (class 1255 OID 5296510)
-- Dependencies: 6 1411
-- Name: ltree_out(ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_out(ltree) RETURNS cstring
    AS '$libdir/ltree', 'ltree_out'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ltree_out(ltree) OWNER TO postgres;

--
-- TOC entry 1410 (class 1247 OID 5296508)
-- Dependencies: 59 6 58
-- Name: ltree; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ltree (
    INTERNALLENGTH = variable,
    INPUT = ltree_in,
    OUTPUT = ltree_out,
    ALIGNMENT = int4,
    STORAGE = extended
);


ALTER TYPE public.ltree OWNER TO postgres;

--
-- TOC entry 1414 (class 0 OID 0)
-- Name: ltree_gist; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ltree_gist;


--
-- TOC entry 60 (class 1255 OID 5296513)
-- Dependencies: 6 1414
-- Name: ltree_gist_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_gist_in(cstring) RETURNS ltree_gist
    AS '$libdir/ltree', 'ltree_gist_in'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ltree_gist_in(cstring) OWNER TO postgres;

--
-- TOC entry 61 (class 1255 OID 5296514)
-- Dependencies: 6 1414
-- Name: ltree_gist_out(ltree_gist); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_gist_out(ltree_gist) RETURNS cstring
    AS '$libdir/ltree', 'ltree_gist_out'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ltree_gist_out(ltree_gist) OWNER TO postgres;

--
-- TOC entry 1413 (class 1247 OID 5296512)
-- Dependencies: 61 6 60
-- Name: ltree_gist; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ltree_gist (
    INTERNALLENGTH = variable,
    INPUT = ltree_gist_in,
    OUTPUT = ltree_gist_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.ltree_gist OWNER TO postgres;

--
-- TOC entry 1417 (class 0 OID 0)
-- Name: ltxtquery; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ltxtquery;


--
-- TOC entry 62 (class 1255 OID 5296517)
-- Dependencies: 6 1417
-- Name: ltxtq_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltxtq_in(cstring) RETURNS ltxtquery
    AS '$libdir/ltree', 'ltxtq_in'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ltxtq_in(cstring) OWNER TO postgres;

--
-- TOC entry 63 (class 1255 OID 5296518)
-- Dependencies: 6 1417
-- Name: ltxtq_out(ltxtquery); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltxtq_out(ltxtquery) RETURNS cstring
    AS '$libdir/ltree', 'ltxtq_out'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ltxtq_out(ltxtquery) OWNER TO postgres;

--
-- TOC entry 1416 (class 1247 OID 5296516)
-- Dependencies: 62 6 63
-- Name: ltxtquery; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE ltxtquery (
    INTERNALLENGTH = variable,
    INPUT = ltxtq_in,
    OUTPUT = ltxtq_out,
    ALIGNMENT = int4,
    STORAGE = extended
);


ALTER TYPE public.ltxtquery OWNER TO postgres;

--
-- TOC entry 3530 (class 1259 OID 5296520)
-- Dependencies: 4114 6
-- Name: manufacturers; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE manufacturers (
    manufacturer_id integer NOT NULL,
    manufacturer_name text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.manufacturers OWNER TO ccdbd_dev;

--
-- TOC entry 3531 (class 1259 OID 5296526)
-- Dependencies: 4115 6
-- Name: map_file_junctions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE map_file_junctions (
    map_file_junction_id integer NOT NULL,
    mpid integer,
    map_file_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.map_file_junctions OWNER TO postgres;

--
-- TOC entry 3532 (class 1259 OID 5296529)
-- Dependencies: 4116 6
-- Name: map_files; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE map_files (
    map_file_id integer NOT NULL,
    image_info_id integer,
    desc_2 text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.map_files OWNER TO postgres;

--
-- TOC entry 3534 (class 1259 OID 5296541)
-- Dependencies: 4118 6
-- Name: mounting_medium; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE mounting_medium (
    mounting_medium_id integer NOT NULL,
    mounting_medium text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.mounting_medium OWNER TO postgres;

--
-- TOC entry 3647 (class 1259 OID 20079036)
-- Dependencies: 3776 6
-- Name: mpid_path_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW mpid_path_view AS
    SELECT (dawg_view.prefix || dawg_view.postfix) AS mppath, dawg_view.mpid, (dawg_view.prefix || dawg_view.postfix) AS mpid_path FROM dawg_view;


ALTER TABLE public.mpid_path_view OWNER TO ccdbd_dev;

--
-- TOC entry 3535 (class 1259 OID 5296547)
-- Dependencies: 4119 6
-- Name: multiphoton_images; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE multiphoton_images (
    multiphoton_image_id integer NOT NULL,
    fluorescent_images_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.multiphoton_images OWNER TO postgres;

--
-- TOC entry 3536 (class 1259 OID 5296550)
-- Dependencies: 4120 6
-- Name: my_favorites; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE my_favorites (
    my_favorite_id integer NOT NULL,
    mpid integer NOT NULL,
    portal_user_id text NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.my_favorites OWNER TO ccdbd_dev;

--
-- TOC entry 3664 (class 1259 OID 27352704)
-- Dependencies: 6
-- Name: ncmir_resource; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE ncmir_resource (
    resource_id bigint NOT NULL,
    time_stamp timestamp without time zone,
    mpid bigint,
    folder text,
    num_of_bytes bigint,
    num_of_files bigint,
    folder_type text,
    ipath text
);


ALTER TABLE public.ncmir_resource OWNER TO ccdbd_dev;

--
-- TOC entry 3537 (class 1259 OID 5296556)
-- Dependencies: 4121 6
-- Name: nif_result_cache; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE nif_result_cache (
    nif_cache_result_id bigint NOT NULL,
    query_url text NOT NULL,
    result_xml text NOT NULL,
    modified_time timestamp without time zone,
    deleted boolean DEFAULT false
);


ALTER TABLE public.nif_result_cache OWNER TO ccdbd_dev;

--
-- TOC entry 3538 (class 1259 OID 5296562)
-- Dependencies: 4122 6
-- Name: nucleic_acid; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE nucleic_acid (
    nucleic_acid_id integer NOT NULL,
    probe_type text,
    target_sequence text,
    probe_length integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.nucleic_acid OWNER TO postgres;

--
-- TOC entry 3540 (class 1259 OID 5296574)
-- Dependencies: 4124 6
-- Name: organism; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE organism (
    organism_id integer NOT NULL,
    organism_group_name text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.organism OWNER TO postgres;

--
-- TOC entry 3541 (class 1259 OID 5296580)
-- Dependencies: 4125 6
-- Name: param_file_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE param_file_types (
    param_file_type_id integer NOT NULL,
    param_file_type text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.param_file_types OWNER TO postgres;

--
-- TOC entry 3542 (class 1259 OID 5296586)
-- Dependencies: 4126 6
-- Name: param_files; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE param_files (
    param_file_id integer NOT NULL,
    image_set_id integer,
    param_file_type_id integer,
    param_file text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.param_files OWNER TO postgres;

--
-- TOC entry 3543 (class 1259 OID 5296592)
-- Dependencies: 4127 6
-- Name: person_and_roles; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE person_and_roles (
    role_id integer,
    person_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.person_and_roles OWNER TO postgres;

--
-- TOC entry 781 (class 1255 OID 5296595)
-- Dependencies: 6
-- Name: pg_buffercache_pages(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pg_buffercache_pages() RETURNS SETOF record
    AS '$libdir/pg_buffercache', 'pg_buffercache_pages'
    LANGUAGE c;


ALTER FUNCTION public.pg_buffercache_pages() OWNER TO postgres;

--
-- TOC entry 3544 (class 1259 OID 5296596)
-- Dependencies: 3760 6
-- Name: pg_buffercache; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW pg_buffercache AS
    SELECT p.bufferid, p.relfilenode, p.reltablespace, p.reldatabase, p.relblocknumber, p.isdirty, p.usagecount FROM pg_buffercache_pages() p(bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid, relblocknumber bigint, isdirty boolean, usagecount smallint);


ALTER TABLE public.pg_buffercache OWNER TO postgres;

--
-- TOC entry 64 (class 1255 OID 5296600)
-- Dependencies: 6
-- Name: pg_freespacemap_pages(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pg_freespacemap_pages() RETURNS SETOF record
    AS '$libdir/pg_freespacemap', 'pg_freespacemap_pages'
    LANGUAGE c;


ALTER FUNCTION public.pg_freespacemap_pages() OWNER TO postgres;

--
-- TOC entry 3545 (class 1259 OID 5296601)
-- Dependencies: 3761 6
-- Name: pg_freespacemap_pages; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW pg_freespacemap_pages AS
    SELECT p.reltablespace, p.reldatabase, p.relfilenode, p.relblocknumber, p.bytes FROM pg_freespacemap_pages() p(reltablespace oid, reldatabase oid, relfilenode oid, relblocknumber bigint, bytes integer);


ALTER TABLE public.pg_freespacemap_pages OWNER TO postgres;

--
-- TOC entry 65 (class 1255 OID 5296605)
-- Dependencies: 6
-- Name: pg_freespacemap_relations(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pg_freespacemap_relations() RETURNS SETOF record
    AS '$libdir/pg_freespacemap', 'pg_freespacemap_relations'
    LANGUAGE c;


ALTER FUNCTION public.pg_freespacemap_relations() OWNER TO postgres;

--
-- TOC entry 3546 (class 1259 OID 5296606)
-- Dependencies: 3762 6
-- Name: pg_freespacemap_relations; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW pg_freespacemap_relations AS
    SELECT p.reltablespace, p.reldatabase, p.relfilenode, p.avgrequest, p.interestingpages, p.storedpages, p.nextpage FROM pg_freespacemap_relations() p(reltablespace oid, reldatabase oid, relfilenode oid, avgrequest integer, interestingpages integer, storedpages integer, nextpage integer);


ALTER TABLE public.pg_freespacemap_relations OWNER TO postgres;

--
-- TOC entry 3547 (class 1259 OID 5296610)
-- Dependencies: 4128 6
-- Name: plate_density_unit; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE plate_density_unit (
    plate_density_unit text NOT NULL,
    plate_density_scale bigint,
    deleted boolean DEFAULT false
);


ALTER TABLE public.plate_density_unit OWNER TO ccdbd_dev;

--
-- TOC entry 3548 (class 1259 OID 5296616)
-- Dependencies: 4129 6
-- Name: project_to_tissue; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE project_to_tissue (
    project_to_tissue_id integer NOT NULL,
    project_id integer,
    tissue_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.project_to_tissue OWNER TO ccdbd_dev;

--
-- TOC entry 3632 (class 1259 OID 5417295)
-- Dependencies: 4196 6
-- Name: project_tree_html; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE project_tree_html (
    project_id integer NOT NULL,
    project_html text NOT NULL,
    host text NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.project_tree_html OWNER TO ccdbd_dev;

--
-- TOC entry 3637 (class 1259 OID 5417373)
-- Dependencies: 4201 6
-- Name: protein_instances; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE protein_instances (
    protein_instance_id integer NOT NULL,
    protein_type_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.protein_instances OWNER TO postgres;

--
-- TOC entry 3636 (class 1259 OID 5417365)
-- Dependencies: 4200 6
-- Name: protein_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE protein_types (
    protein_type_id integer NOT NULL,
    preferred_protein_name text,
    isoform text,
    entrez_id text,
    pdb_id text,
    onto_uri text,
    reference_url text,
    notes text,
    abbreviation text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.protein_types OWNER TO postgres;

--
-- TOC entry 1464 (class 1247 OID 5296621)
-- Dependencies: 6 3549
-- Name: proxyinfo; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE proxyinfo AS (
	serverversionstr text,
	serverversionnum integer,
	proxyapiver integer,
	serverprocessid integer
);


ALTER TYPE public.proxyinfo OWNER TO postgres;

--
-- TOC entry 1468 (class 0 OID 0)
-- Name: query_int; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE query_int;


--
-- TOC entry 66 (class 1255 OID 5296623)
-- Dependencies: 6 1468
-- Name: bqarr_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION bqarr_in(cstring) RETURNS query_int
    AS '$libdir/_int', 'bqarr_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.bqarr_in(cstring) OWNER TO postgres;

--
-- TOC entry 67 (class 1255 OID 5296624)
-- Dependencies: 6 1468
-- Name: bqarr_out(query_int); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION bqarr_out(query_int) RETURNS cstring
    AS '$libdir/_int', 'bqarr_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.bqarr_out(query_int) OWNER TO postgres;

--
-- TOC entry 1467 (class 1247 OID 5296622)
-- Dependencies: 6 66 67
-- Name: query_int; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE query_int (
    INTERNALLENGTH = variable,
    INPUT = bqarr_in,
    OUTPUT = bqarr_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.query_int OWNER TO postgres;

--
-- TOC entry 3550 (class 1259 OID 5296626)
-- Dependencies: 4130 6
-- Name: raw_image_set_params; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE raw_image_set_params (
    id integer NOT NULL,
    raw_image_set_id integer,
    min_x double precision,
    min_y double precision,
    min_z double precision,
    min_angle double precision,
    start_time_value double precision,
    start_time_unit text,
    start_time_normalized_value double precision,
    max_x double precision,
    max_y double precision,
    max_z double precision,
    max_angle double precision,
    end_time_value double precision,
    end_time_normalized_value double precision,
    imaging_product_type_id integer NOT NULL,
    end_time_unit text,
    tilt_angle_increment double precision,
    name text,
    descriptions text,
    notes text,
    psf_file_path text,
    cutting_plane text,
    frame_count integer,
    frame_interval_unit text,
    frame_interval_value double precision,
    frame_interval_normalized_value double precision,
    stimulation_interval_unit text,
    stimulation_interval_value double precision,
    stimulation_interval_normalized_value double precision,
    time_series_type text,
    z_step_unit text,
    z_step_value double precision,
    z_step_normalized_value double precision,
    z_resolution_unit text,
    z_resolution_value double precision,
    z_resolution_normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.raw_image_set_params OWNER TO postgres;

--
-- TOC entry 3551 (class 1259 OID 5296632)
-- Dependencies: 4131 6
-- Name: reagent_component_stock; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE reagent_component_stock (
    reagent_component_stock_id integer NOT NULL,
    antibody_id integer,
    nucleic_acid_id integer,
    name text,
    vendor text,
    lot_number text,
    original_concentration_unit text,
    original_concentration_value real,
    original_concentration_normalized_value real,
    catalog_number text,
    ph real,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.reagent_component_stock OWNER TO postgres;

--
-- TOC entry 3552 (class 1259 OID 5296638)
-- Dependencies: 4132 6
-- Name: reagent_components; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE reagent_components (
    reagent_component_id integer NOT NULL,
    reagent_id integer,
    reagent_component_stock_id integer,
    actual_concentration_unit text,
    actual_concentration_value real,
    actual_concentration_normalized_value real,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.reagent_components OWNER TO postgres;

--
-- TOC entry 3553 (class 1259 OID 5296644)
-- Dependencies: 4133 6
-- Name: reagents; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE reagents (
    reagent_id integer NOT NULL,
    reagent_name text,
    temperature_unit text,
    temperature_value real,
    temperature_normalized_value real,
    notes integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.reagents OWNER TO postgres;

--
-- TOC entry 3554 (class 1259 OID 5296650)
-- Dependencies: 4134 6
-- Name: resolution; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE resolution (
    resolution_unit text NOT NULL,
    scale bigint,
    deleted boolean DEFAULT false
);


ALTER TABLE public.resolution OWNER TO postgres;

--
-- TOC entry 3555 (class 1259 OID 5296656)
-- Dependencies: 4135 6
-- Name: roi; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE roi (
    roi_id integer NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.roi OWNER TO postgres;

--
-- TOC entry 3556 (class 1259 OID 5296659)
-- Dependencies: 4136 6
-- Name: roles; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE roles (
    role_id integer NOT NULL,
    title integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.roles OWNER TO postgres;

--
-- TOC entry 3648 (class 1259 OID 20086907)
-- Dependencies: 6
-- Name: sand_data_downloaders; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sand_data_downloaders (
    sand_downloader_id integer NOT NULL,
    user_email text,
    user_name text,
    user_institute text
);


ALTER TABLE public.sand_data_downloaders OWNER TO postgres;

--
-- TOC entry 3649 (class 1259 OID 20086915)
-- Dependencies: 6
-- Name: sand_downloaded_data_files; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sand_downloaded_data_files (
    sand_downloaded_data_file_id integer NOT NULL,
    sand_downloader_id integer,
    downloaded_filepath text,
    mpid integer,
    file_purpose integer,
    bytes_downloaded bigint,
    file_size bigint,
    start_time timestamp with time zone,
    end_time timestamp with time zone
);


ALTER TABLE public.sand_downloaded_data_files OWNER TO postgres;

--
-- TOC entry 3557 (class 1259 OID 5296662)
-- Dependencies: 4137 6
-- Name: scan_parameters; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE scan_parameters (
    scan_parameter_pk integer NOT NULL,
    tr double precision,
    bandwidth double precision,
    te double precision,
    flip_angle double precision,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.scan_parameters OWNER TO postgres;

--
-- TOC entry 3558 (class 1259 OID 5296668)
-- Dependencies: 4138 6
-- Name: scan_products; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE scan_products (
    scan_product_id integer NOT NULL,
    scan_parameters_scan_parameter_pk integer,
    applied_protocols_applied_protocol_id integer,
    anatomical_details_id integer,
    scan_sequence_type_id integer,
    scan_protocol_type_id integer,
    y_resolution_unit text,
    x_resolution_unit text,
    x_size integer,
    y_size integer,
    z_size integer,
    x_resolution_value double precision,
    y_resolution_value double precision,
    z_resolution_value double precision,
    scan_date date,
    image_base_name text,
    session_name text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.scan_products OWNER TO postgres;

--
-- TOC entry 3559 (class 1259 OID 5296674)
-- Dependencies: 4139 6
-- Name: scan_protocol_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE scan_protocol_type (
    scan_protocol_type_id integer NOT NULL,
    scan_protocol_name text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.scan_protocol_type OWNER TO postgres;

--
-- TOC entry 3560 (class 1259 OID 5296680)
-- Dependencies: 4140 6
-- Name: scan_sequence_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE scan_sequence_type (
    scan_sequence_type_id integer NOT NULL,
    scan_sequence_type_name text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.scan_sequence_type OWNER TO postgres;

--
-- TOC entry 3561 (class 1259 OID 5296686)
-- Dependencies: 4141 6
-- Name: scanners; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE scanners (
    scanner_id integer NOT NULL,
    scanner_name text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.scanners OWNER TO ccdbd_dev;

--
-- TOC entry 1495 (class 0 OID 0)
-- Name: seg; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE seg;


--
-- TOC entry 68 (class 1255 OID 5296693)
-- Dependencies: 6 1495
-- Name: seg_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_in(cstring) RETURNS seg
    AS '$libdir/seg', 'seg_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_in(cstring) OWNER TO postgres;

--
-- TOC entry 69 (class 1255 OID 5296694)
-- Dependencies: 6 1495
-- Name: seg_out(seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_out(seg) RETURNS cstring
    AS '$libdir/seg', 'seg_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_out(seg) OWNER TO postgres;

--
-- TOC entry 1494 (class 1247 OID 5296692)
-- Dependencies: 68 69 6
-- Name: seg; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE seg (
    INTERNALLENGTH = 12,
    INPUT = seg_in,
    OUTPUT = seg_out,
    ALIGNMENT = int4,
    STORAGE = plain
);


ALTER TYPE public.seg OWNER TO postgres;

--
-- TOC entry 5103 (class 0 OID 0)
-- Dependencies: 1494
-- Name: TYPE seg; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE seg IS 'floating point interval ''FLOAT .. FLOAT'', ''.. FLOAT'', ''FLOAT ..'' or ''FLOAT''';


--
-- TOC entry 3562 (class 1259 OID 5296696)
-- Dependencies: 4142 6
-- Name: segmentation_intent; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE segmentation_intent (
    seg_intent_id integer NOT NULL,
    intent_description text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.segmentation_intent OWNER TO postgres;

--
-- TOC entry 3563 (class 1259 OID 5296702)
-- Dependencies: 4143 6
-- Name: segmentation_transformation; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE segmentation_transformation (
    seg_transformation_id integer NOT NULL,
    output_segmentation_id integer,
    input_segmentation_id integer,
    transformation_desc text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.segmentation_transformation OWNER TO postgres;

--
-- TOC entry 3623 (class 1259 OID 5301695)
-- Dependencies: 4195 6
-- Name: segmented_flat_object; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE segmented_flat_object (
    seg_flat_object_id integer NOT NULL,
    seg_id integer,
    object_name text,
    object_type text,
    seg_desc text,
    analyze_desc text,
    is_manual text,
    object_desc text,
    volume_value double precision,
    volume_unit text,
    surface_area_value double precision,
    surface_area_unit text,
    length_value double precision,
    length_unit text,
    number_of_objects integer,
    diameter_value double precision,
    diameter_unit text,
    threshold_value double precision,
    threshold_unit text,
    deleted boolean DEFAULT false,
    labeling_intensity_value double precision,
    labeling_intensity_unit text,
    labeling_intensity_normalized_value double precision,
    labeling_rank text
);


ALTER TABLE public.segmented_flat_object OWNER TO ccdbd_dev;

--
-- TOC entry 3564 (class 1259 OID 5296708)
-- Dependencies: 4144 6
-- Name: segmented_object_types; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE segmented_object_types (
    type_id integer NOT NULL,
    type_2 text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.segmented_object_types OWNER TO postgres;

--
-- TOC entry 3662 (class 1259 OID 26605475)
-- Dependencies: 6
-- Name: slash_geometry_type; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE slash_geometry_type (
    slash_annotation_type_name text NOT NULL
);


ALTER TABLE public.slash_geometry_type OWNER TO ccdbd_dev;

--
-- TOC entry 3663 (class 1259 OID 26605484)
-- Dependencies: 6
-- Name: slash_level; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE slash_level (
    level_id integer NOT NULL,
    level_name text
);


ALTER TABLE public.slash_level OWNER TO ccdbd_dev;

--
-- TOC entry 3657 (class 1259 OID 26605400)
-- Dependencies: 6
-- Name: slash_pic; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE slash_pic (
    pic_id bigint NOT NULL,
    pic_desc text,
    fixed_url text,
    pic bytea,
    width integer,
    height integer,
    ispublic boolean,
    pic_type integer
);


ALTER TABLE public.slash_pic OWNER TO ccdbd_dev;

--
-- TOC entry 3659 (class 1259 OID 26605437)
-- Dependencies: 6
-- Name: slash_project; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE slash_project (
    sproject_id integer NOT NULL,
    creator_id integer NOT NULL,
    project_name text,
    summary text
);


ALTER TABLE public.slash_project OWNER TO ccdbd_dev;

--
-- TOC entry 3660 (class 1259 OID 26605455)
-- Dependencies: 6
-- Name: slash_software; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE slash_software (
    slash_software_id bigint NOT NULL,
    software_name text
);


ALTER TABLE public.slash_software OWNER TO ccdbd_dev;

--
-- TOC entry 3661 (class 1259 OID 26605465)
-- Dependencies: 6
-- Name: slash_srs; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE slash_srs (
    srs_name text NOT NULL
);


ALTER TABLE public.slash_srs OWNER TO ccdbd_dev;

--
-- TOC entry 3658 (class 1259 OID 26605425)
-- Dependencies: 6
-- Name: slash_user; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE slash_user (
    user_id integer NOT NULL,
    user_name text,
    first_name text,
    last_name text,
    openid text,
    created_date date,
    email text
);


ALTER TABLE public.slash_user OWNER TO ccdbd_dev;

--
-- TOC entry 3565 (class 1259 OID 5296714)
-- Dependencies: 4145 6
-- Name: smartatlas_workflow_cache; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE smartatlas_workflow_cache (
    sa_workflow_cache_id bigint NOT NULL,
    sa_session_string text NOT NULL,
    gridsphere_user text NOT NULL,
    email text NOT NULL,
    srb_input_path text NOT NULL,
    srb_ouput_dir text NOT NULL,
    create_date timestamp without time zone NOT NULL,
    verified_date timestamp without time zone,
    mpid bigint NOT NULL,
    sa_registration_id text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.smartatlas_workflow_cache OWNER TO postgres;

--
-- TOC entry 3566 (class 1259 OID 5296720)
-- Dependencies: 4146 6
-- Name: software; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE software (
    software_id integer NOT NULL,
    software_name text,
    software_version text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.software OWNER TO postgres;

--
-- TOC entry 3644 (class 1259 OID 5517911)
-- Dependencies: 6
-- Name: software_download_stat; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE software_download_stat (
    download_id bigint NOT NULL,
    download_ip text,
    filename text,
    download_time date
);


ALTER TABLE public.software_download_stat OWNER TO ccdbd_dev;

--
-- TOC entry 3567 (class 1259 OID 5296726)
-- Dependencies: 4147 6
-- Name: sp_chemical_fixation; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_chemical_fixation (
    chemical_fixation_id integer NOT NULL,
    volume_measurement_volume_unit text,
    time_unit text,
    reagent_id integer,
    fixative_agent_id integer,
    vehicle_reagent_id integer,
    fixation_method text,
    notes text,
    temperature_unit text,
    temperature_value double precision,
    temperature_normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_chemical_fixation OWNER TO postgres;

--
-- TOC entry 3568 (class 1259 OID 5296732)
-- Dependencies: 4148 6
-- Name: sp_dehydration; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_dehydration (
    dehydration_id integer NOT NULL,
    fixation_reagent_id integer,
    temperature double precision,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_dehydration OWNER TO postgres;

--
-- TOC entry 3569 (class 1259 OID 5296738)
-- Dependencies: 4149 6
-- Name: sp_detection_method; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_detection_method (
    detection_method_id integer NOT NULL,
    reagent_id integer,
    molecular_localization_id integer,
    molecular_type text,
    entrez_id text,
    notes text,
    deleted boolean DEFAULT false,
    chromagen integer
);


ALTER TABLE public.sp_detection_method OWNER TO postgres;

--
-- TOC entry 3570 (class 1259 OID 5296744)
-- Dependencies: 4150 6
-- Name: sp_embeddings; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_embeddings (
    embedding_id integer NOT NULL,
    embedding_reagent_id integer,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_embeddings OWNER TO postgres;

--
-- TOC entry 3571 (class 1259 OID 5296750)
-- Dependencies: 4151 6
-- Name: sp_freezing_fixation; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_freezing_fixation (
    freezing_fixation_id integer NOT NULL,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_freezing_fixation OWNER TO postgres;

--
-- TOC entry 3572 (class 1259 OID 5296756)
-- Dependencies: 4152 6
-- Name: sp_microtomy; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_microtomy (
    microtomy_id integer NOT NULL,
    thickness_unit text,
    thickness_value double precision,
    reagent_id integer,
    anatomical_location text,
    tissue_prod_storage text,
    orientation text,
    microtome_id text,
    embedding_agent integer,
    notes text,
    thickness_normalized_value double precision,
    temperature_unit text,
    temperature_value double precision,
    temperature_normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_microtomy OWNER TO postgres;

--
-- TOC entry 3573 (class 1259 OID 5296762)
-- Dependencies: 4153 6
-- Name: sp_molecular_localization; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_molecular_localization (
    molecular_localization_id integer NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_molecular_localization OWNER TO postgres;

--
-- TOC entry 3574 (class 1259 OID 5296765)
-- Dependencies: 4154 6
-- Name: sp_molecular_target; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_molecular_target (
    molecular_target_id integer NOT NULL,
    molecular_localization_id integer,
    notes integer,
    deleted boolean DEFAULT false,
    protein_instance integer
);


ALTER TABLE public.sp_molecular_target OWNER TO postgres;

--
-- TOC entry 3575 (class 1259 OID 5296771)
-- Dependencies: 4155 6
-- Name: sp_probe; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_probe (
    probe_id integer NOT NULL,
    reagent_component_id integer,
    molecular_localization_id integer,
    probe_ref_id text,
    controls text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_probe OWNER TO postgres;

--
-- TOC entry 3576 (class 1259 OID 5296777)
-- Dependencies: 4156 6
-- Name: sp_protocol_steps; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_protocol_steps (
    step_id integer NOT NULL,
    dehydration_id integer,
    stain_id integer,
    embedding_id integer,
    freezing_fixation_id integer,
    microtomy_id integer,
    chemical_fixation_id integer,
    molecular_localization_id integer,
    notes text,
    step_order integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_protocol_steps OWNER TO postgres;

--
-- TOC entry 3577 (class 1259 OID 5296783)
-- Dependencies: 4157 6
-- Name: sp_protocols; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_protocols (
    protocol_id integer NOT NULL,
    person_id integer,
    protocol_name text,
    approval_status integer,
    protocol_in_text text,
    notes text,
    other_type boolean,
    filled_cell_type boolean,
    protein_localization_type boolean,
    correlated_lm_em_type boolean,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_protocols OWNER TO postgres;

--
-- TOC entry 3578 (class 1259 OID 5296789)
-- Dependencies: 4158 6
-- Name: sp_stain; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE sp_stain (
    stain_id integer NOT NULL,
    person_id integer,
    reagent_id integer,
    stain_reagent_id integer,
    notes text,
    temperature_unit text,
    temperature_value double precision,
    temperature_normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.sp_stain OWNER TO postgres;

--
-- TOC entry 3579 (class 1259 OID 5296795)
-- Dependencies: 4159 6
-- Name: spatial_ref_sys; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE spatial_ref_sys (
    srid integer NOT NULL,
    auth_name character varying(256),
    auth_srid integer,
    srtext character varying(2048),
    proj4text character varying(2048),
    deleted boolean DEFAULT false
);


ALTER TABLE public.spatial_ref_sys OWNER TO postgres;

--
-- TOC entry 3580 (class 1259 OID 5296801)
-- Dependencies: 3763 6
-- Name: species_strain_animal_view; Type: VIEW; Schema: public; Owner: ccdbd_dev
--

CREATE VIEW species_strain_animal_view AS
    SELECT sp.species_id, sp.species_name, st.strain_id, st.strain_name, st.strain_desc, st.reference_url, apj.animal_junction_pool_id, a.animal_id, a.age_class, a.gender, a.weight_value, a.weight_unit, a.age_value, a.age_unit, a.notes, ps.tissue_slice_id, ps.cellular_fraction_id, ps.intact_animal_id, ps.cultured_cell_id FROM species sp, strain st, animal a, animal_set aset, animal_pool_junction apj, subject ps WHERE (((((sp.species_id = st.species_id) AND (a.strain_id = st.strain_id)) AND (a.animal_id = aset.animal_id)) AND (apj.animal_junction_pool_id = aset.animal_pool_junction_id)) AND (apj.animal_junction_pool_id = ps.animal_pool_junction_id));


ALTER TABLE public.species_strain_animal_view OWNER TO ccdbd_dev;

--
-- TOC entry 3582 (class 1259 OID 5296811)
-- Dependencies: 4161 6
-- Name: specimen_anatomical_junction; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE specimen_anatomical_junction (
    specimen_anatomical_junction_id integer NOT NULL,
    specimen_id integer,
    region_inst_id text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.specimen_anatomical_junction OWNER TO ccdbd_dev;

--
-- TOC entry 3583 (class 1259 OID 5296820)
-- Dependencies: 4162 6
-- Name: steps_in_protocol; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE steps_in_protocol (
    step_in_protocol_id integer NOT NULL,
    step_id integer,
    protocol_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.steps_in_protocol OWNER TO postgres;

--
-- TOC entry 3641 (class 1259 OID 5417439)
-- Dependencies: 4204 6
-- Name: surface_component; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE surface_component (
    surface_id integer NOT NULL,
    seg_id integer,
    gid integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.surface_component OWNER TO postgres;

--
-- TOC entry 1547 (class 1247 OID 5296843)
-- Dependencies: 6 3587
-- Name: tablefunc_crosstab_2; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE tablefunc_crosstab_2 AS (
	row_name text,
	category_1 text,
	category_2 text
);


ALTER TYPE public.tablefunc_crosstab_2 OWNER TO postgres;

--
-- TOC entry 1549 (class 1247 OID 5296846)
-- Dependencies: 6 3588
-- Name: tablefunc_crosstab_3; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE tablefunc_crosstab_3 AS (
	row_name text,
	category_1 text,
	category_2 text,
	category_3 text
);


ALTER TYPE public.tablefunc_crosstab_3 OWNER TO postgres;

--
-- TOC entry 1551 (class 1247 OID 5296849)
-- Dependencies: 6 3589
-- Name: tablefunc_crosstab_4; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE tablefunc_crosstab_4 AS (
	row_name text,
	category_1 text,
	category_2 text,
	category_3 text,
	category_4 text
);


ALTER TYPE public.tablefunc_crosstab_4 OWNER TO postgres;

--
-- TOC entry 3590 (class 1259 OID 5296850)
-- Dependencies: 6
-- Name: general_sequence; Type: SEQUENCE; Schema: public; Owner: ccdbd_dev
--

CREATE SEQUENCE general_sequence
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.general_sequence OWNER TO ccdbd_dev;

--
-- TOC entry 3591 (class 1259 OID 5296852)
-- Dependencies: 4166 4167 6
-- Name: tag; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE tag (
    tag_id bigint DEFAULT nextval('general_sequence'::regclass) NOT NULL,
    tag_category_id integer,
    tag_name text,
    onto_url text,
    notes text,
    portal_screenname text,
    modified_time timestamp without time zone,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tag OWNER TO ccdbd_dev;

--
-- TOC entry 3592 (class 1259 OID 5296859)
-- Dependencies: 4168 6
-- Name: tag_category; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE tag_category (
    tag_category_id integer NOT NULL,
    tag_category_name text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tag_category OWNER TO ccdbd_dev;

--
-- TOC entry 3593 (class 1259 OID 5296865)
-- Dependencies: 4169 4170 6
-- Name: tagged_mp_file; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE tagged_mp_file (
    tagged_mp_id bigint DEFAULT nextval('general_sequence'::regclass) NOT NULL,
    mpid integer,
    tag_id bigint,
    portal_screenname text,
    ccdb_file_id bigint,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tagged_mp_file OWNER TO ccdbd_dev;

--
-- TOC entry 1560 (class 1247 OID 5296874)
-- Dependencies: 6 3594
-- Name: targetinfo; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE targetinfo AS (
	target oid,
	schema oid,
	nargs integer,
	argtypes oidvector,
	targetname name,
	argmodes "char"[],
	argnames text[],
	targetlang oid,
	fqname text,
	returnsset boolean,
	returntype oid
);


ALTER TYPE public.targetinfo OWNER TO postgres;

--
-- TOC entry 3638 (class 1259 OID 5417391)
-- Dependencies: 4202 6
-- Name: temp_channel_mappings; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE temp_channel_mappings (
    temp_channel_mapping_id integer NOT NULL,
    acquisition_channel_id integer,
    molecular_localization_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.temp_channel_mappings OWNER TO postgres;

--
-- TOC entry 3595 (class 1259 OID 5296875)
-- Dependencies: 4171 6
-- Name: temp_uploaded_images; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE temp_uploaded_images (
    id integer NOT NULL,
    session_id text NOT NULL,
    display_file bytea,
    thumbnail_file bytea,
    deleted boolean DEFAULT false
);


ALTER TABLE public.temp_uploaded_images OWNER TO ccdbd_dev;

--
-- TOC entry 3596 (class 1259 OID 5296881)
-- Dependencies: 4172 6
-- Name: temperature; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE temperature (
    temperature_unit text NOT NULL,
    normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.temperature OWNER TO ccdbd_dev;

--
-- TOC entry 3597 (class 1259 OID 5296887)
-- Dependencies: 4173 6
-- Name: thickness; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE thickness (
    thickness_unit text NOT NULL,
    normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.thickness OWNER TO postgres;

--
-- TOC entry 3598 (class 1259 OID 5296893)
-- Dependencies: 4174 6
-- Name: time; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE "time" (
    time_unit text NOT NULL,
    normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public."time" OWNER TO postgres;

--
-- TOC entry 3600 (class 1259 OID 5296905)
-- Dependencies: 4176 6
-- Name: tissue_section_transformation; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE tissue_section_transformation (
    tissue_transformation_id integer NOT NULL,
    tissue_slice_output integer,
    tissue_slice_input integer,
    tissue_transformation_desc text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tissue_section_transformation OWNER TO postgres;

--
-- TOC entry 3602 (class 1259 OID 5296917)
-- Dependencies: 4178 6
-- Name: tissues; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE tissues (
    tissue_id integer NOT NULL,
    tissue_name text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tissues OWNER TO ccdbd_dev;

--
-- TOC entry 3603 (class 1259 OID 5296923)
-- Dependencies: 4179 6
-- Name: transmitted_images; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE transmitted_images (
    transmitted_images_id integer NOT NULL,
    channel_id integer,
    transmitted_type text,
    light_source text,
    notes text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.transmitted_images OWNER TO postgres;

--
-- TOC entry 3604 (class 1259 OID 5296929)
-- Dependencies: 4180 6
-- Name: treatments; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE treatments (
    treatment_id integer NOT NULL,
    protocol_id integer,
    treatment_name text,
    treatment_desc text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.treatments OWNER TO postgres;

--
-- TOC entry 3605 (class 1259 OID 5296935)
-- Dependencies: 4181 6
-- Name: tree_components; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE tree_components (
    tree_id integer NOT NULL,
    seg_id integer,
    start_node_id integer,
    connecting_segment_id integer,
    end_node_id integer,
    branch_order integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tree_components OWNER TO postgres;

--
-- TOC entry 3606 (class 1259 OID 5296938)
-- Dependencies: 4182 6
-- Name: tree_nodes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE tree_nodes (
    tree_node_id integer NOT NULL,
    tree_id integer,
    ontology_name integer,
    ontology_id text,
    path text,
    length_measurement integer,
    radius double precision,
    spinecount integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tree_nodes OWNER TO postgres;

--
-- TOC entry 3607 (class 1259 OID 5296944)
-- Dependencies: 4183 6
-- Name: tree_segments; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE tree_segments (
    tree_segment_id integer NOT NULL,
    tree_id integer,
    ontology_name integer,
    ontology_id text,
    radius double precision,
    length_unit text,
    length_value double precision,
    length_normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.tree_segments OWNER TO postgres;

--
-- TOC entry 1593 (class 0 OID 0)
-- Name: upc; Type: SHELL TYPE; Schema: public; Owner: postgres
--

CREATE TYPE upc;


--
-- TOC entry 70 (class 1255 OID 5296951)
-- Dependencies: 6 1593
-- Name: isn_out(upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isn_out(upc) RETURNS cstring
    AS '$libdir/isn', 'isn_out'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isn_out(upc) OWNER TO postgres;

--
-- TOC entry 71 (class 1255 OID 5296952)
-- Dependencies: 6 1593
-- Name: upc_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION upc_in(cstring) RETURNS upc
    AS '$libdir/isn', 'upc_in'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.upc_in(cstring) OWNER TO postgres;

--
-- TOC entry 1592 (class 1247 OID 5296950)
-- Dependencies: 71 6 70
-- Name: upc; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE upc (
    INTERNALLENGTH = 8,
    INPUT = upc_in,
    OUTPUT = public.isn_out,
    ALIGNMENT = double,
    STORAGE = plain
);


ALTER TYPE public.upc OWNER TO postgres;

--
-- TOC entry 5137 (class 0 OID 0)
-- Dependencies: 1592
-- Name: TYPE upc; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TYPE upc IS 'Universal Product Code (UPC)';


--
-- TOC entry 1595 (class 1247 OID 5296956)
-- Dependencies: 6 3608
-- Name: var; Type: TYPE; Schema: public; Owner: postgres
--

CREATE TYPE var AS (
	name text,
	varclass character(1),
	linenumber integer,
	isunique boolean,
	isconst boolean,
	isnotnull boolean,
	dtype oid,
	value text
);


ALTER TYPE public.var OWNER TO postgres;

--
-- TOC entry 3609 (class 1259 OID 5296957)
-- Dependencies: 4184 6
-- Name: voltages; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE voltages (
    voltage_unit text NOT NULL,
    normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.voltages OWNER TO postgres;

--
-- TOC entry 3642 (class 1259 OID 5417444)
-- Dependencies: 4205 6
-- Name: volume_component; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE volume_component (
    volume_id integer NOT NULL,
    seg_id integer,
    gid integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.volume_component OWNER TO postgres;

--
-- TOC entry 3610 (class 1259 OID 5296963)
-- Dependencies: 4185 6
-- Name: volume_measurement; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE volume_measurement (
    volume_unit text NOT NULL,
    normalized_value double precision,
    deleted boolean DEFAULT false
);


ALTER TABLE public.volume_measurement OWNER TO postgres;

--
-- TOC entry 3639 (class 1259 OID 5417416)
-- Dependencies: 4203 6
-- Name: w_trigger_project_keywords; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE w_trigger_project_keywords (
    pid bigint,
    tablename text,
    keywords text,
    actual_pk integer,
    columnname text,
    mid integer,
    security_level integer,
    text_search_words tsvector,
    w_trigger_project_keywords_id bigint NOT NULL,
    deleted boolean DEFAULT false
);


ALTER TABLE public.w_trigger_project_keywords OWNER TO postgres;

--
-- TOC entry 3611 (class 1259 OID 5296969)
-- Dependencies: 4186 6
-- Name: web_simplified_product; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE web_simplified_product (
    web_simplified_product_id integer NOT NULL,
    lmproduct_id integer,
    applied_protocols_applied_protocol_id integer,
    segmentation_sets_segmentation_set_id integer,
    recon_id integer,
    emproduct_id integer,
    raw_image_sets_raw_image_set_id integer,
    anatomical_details_id integer,
    publication_set_publication_set_id integer,
    microscopy_products_mpid integer,
    experiment_experiment_id integer,
    project_id integer,
    deleted boolean DEFAULT false
);


ALTER TABLE public.web_simplified_product OWNER TO postgres;

--
-- TOC entry 3612 (class 1259 OID 5296972)
-- Dependencies: 4187 6
-- Name: weight; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE weight (
    weight_unit text NOT NULL,
    scale bigint,
    deleted boolean DEFAULT false
);


ALTER TABLE public.weight OWNER TO postgres;

--
-- TOC entry 3613 (class 1259 OID 5296978)
-- Dependencies: 4188 6
-- Name: xml_file; Type: TABLE; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

CREATE TABLE xml_file (
    xml_file_id bigint NOT NULL,
    xml_content text,
    modified_time timestamp without time zone,
    portal_screenname text,
    rdf_xml_content text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.xml_file OWNER TO ccdbd_dev;

--
-- TOC entry 3614 (class 1259 OID 5296984)
-- Dependencies: 4189 6
-- Name: xml_parsers; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE xml_parsers (
    parser_id integer NOT NULL,
    parser_name text,
    parser_version text,
    parser_utility text,
    deleted boolean DEFAULT false
);


ALTER TABLE public.xml_parsers OWNER TO postgres;

--
-- TOC entry 72 (class 1255 OID 5296990)
-- Dependencies: 1249 6
-- Name: cube_dim(cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_dim(cube) RETURNS integer
    AS '$libdir/cube', 'cube_dim'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_dim(cube) OWNER TO postgres;

--
-- TOC entry 73 (class 1255 OID 5296991)
-- Dependencies: 1249 6 1249
-- Name: cube_distance(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_distance(cube, cube) RETURNS double precision
    AS '$libdir/cube', 'cube_distance'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_distance(cube, cube) OWNER TO postgres;

--
-- TOC entry 74 (class 1255 OID 5296992)
-- Dependencies: 1249 6
-- Name: cube_is_point(cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_is_point(cube) RETURNS boolean
    AS '$libdir/cube', 'cube_is_point'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_is_point(cube) OWNER TO postgres;

--
-- TOC entry 75 (class 1255 OID 5296993)
-- Dependencies: 6
-- Name: earth(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION earth() RETURNS double precision
    AS $$SELECT '6378168'::float8$$
    LANGUAGE sql IMMUTABLE;


ALTER FUNCTION public.earth() OWNER TO postgres;

--
-- TOC entry 1588 (class 1247 OID 5296994)
-- Dependencies: 1589 1590 1591 6 1249 23
-- Name: earth; Type: DOMAIN; Schema: public; Owner: postgres
--

CREATE DOMAIN earth AS cube
	CONSTRAINT not_3d CHECK ((cube_dim(VALUE) <= 3))
	CONSTRAINT not_point CHECK (cube_is_point(VALUE))
	CONSTRAINT on_surface CHECK ((abs(((cube_distance(VALUE, '(0)'::cube) / earth()) - (1)::double precision)) < (0.00000099999999999999995)::double precision));


ALTER DOMAIN public.earth OWNER TO postgres;

--
-- TOC entry 1609 (class 1247 OID 5296998)
-- Dependencies: 6
-- Name: lo; Type: DOMAIN; Schema: public; Owner: postgres
--

CREATE DOMAIN lo AS oid;


ALTER DOMAIN public.lo OWNER TO postgres;

--
-- TOC entry 76 (class 1255 OID 5296999)
-- Dependencies: 6
-- Name: _int_contained(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _int_contained(integer[], integer[]) RETURNS boolean
    AS '$libdir/_int', '_int_contained'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._int_contained(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 5145 (class 0 OID 0)
-- Dependencies: 76
-- Name: FUNCTION _int_contained(integer[], integer[]); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION _int_contained(integer[], integer[]) IS 'contained in';


--
-- TOC entry 77 (class 1255 OID 5297000)
-- Dependencies: 6
-- Name: _int_contains(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _int_contains(integer[], integer[]) RETURNS boolean
    AS '$libdir/_int', '_int_contains'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._int_contains(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 5146 (class 0 OID 0)
-- Dependencies: 77
-- Name: FUNCTION _int_contains(integer[], integer[]); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION _int_contains(integer[], integer[]) IS 'contains';


--
-- TOC entry 78 (class 1255 OID 5297001)
-- Dependencies: 6
-- Name: _int_different(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _int_different(integer[], integer[]) RETURNS boolean
    AS '$libdir/_int', '_int_different'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._int_different(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 5147 (class 0 OID 0)
-- Dependencies: 78
-- Name: FUNCTION _int_different(integer[], integer[]); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION _int_different(integer[], integer[]) IS 'different';


--
-- TOC entry 79 (class 1255 OID 5297002)
-- Dependencies: 6
-- Name: _int_inter(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _int_inter(integer[], integer[]) RETURNS integer[]
    AS '$libdir/_int', '_int_inter'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._int_inter(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 80 (class 1255 OID 5297003)
-- Dependencies: 6
-- Name: _int_overlap(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _int_overlap(integer[], integer[]) RETURNS boolean
    AS '$libdir/_int', '_int_overlap'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._int_overlap(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 5148 (class 0 OID 0)
-- Dependencies: 80
-- Name: FUNCTION _int_overlap(integer[], integer[]); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION _int_overlap(integer[], integer[]) IS 'overlaps';


--
-- TOC entry 81 (class 1255 OID 5297004)
-- Dependencies: 6
-- Name: _int_same(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _int_same(integer[], integer[]) RETURNS boolean
    AS '$libdir/_int', '_int_same'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._int_same(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 5149 (class 0 OID 0)
-- Dependencies: 81
-- Name: FUNCTION _int_same(integer[], integer[]); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION _int_same(integer[], integer[]) IS 'same as';


--
-- TOC entry 82 (class 1255 OID 5297005)
-- Dependencies: 6
-- Name: _int_union(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _int_union(integer[], integer[]) RETURNS integer[]
    AS '$libdir/_int', '_int_union'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._int_union(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 83 (class 1255 OID 5297006)
-- Dependencies: 1412 1409 6
-- Name: _lt_q_regex(ltree[], lquery[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _lt_q_regex(ltree[], lquery[]) RETURNS boolean
    AS '$libdir/ltree', '_lt_q_regex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._lt_q_regex(ltree[], lquery[]) OWNER TO postgres;

--
-- TOC entry 84 (class 1255 OID 5297007)
-- Dependencies: 1409 1412 6
-- Name: _lt_q_rregex(lquery[], ltree[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _lt_q_rregex(lquery[], ltree[]) RETURNS boolean
    AS '$libdir/ltree', '_lt_q_rregex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._lt_q_rregex(lquery[], ltree[]) OWNER TO postgres;

--
-- TOC entry 85 (class 1255 OID 5297008)
-- Dependencies: 1412 1410 6 1407
-- Name: _ltq_extract_regex(ltree[], lquery); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltq_extract_regex(ltree[], lquery) RETURNS ltree
    AS '$libdir/ltree', '_ltq_extract_regex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltq_extract_regex(ltree[], lquery) OWNER TO postgres;

--
-- TOC entry 86 (class 1255 OID 5297009)
-- Dependencies: 6 1407 1412
-- Name: _ltq_regex(ltree[], lquery); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltq_regex(ltree[], lquery) RETURNS boolean
    AS '$libdir/ltree', '_ltq_regex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltq_regex(ltree[], lquery) OWNER TO postgres;

--
-- TOC entry 87 (class 1255 OID 5297010)
-- Dependencies: 1412 1407 6
-- Name: _ltq_rregex(lquery, ltree[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltq_rregex(lquery, ltree[]) RETURNS boolean
    AS '$libdir/ltree', '_ltq_rregex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltq_rregex(lquery, ltree[]) OWNER TO postgres;

--
-- TOC entry 88 (class 1255 OID 5297011)
-- Dependencies: 6
-- Name: _ltree_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_compress(internal) RETURNS internal
    AS '$libdir/ltree', '_ltree_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public._ltree_compress(internal) OWNER TO postgres;

--
-- TOC entry 89 (class 1255 OID 5297012)
-- Dependencies: 6
-- Name: _ltree_consistent(internal, internal, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_consistent(internal, internal, smallint) RETURNS boolean
    AS '$libdir/ltree', '_ltree_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public._ltree_consistent(internal, internal, smallint) OWNER TO postgres;

--
-- TOC entry 90 (class 1255 OID 5297013)
-- Dependencies: 6 1410 1412 1410
-- Name: _ltree_extract_isparent(ltree[], ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_extract_isparent(ltree[], ltree) RETURNS ltree
    AS '$libdir/ltree', '_ltree_extract_isparent'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltree_extract_isparent(ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 91 (class 1255 OID 5297014)
-- Dependencies: 1412 1410 6 1410
-- Name: _ltree_extract_risparent(ltree[], ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_extract_risparent(ltree[], ltree) RETURNS ltree
    AS '$libdir/ltree', '_ltree_extract_risparent'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltree_extract_risparent(ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 92 (class 1255 OID 5297015)
-- Dependencies: 1410 6 1412
-- Name: _ltree_isparent(ltree[], ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_isparent(ltree[], ltree) RETURNS boolean
    AS '$libdir/ltree', '_ltree_isparent'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltree_isparent(ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 93 (class 1255 OID 5297016)
-- Dependencies: 6
-- Name: _ltree_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/ltree', '_ltree_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltree_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 94 (class 1255 OID 5297017)
-- Dependencies: 6
-- Name: _ltree_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_picksplit(internal, internal) RETURNS internal
    AS '$libdir/ltree', '_ltree_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public._ltree_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 95 (class 1255 OID 5297018)
-- Dependencies: 1412 6 1410
-- Name: _ltree_r_isparent(ltree, ltree[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_r_isparent(ltree, ltree[]) RETURNS boolean
    AS '$libdir/ltree', '_ltree_r_isparent'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltree_r_isparent(ltree, ltree[]) OWNER TO postgres;

--
-- TOC entry 96 (class 1255 OID 5297019)
-- Dependencies: 6 1410 1412
-- Name: _ltree_r_risparent(ltree, ltree[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_r_risparent(ltree, ltree[]) RETURNS boolean
    AS '$libdir/ltree', '_ltree_r_risparent'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltree_r_risparent(ltree, ltree[]) OWNER TO postgres;

--
-- TOC entry 97 (class 1255 OID 5297020)
-- Dependencies: 6 1410 1412
-- Name: _ltree_risparent(ltree[], ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_risparent(ltree[], ltree) RETURNS boolean
    AS '$libdir/ltree', '_ltree_risparent'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltree_risparent(ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 98 (class 1255 OID 5297021)
-- Dependencies: 6
-- Name: _ltree_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_same(internal, internal, internal) RETURNS internal
    AS '$libdir/ltree', '_ltree_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public._ltree_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 99 (class 1255 OID 5297022)
-- Dependencies: 6
-- Name: _ltree_union(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltree_union(internal, internal) RETURNS integer
    AS '$libdir/ltree', '_ltree_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public._ltree_union(internal, internal) OWNER TO postgres;

--
-- TOC entry 100 (class 1255 OID 5297023)
-- Dependencies: 1416 1412 6
-- Name: _ltxtq_exec(ltree[], ltxtquery); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltxtq_exec(ltree[], ltxtquery) RETURNS boolean
    AS '$libdir/ltree', '_ltxtq_exec'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltxtq_exec(ltree[], ltxtquery) OWNER TO postgres;

--
-- TOC entry 101 (class 1255 OID 5297024)
-- Dependencies: 1410 1416 6 1412
-- Name: _ltxtq_extract_exec(ltree[], ltxtquery); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltxtq_extract_exec(ltree[], ltxtquery) RETURNS ltree
    AS '$libdir/ltree', '_ltxtq_extract_exec'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltxtq_extract_exec(ltree[], ltxtquery) OWNER TO postgres;

--
-- TOC entry 102 (class 1255 OID 5297025)
-- Dependencies: 1412 1416 6
-- Name: _ltxtq_rexec(ltxtquery, ltree[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION _ltxtq_rexec(ltxtquery, ltree[]) RETURNS boolean
    AS '$libdir/ltree', '_ltxtq_rexec'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public._ltxtq_rexec(ltxtquery, ltree[]) OWNER TO postgres;

--
-- TOC entry 103 (class 1255 OID 5297036)
-- Dependencies: 1860 6
-- Name: addauth(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION addauth(text) RETURNS boolean
    AS $_$
DECLARE
	lockid alias for $1;
	okay boolean;
	myrec record;
BEGIN
	-- check to see if table exists
	--  if not, CREATE TEMP TABLE mylock (transid xid, lockcode text)
	okay := 'f';
	FOR myrec IN SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table' LOOP
		okay := 't';
	END LOOP; 
	IF (okay <> 't') THEN 
		CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text);
			-- this will only work from pgsql7.4 up
			-- ON COMMIT DELETE ROWS;
	END IF;

	--  INSERT INTO mylock VALUES ( $1)
--	EXECUTE 'INSERT INTO temp_lock_have_table VALUES ( '||
--		quote_literal(getTransactionID()) || ',' ||
--		quote_literal(lockid) ||')';

	INSERT INTO temp_lock_have_table VALUES (getTransactionID(), lockid);

	RETURN true::boolean;
END;
$_$
    LANGUAGE plpgsql;


ALTER FUNCTION public.addauth(text) OWNER TO postgres;

--
-- TOC entry 104 (class 1255 OID 5297038)
-- Dependencies: 6 1860
-- Name: addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) RETURNS text
    AS $_$
DECLARE
	catalog_name alias for $1;
	schema_name alias for $2;
	table_name alias for $3;
	column_name alias for $4;
	new_srid alias for $5;
	new_type alias for $6;
	new_dim alias for $7;
	sr varchar;

	rec RECORD;
	schema_ok bool;
	real_schema name;


BEGIN

	IF ( not ( (new_type ='GEOMETRY') or
		   (new_type ='GEOMETRYCOLLECTION') or
		   (new_type ='POINT') or 
		   (new_type ='MULTIPOINT') or
		   (new_type ='POLYGON') or
		   (new_type ='MULTIPOLYGON') or
		   (new_type ='LINESTRING') or
		   (new_type ='MULTILINESTRING') or
		   (new_type ='GEOMETRYCOLLECTIONM') or
		   (new_type ='POINTM') or 
		   (new_type ='MULTIPOINTM') or
		   (new_type ='POLYGONM') or
		   (new_type ='MULTIPOLYGONM') or
		   (new_type ='LINESTRINGM') or
		   (new_type ='MULTILINESTRINGM') or
                   (new_type = 'CIRCULARSTRING') or
                   (new_type = 'CIRCULARSTRINGM') or
                   (new_type = 'COMPOUNDCURVE') or
                   (new_type = 'COMPOUNDCURVEM') or
                   (new_type = 'CURVEPOLYGON') or
                   (new_type = 'CURVEPOLYGONM') or
                   (new_type = 'MULTICURVE') or
                   (new_type = 'MULTICURVEM') or
                   (new_type = 'MULTISURFACE') or
                   (new_type = 'MULTISURFACEM')) )
	THEN
		RAISE EXCEPTION 'Invalid type name - valid ones are: 
			GEOMETRY, GEOMETRYCOLLECTION, POINT, 
			MULTIPOINT, POLYGON, MULTIPOLYGON, 
			LINESTRING, MULTILINESTRING,
                        CIRCULARSTRING, COMPOUNDCURVE,
                        CURVEPOLYGON, MULTICURVE, MULTISURFACE,
			GEOMETRYCOLLECTIONM, POINTM, 
			MULTIPOINTM, POLYGONM, MULTIPOLYGONM, 
			LINESTRINGM, MULTILINESTRINGM 
                        CIRCULARSTRINGM, COMPOUNDCURVEM,
                        CURVEPOLYGONM, MULTICURVEM or MULTISURFACEM';
		return 'fail';
	END IF;

	IF ( (new_dim >4) or (new_dim <0) ) THEN
		RAISE EXCEPTION 'invalid dimension';
		return 'fail';
	END IF;

	IF ( (new_type LIKE '%M') and (new_dim!=3) ) THEN

		RAISE EXCEPTION 'TypeM needs 3 dimensions';
		return 'fail';
	END IF;


	IF ( schema_name != '' ) THEN
		schema_ok = 'f';
		FOR rec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP
			schema_ok := 't';
		END LOOP;

		if ( schema_ok <> 't' ) THEN
			RAISE EXCEPTION 'Invalid schema name';
		ELSE
			real_schema = schema_name;
		END IF;

	ELSE
		SELECT current_schema() into real_schema;
	END IF;


	IF ( new_srid != -1 ) THEN
		SELECT SRID INTO sr FROM SPATIAL_REF_SYS WHERE SRID = new_srid;
		IF NOT FOUND THEN
			RAISE EXCEPTION 'AddGeometryColumns() - invalid SRID';
		END IF;
	END IF;


	-- Add geometry column

	EXECUTE 'ALTER TABLE ' ||

		quote_ident(real_schema) || '.' || quote_ident(table_name)



		|| ' ADD COLUMN ' || quote_ident(column_name) || 
		' geometry ';


	-- Delete stale record in geometry_column (if any)

	EXECUTE 'DELETE FROM geometry_columns WHERE
		f_table_catalog = ' || quote_literal('') || 
		' AND f_table_schema = ' ||

		quote_literal(real_schema) || 



		' AND f_table_name = ' || quote_literal(table_name) ||
		' AND f_geometry_column = ' || quote_literal(column_name);


	-- Add record in geometry_column 

	EXECUTE 'INSERT INTO geometry_columns VALUES (' ||
		quote_literal('') || ',' ||

		quote_literal(real_schema) || ',' ||



		quote_literal(table_name) || ',' ||
		quote_literal(column_name) || ',' ||
		new_dim::text || ',' || new_srid::text || ',' ||
		quote_literal(new_type) || ')';

	-- Add table checks

	EXECUTE 'ALTER TABLE ' || 

		quote_ident(real_schema) || '.' || quote_ident(table_name)



		|| ' ADD CONSTRAINT ' 
		|| quote_ident('enforce_srid_' || column_name)
		|| ' CHECK (SRID(' || quote_ident(column_name) ||
		') = ' || new_srid::text || ')' ;

	EXECUTE 'ALTER TABLE ' || 

		quote_ident(real_schema) || '.' || quote_ident(table_name)



		|| ' ADD CONSTRAINT '
		|| quote_ident('enforce_dims_' || column_name)
		|| ' CHECK (ndims(' || quote_ident(column_name) ||
		') = ' || new_dim::text || ')' ;

	IF (not(new_type = 'GEOMETRY')) THEN
		EXECUTE 'ALTER TABLE ' || 

		quote_ident(real_schema) || '.' || quote_ident(table_name)



		|| ' ADD CONSTRAINT '
		|| quote_ident('enforce_geotype_' || column_name)
		|| ' CHECK (geometrytype(' ||
		quote_ident(column_name) || ')=' ||
		quote_literal(new_type) || ' OR (' ||
		quote_ident(column_name) || ') is null)';
	END IF;

	return 

		real_schema || '.' || 

		table_name || '.' || column_name ||
		' SRID:' || new_srid::text ||
		' TYPE:' || new_type || 
		' DIMS:' || new_dim::text || chr(10) || ' '; 
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) OWNER TO postgres;

--
-- TOC entry 105 (class 1255 OID 5297039)
-- Dependencies: 6 1860
-- Name: addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) RETURNS text
    AS $_$
DECLARE
	ret  text;
BEGIN
	SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6) into ret;
	RETURN ret;
END;
$_$
    LANGUAGE plpgsql STABLE STRICT;


ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) OWNER TO postgres;

--
-- TOC entry 106 (class 1255 OID 5297040)
-- Dependencies: 1860 6
-- Name: addgeometrycolumn(character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION addgeometrycolumn(character varying, character varying, integer, character varying, integer) RETURNS text
    AS $_$
DECLARE
	ret  text;
BEGIN
	SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5) into ret;
	RETURN ret;
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, integer, character varying, integer) OWNER TO postgres;

--
-- TOC entry 107 (class 1255 OID 5297044)
-- Dependencies: 1348 6
-- Name: akeys(hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION akeys(hstore) RETURNS text[]
    AS '$libdir/hstore', 'akeys'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.akeys(hstore) OWNER TO postgres;

--
-- TOC entry 108 (class 1255 OID 5297047)
-- Dependencies: 6
-- Name: armor(bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION armor(bytea) RETURNS text
    AS '$libdir/pgcrypto', 'pg_armor'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.armor(bytea) OWNER TO postgres;

--
-- TOC entry 109 (class 1255 OID 5297059)
-- Dependencies: 6
-- Name: autoinc(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION autoinc() RETURNS trigger
    AS '$libdir/autoinc', 'autoinc'
    LANGUAGE c;


ALTER FUNCTION public.autoinc() OWNER TO postgres;

--
-- TOC entry 110 (class 1255 OID 5297060)
-- Dependencies: 1348 6
-- Name: avals(hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION avals(hstore) RETURNS text[]
    AS '$libdir/hstore', 'avals'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.avals(hstore) OWNER TO postgres;

--
-- TOC entry 111 (class 1255 OID 5297064)
-- Dependencies: 6 1467
-- Name: boolop(integer[], query_int); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION boolop(integer[], query_int) RETURNS boolean
    AS '$libdir/_int', 'boolop'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.boolop(integer[], query_int) OWNER TO postgres;

--
-- TOC entry 5150 (class 0 OID 0)
-- Dependencies: 111
-- Name: FUNCTION boolop(integer[], query_int); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION boolop(integer[], query_int) IS 'boolean operation with array';


--
-- TOC entry 112 (class 1255 OID 5297085)
-- Dependencies: 6
-- Name: bt_metap(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION bt_metap(relname text, OUT magic integer, OUT version integer, OUT root integer, OUT level integer, OUT fastroot integer, OUT fastlevel integer) RETURNS record
    AS '$libdir/pageinspect', 'bt_metap'
    LANGUAGE c STRICT;


ALTER FUNCTION public.bt_metap(relname text, OUT magic integer, OUT version integer, OUT root integer, OUT level integer, OUT fastroot integer, OUT fastlevel integer) OWNER TO postgres;

--
-- TOC entry 113 (class 1255 OID 5297086)
-- Dependencies: 6
-- Name: bt_page_items(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION bt_page_items(relname text, blkno integer, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT nulls boolean, OUT vars boolean, OUT data text) RETURNS SETOF record
    AS '$libdir/pageinspect', 'bt_page_items'
    LANGUAGE c STRICT;


ALTER FUNCTION public.bt_page_items(relname text, blkno integer, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT nulls boolean, OUT vars boolean, OUT data text) OWNER TO postgres;

--
-- TOC entry 114 (class 1255 OID 5297087)
-- Dependencies: 6
-- Name: bt_page_stats(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION bt_page_stats(relname text, blkno integer, OUT blkno integer, OUT type "char", OUT live_items integer, OUT dead_items integer, OUT avg_item_size integer, OUT page_size integer, OUT free_size integer, OUT btpo_prev integer, OUT btpo_next integer, OUT btpo integer, OUT btpo_flags integer) RETURNS record
    AS '$libdir/pageinspect', 'bt_page_stats'
    LANGUAGE c STRICT;


ALTER FUNCTION public.bt_page_stats(relname text, blkno integer, OUT blkno integer, OUT type "char", OUT live_items integer, OUT dead_items integer, OUT avg_item_size integer, OUT page_size integer, OUT free_size integer, OUT btpo_prev integer, OUT btpo_next integer, OUT btpo integer, OUT btpo_flags integer) OWNER TO postgres;

--
-- TOC entry 115 (class 1255 OID 5297088)
-- Dependencies: 1293 1293 6
-- Name: btean13cmp(ean13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btean13cmp(ean13, ean13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btean13cmp(ean13, ean13) OWNER TO postgres;

--
-- TOC entry 116 (class 1255 OID 5297089)
-- Dependencies: 1376 1293 6
-- Name: btean13cmp(ean13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btean13cmp(ean13, isbn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btean13cmp(ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 117 (class 1255 OID 5297090)
-- Dependencies: 6 1293 1383
-- Name: btean13cmp(ean13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btean13cmp(ean13, ismn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btean13cmp(ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 118 (class 1255 OID 5297091)
-- Dependencies: 1388 6 1293
-- Name: btean13cmp(ean13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btean13cmp(ean13, issn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btean13cmp(ean13, issn13) OWNER TO postgres;

--
-- TOC entry 119 (class 1255 OID 5297092)
-- Dependencies: 6 1373 1293
-- Name: btean13cmp(ean13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btean13cmp(ean13, isbn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btean13cmp(ean13, isbn) OWNER TO postgres;

--
-- TOC entry 120 (class 1255 OID 5297093)
-- Dependencies: 1380 6 1293
-- Name: btean13cmp(ean13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btean13cmp(ean13, ismn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btean13cmp(ean13, ismn) OWNER TO postgres;

--
-- TOC entry 121 (class 1255 OID 5297094)
-- Dependencies: 1293 1385 6
-- Name: btean13cmp(ean13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btean13cmp(ean13, issn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btean13cmp(ean13, issn) OWNER TO postgres;

--
-- TOC entry 122 (class 1255 OID 5297095)
-- Dependencies: 6 1592 1293
-- Name: btean13cmp(ean13, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btean13cmp(ean13, upc) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btean13cmp(ean13, upc) OWNER TO postgres;

--
-- TOC entry 123 (class 1255 OID 5297096)
-- Dependencies: 1376 1376 6
-- Name: btisbn13cmp(isbn13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btisbn13cmp(isbn13, isbn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btisbn13cmp(isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 124 (class 1255 OID 5297097)
-- Dependencies: 6 1293 1376
-- Name: btisbn13cmp(isbn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btisbn13cmp(isbn13, ean13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btisbn13cmp(isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 125 (class 1255 OID 5297098)
-- Dependencies: 1376 1373 6
-- Name: btisbn13cmp(isbn13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btisbn13cmp(isbn13, isbn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btisbn13cmp(isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 126 (class 1255 OID 5297099)
-- Dependencies: 1373 1373 6
-- Name: btisbncmp(isbn, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btisbncmp(isbn, isbn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btisbncmp(isbn, isbn) OWNER TO postgres;

--
-- TOC entry 127 (class 1255 OID 5297100)
-- Dependencies: 6 1373 1293
-- Name: btisbncmp(isbn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btisbncmp(isbn, ean13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btisbncmp(isbn, ean13) OWNER TO postgres;

--
-- TOC entry 128 (class 1255 OID 5297101)
-- Dependencies: 1376 6 1373
-- Name: btisbncmp(isbn, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btisbncmp(isbn, isbn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btisbncmp(isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 129 (class 1255 OID 5297102)
-- Dependencies: 1383 1383 6
-- Name: btismn13cmp(ismn13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btismn13cmp(ismn13, ismn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btismn13cmp(ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 130 (class 1255 OID 5297103)
-- Dependencies: 6 1383 1293
-- Name: btismn13cmp(ismn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btismn13cmp(ismn13, ean13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btismn13cmp(ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 131 (class 1255 OID 5297104)
-- Dependencies: 1383 6 1380
-- Name: btismn13cmp(ismn13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btismn13cmp(ismn13, ismn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btismn13cmp(ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 132 (class 1255 OID 5297105)
-- Dependencies: 1380 6 1380
-- Name: btismncmp(ismn, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btismncmp(ismn, ismn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btismncmp(ismn, ismn) OWNER TO postgres;

--
-- TOC entry 133 (class 1255 OID 5297106)
-- Dependencies: 1380 6 1293
-- Name: btismncmp(ismn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btismncmp(ismn, ean13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btismncmp(ismn, ean13) OWNER TO postgres;

--
-- TOC entry 134 (class 1255 OID 5297107)
-- Dependencies: 1383 1380 6
-- Name: btismncmp(ismn, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btismncmp(ismn, ismn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btismncmp(ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 135 (class 1255 OID 5297108)
-- Dependencies: 6 1388 1388
-- Name: btissn13cmp(issn13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btissn13cmp(issn13, issn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btissn13cmp(issn13, issn13) OWNER TO postgres;

--
-- TOC entry 136 (class 1255 OID 5297109)
-- Dependencies: 6 1293 1388
-- Name: btissn13cmp(issn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btissn13cmp(issn13, ean13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btissn13cmp(issn13, ean13) OWNER TO postgres;

--
-- TOC entry 137 (class 1255 OID 5297110)
-- Dependencies: 6 1385 1388
-- Name: btissn13cmp(issn13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btissn13cmp(issn13, issn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btissn13cmp(issn13, issn) OWNER TO postgres;

--
-- TOC entry 138 (class 1255 OID 5297111)
-- Dependencies: 1385 1385 6
-- Name: btissncmp(issn, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btissncmp(issn, issn) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btissncmp(issn, issn) OWNER TO postgres;

--
-- TOC entry 139 (class 1255 OID 5297112)
-- Dependencies: 6 1385 1293
-- Name: btissncmp(issn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btissncmp(issn, ean13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btissncmp(issn, ean13) OWNER TO postgres;

--
-- TOC entry 140 (class 1255 OID 5297113)
-- Dependencies: 1388 6 1385
-- Name: btissncmp(issn, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btissncmp(issn, issn13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btissncmp(issn, issn13) OWNER TO postgres;

--
-- TOC entry 141 (class 1255 OID 5297114)
-- Dependencies: 1592 1592 6
-- Name: btupccmp(upc, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btupccmp(upc, upc) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btupccmp(upc, upc) OWNER TO postgres;

--
-- TOC entry 142 (class 1255 OID 5297115)
-- Dependencies: 1293 6 1592
-- Name: btupccmp(upc, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION btupccmp(upc, ean13) RETURNS integer
    AS $$btint8cmp$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.btupccmp(upc, ean13) OWNER TO postgres;

--
-- TOC entry 143 (class 1255 OID 5297124)
-- Dependencies: 6
-- Name: check_foreign_key(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION check_foreign_key() RETURNS trigger
    AS '$libdir/refint', 'check_foreign_key'
    LANGUAGE c;


ALTER FUNCTION public.check_foreign_key() OWNER TO postgres;

--
-- TOC entry 144 (class 1255 OID 5297125)
-- Dependencies: 6
-- Name: check_primary_key(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION check_primary_key() RETURNS trigger
    AS '$libdir/refint', 'check_primary_key'
    LANGUAGE c;


ALTER FUNCTION public.check_primary_key() OWNER TO postgres;

--
-- TOC entry 145 (class 1255 OID 5297126)
-- Dependencies: 1860 6
-- Name: checkauth(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION checkauth(text, text, text) RETURNS integer
    AS $_$
DECLARE

	schema text;

BEGIN
	IF NOT LongTransactionsEnabled() THEN
		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
	END IF;


	if ( $1 != '' ) THEN
		schema = $1;
	ELSE
		SELECT current_schema() into schema;
	END IF;


	-- TODO: check for an already existing trigger ?

	EXECUTE 'CREATE TRIGGER check_auth BEFORE UPDATE OR DELETE ON ' 

		|| quote_ident(schema) || '.' || quote_ident($2)



		||' FOR EACH ROW EXECUTE PROCEDURE CheckAuthTrigger('
		|| quote_literal($3) || ')';

	RETURN 0;
END;
$_$
    LANGUAGE plpgsql;


ALTER FUNCTION public.checkauth(text, text, text) OWNER TO postgres;

--
-- TOC entry 146 (class 1255 OID 5297127)
-- Dependencies: 6
-- Name: checkauth(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION checkauth(text, text) RETURNS integer
    AS $_$SELECT CheckAuth('', $1, $2)$_$
    LANGUAGE sql;


ALTER FUNCTION public.checkauth(text, text) OWNER TO postgres;

--
-- TOC entry 147 (class 1255 OID 5297136)
-- Dependencies: 6
-- Name: connectby(text, text, text, text, integer, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION connectby(text, text, text, text, integer, text) RETURNS SETOF record
    AS '$libdir/tablefunc', 'connectby_text'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.connectby(text, text, text, text, integer, text) OWNER TO postgres;

--
-- TOC entry 148 (class 1255 OID 5297137)
-- Dependencies: 6
-- Name: connectby(text, text, text, text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION connectby(text, text, text, text, integer) RETURNS SETOF record
    AS '$libdir/tablefunc', 'connectby_text'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.connectby(text, text, text, text, integer) OWNER TO postgres;

--
-- TOC entry 149 (class 1255 OID 5297138)
-- Dependencies: 6
-- Name: connectby(text, text, text, text, text, integer, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION connectby(text, text, text, text, text, integer, text) RETURNS SETOF record
    AS '$libdir/tablefunc', 'connectby_text_serial'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.connectby(text, text, text, text, text, integer, text) OWNER TO postgres;

--
-- TOC entry 150 (class 1255 OID 5297139)
-- Dependencies: 6
-- Name: connectby(text, text, text, text, text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION connectby(text, text, text, text, text, integer) RETURNS SETOF record
    AS '$libdir/tablefunc', 'connectby_text_serial'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.connectby(text, text, text, text, text, integer) OWNER TO postgres;

--
-- TOC entry 151 (class 1255 OID 5297144)
-- Dependencies: 6
-- Name: crosstab(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION crosstab(text) RETURNS SETOF record
    AS '$libdir/tablefunc', 'crosstab'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.crosstab(text) OWNER TO postgres;

--
-- TOC entry 152 (class 1255 OID 5297145)
-- Dependencies: 6
-- Name: crosstab(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION crosstab(text, integer) RETURNS SETOF record
    AS '$libdir/tablefunc', 'crosstab'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.crosstab(text, integer) OWNER TO postgres;

--
-- TOC entry 153 (class 1255 OID 5297146)
-- Dependencies: 6
-- Name: crosstab(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION crosstab(text, text) RETURNS SETOF record
    AS '$libdir/tablefunc', 'crosstab_hash'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.crosstab(text, text) OWNER TO postgres;

--
-- TOC entry 154 (class 1255 OID 5297147)
-- Dependencies: 1547 6
-- Name: crosstab2(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION crosstab2(text) RETURNS SETOF tablefunc_crosstab_2
    AS '$libdir/tablefunc', 'crosstab'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.crosstab2(text) OWNER TO postgres;

--
-- TOC entry 155 (class 1255 OID 5297148)
-- Dependencies: 6 1549
-- Name: crosstab3(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION crosstab3(text) RETURNS SETOF tablefunc_crosstab_3
    AS '$libdir/tablefunc', 'crosstab'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.crosstab3(text) OWNER TO postgres;

--
-- TOC entry 156 (class 1255 OID 5297149)
-- Dependencies: 6 1551
-- Name: crosstab4(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION crosstab4(text) RETURNS SETOF tablefunc_crosstab_4
    AS '$libdir/tablefunc', 'crosstab'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.crosstab4(text) OWNER TO postgres;

--
-- TOC entry 157 (class 1255 OID 5297150)
-- Dependencies: 6
-- Name: crypt(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION crypt(text, text) RETURNS text
    AS '$libdir/pgcrypto', 'pg_crypt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.crypt(text, text) OWNER TO postgres;

--
-- TOC entry 158 (class 1255 OID 5297151)
-- Dependencies: 6 1249
-- Name: cube(double precision[], double precision[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube(double precision[], double precision[]) RETURNS cube
    AS '$libdir/cube', 'cube_a_f8_f8'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube(double precision[], double precision[]) OWNER TO postgres;

--
-- TOC entry 159 (class 1255 OID 5297152)
-- Dependencies: 1249 6
-- Name: cube(double precision[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube(double precision[]) RETURNS cube
    AS '$libdir/cube', 'cube_a_f8'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube(double precision[]) OWNER TO postgres;

--
-- TOC entry 160 (class 1255 OID 5297153)
-- Dependencies: 1249 6
-- Name: cube(double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube(double precision) RETURNS cube
    AS '$libdir/cube', 'cube_f8'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube(double precision) OWNER TO postgres;

--
-- TOC entry 161 (class 1255 OID 5297154)
-- Dependencies: 6 1249
-- Name: cube(double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube(double precision, double precision) RETURNS cube
    AS '$libdir/cube', 'cube_f8_f8'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube(double precision, double precision) OWNER TO postgres;

--
-- TOC entry 162 (class 1255 OID 5297155)
-- Dependencies: 1249 6 1249
-- Name: cube(cube, double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube(cube, double precision) RETURNS cube
    AS '$libdir/cube', 'cube_c_f8'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube(cube, double precision) OWNER TO postgres;

--
-- TOC entry 163 (class 1255 OID 5297156)
-- Dependencies: 1249 1249 6
-- Name: cube(cube, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube(cube, double precision, double precision) RETURNS cube
    AS '$libdir/cube', 'cube_c_f8_f8'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube(cube, double precision, double precision) OWNER TO postgres;

--
-- TOC entry 164 (class 1255 OID 5297157)
-- Dependencies: 1249 6 1249
-- Name: cube_cmp(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_cmp(cube, cube) RETURNS integer
    AS '$libdir/cube', 'cube_cmp'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_cmp(cube, cube) OWNER TO postgres;

--
-- TOC entry 5151 (class 0 OID 0)
-- Dependencies: 164
-- Name: FUNCTION cube_cmp(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_cmp(cube, cube) IS 'btree comparison function';


--
-- TOC entry 165 (class 1255 OID 5297158)
-- Dependencies: 1249 6 1249
-- Name: cube_contained(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_contained(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_contained'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_contained(cube, cube) OWNER TO postgres;

--
-- TOC entry 5152 (class 0 OID 0)
-- Dependencies: 165
-- Name: FUNCTION cube_contained(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_contained(cube, cube) IS 'contained in';


--
-- TOC entry 166 (class 1255 OID 5297159)
-- Dependencies: 1249 6 1249
-- Name: cube_contains(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_contains(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_contains'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_contains(cube, cube) OWNER TO postgres;

--
-- TOC entry 5153 (class 0 OID 0)
-- Dependencies: 166
-- Name: FUNCTION cube_contains(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_contains(cube, cube) IS 'contains';


--
-- TOC entry 167 (class 1255 OID 5297160)
-- Dependencies: 6 1249 1249
-- Name: cube_enlarge(cube, double precision, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_enlarge(cube, double precision, integer) RETURNS cube
    AS '$libdir/cube', 'cube_enlarge'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_enlarge(cube, double precision, integer) OWNER TO postgres;

--
-- TOC entry 168 (class 1255 OID 5297161)
-- Dependencies: 1249 6 1249
-- Name: cube_eq(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_eq(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_eq'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_eq(cube, cube) OWNER TO postgres;

--
-- TOC entry 5154 (class 0 OID 0)
-- Dependencies: 168
-- Name: FUNCTION cube_eq(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_eq(cube, cube) IS 'same as';


--
-- TOC entry 169 (class 1255 OID 5297162)
-- Dependencies: 1249 1249 6
-- Name: cube_ge(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_ge(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_ge'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_ge(cube, cube) OWNER TO postgres;

--
-- TOC entry 5155 (class 0 OID 0)
-- Dependencies: 169
-- Name: FUNCTION cube_ge(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_ge(cube, cube) IS 'greater than or equal to';


--
-- TOC entry 170 (class 1255 OID 5297163)
-- Dependencies: 1249 6 1249
-- Name: cube_gt(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_gt(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_gt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_gt(cube, cube) OWNER TO postgres;

--
-- TOC entry 5156 (class 0 OID 0)
-- Dependencies: 170
-- Name: FUNCTION cube_gt(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_gt(cube, cube) IS 'greater than';


--
-- TOC entry 171 (class 1255 OID 5297164)
-- Dependencies: 1249 6 1249 1249
-- Name: cube_inter(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_inter(cube, cube) RETURNS cube
    AS '$libdir/cube', 'cube_inter'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_inter(cube, cube) OWNER TO postgres;

--
-- TOC entry 172 (class 1255 OID 5297165)
-- Dependencies: 6 1249 1249
-- Name: cube_le(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_le(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_le'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_le(cube, cube) OWNER TO postgres;

--
-- TOC entry 5157 (class 0 OID 0)
-- Dependencies: 172
-- Name: FUNCTION cube_le(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_le(cube, cube) IS 'lower than or equal to';


--
-- TOC entry 173 (class 1255 OID 5297166)
-- Dependencies: 1249 6
-- Name: cube_ll_coord(cube, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_ll_coord(cube, integer) RETURNS double precision
    AS '$libdir/cube', 'cube_ll_coord'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_ll_coord(cube, integer) OWNER TO postgres;

--
-- TOC entry 174 (class 1255 OID 5297167)
-- Dependencies: 6 1249 1249
-- Name: cube_lt(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_lt(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_lt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_lt(cube, cube) OWNER TO postgres;

--
-- TOC entry 5158 (class 0 OID 0)
-- Dependencies: 174
-- Name: FUNCTION cube_lt(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_lt(cube, cube) IS 'lower than';


--
-- TOC entry 175 (class 1255 OID 5297168)
-- Dependencies: 1249 6 1249
-- Name: cube_ne(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_ne(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_ne'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_ne(cube, cube) OWNER TO postgres;

--
-- TOC entry 5159 (class 0 OID 0)
-- Dependencies: 175
-- Name: FUNCTION cube_ne(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_ne(cube, cube) IS 'different';


--
-- TOC entry 176 (class 1255 OID 5297169)
-- Dependencies: 1249 6 1249
-- Name: cube_overlap(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_overlap(cube, cube) RETURNS boolean
    AS '$libdir/cube', 'cube_overlap'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_overlap(cube, cube) OWNER TO postgres;

--
-- TOC entry 5160 (class 0 OID 0)
-- Dependencies: 176
-- Name: FUNCTION cube_overlap(cube, cube); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION cube_overlap(cube, cube) IS 'overlaps';


--
-- TOC entry 177 (class 1255 OID 5297170)
-- Dependencies: 6 1249
-- Name: cube_size(cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_size(cube) RETURNS double precision
    AS '$libdir/cube', 'cube_size'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_size(cube) OWNER TO postgres;

--
-- TOC entry 178 (class 1255 OID 5297171)
-- Dependencies: 6 1249 1249
-- Name: cube_subset(cube, integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_subset(cube, integer[]) RETURNS cube
    AS '$libdir/cube', 'cube_subset'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_subset(cube, integer[]) OWNER TO postgres;

--
-- TOC entry 179 (class 1255 OID 5297172)
-- Dependencies: 6 1249 1249 1249
-- Name: cube_union(cube, cube); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_union(cube, cube) RETURNS cube
    AS '$libdir/cube', 'cube_union'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_union(cube, cube) OWNER TO postgres;

--
-- TOC entry 180 (class 1255 OID 5297173)
-- Dependencies: 6 1249
-- Name: cube_ur_coord(cube, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION cube_ur_coord(cube, integer) RETURNS double precision
    AS '$libdir/cube', 'cube_ur_coord'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.cube_ur_coord(cube, integer) OWNER TO postgres;

--
-- TOC entry 181 (class 1255 OID 5297175)
-- Dependencies: 6
-- Name: dblink(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink(text, text) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_record'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink(text, text) OWNER TO postgres;

--
-- TOC entry 182 (class 1255 OID 5297176)
-- Dependencies: 6
-- Name: dblink(text, text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink(text, text, boolean) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_record'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink(text, text, boolean) OWNER TO postgres;

--
-- TOC entry 183 (class 1255 OID 5297177)
-- Dependencies: 6
-- Name: dblink(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink(text) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_record'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink(text) OWNER TO postgres;

--
-- TOC entry 184 (class 1255 OID 5297178)
-- Dependencies: 6
-- Name: dblink(text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink(text, boolean) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_record'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink(text, boolean) OWNER TO postgres;

--
-- TOC entry 185 (class 1255 OID 5297179)
-- Dependencies: 6
-- Name: dblink_build_sql_delete(text, int2vector, integer, text[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_build_sql_delete(text, int2vector, integer, text[]) RETURNS text
    AS '$libdir/dblink', 'dblink_build_sql_delete'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_build_sql_delete(text, int2vector, integer, text[]) OWNER TO postgres;

--
-- TOC entry 186 (class 1255 OID 5297180)
-- Dependencies: 6
-- Name: dblink_build_sql_insert(text, int2vector, integer, text[], text[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_build_sql_insert(text, int2vector, integer, text[], text[]) RETURNS text
    AS '$libdir/dblink', 'dblink_build_sql_insert'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_build_sql_insert(text, int2vector, integer, text[], text[]) OWNER TO postgres;

--
-- TOC entry 187 (class 1255 OID 5297181)
-- Dependencies: 6
-- Name: dblink_build_sql_update(text, int2vector, integer, text[], text[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_build_sql_update(text, int2vector, integer, text[], text[]) RETURNS text
    AS '$libdir/dblink', 'dblink_build_sql_update'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_build_sql_update(text, int2vector, integer, text[], text[]) OWNER TO postgres;

--
-- TOC entry 188 (class 1255 OID 5297182)
-- Dependencies: 6
-- Name: dblink_cancel_query(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_cancel_query(text) RETURNS text
    AS '$libdir/dblink', 'dblink_cancel_query'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_cancel_query(text) OWNER TO postgres;

--
-- TOC entry 189 (class 1255 OID 5297183)
-- Dependencies: 6
-- Name: dblink_close(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_close(text) RETURNS text
    AS '$libdir/dblink', 'dblink_close'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_close(text) OWNER TO postgres;

--
-- TOC entry 190 (class 1255 OID 5297184)
-- Dependencies: 6
-- Name: dblink_close(text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_close(text, boolean) RETURNS text
    AS '$libdir/dblink', 'dblink_close'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_close(text, boolean) OWNER TO postgres;

--
-- TOC entry 191 (class 1255 OID 5297185)
-- Dependencies: 6
-- Name: dblink_close(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_close(text, text) RETURNS text
    AS '$libdir/dblink', 'dblink_close'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_close(text, text) OWNER TO postgres;

--
-- TOC entry 192 (class 1255 OID 5297186)
-- Dependencies: 6
-- Name: dblink_close(text, text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_close(text, text, boolean) RETURNS text
    AS '$libdir/dblink', 'dblink_close'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_close(text, text, boolean) OWNER TO postgres;

--
-- TOC entry 193 (class 1255 OID 5297187)
-- Dependencies: 6
-- Name: dblink_connect(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_connect(text) RETURNS text
    AS '$libdir/dblink', 'dblink_connect'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_connect(text) OWNER TO postgres;

--
-- TOC entry 194 (class 1255 OID 5297188)
-- Dependencies: 6
-- Name: dblink_connect(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_connect(text, text) RETURNS text
    AS '$libdir/dblink', 'dblink_connect'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_connect(text, text) OWNER TO postgres;

--
-- TOC entry 218 (class 1255 OID 5297189)
-- Dependencies: 6
-- Name: dblink_connect_u(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_connect_u(text) RETURNS text
    AS '$libdir/dblink', 'dblink_connect'
    LANGUAGE c STRICT SECURITY DEFINER;


ALTER FUNCTION public.dblink_connect_u(text) OWNER TO postgres;

--
-- TOC entry 195 (class 1255 OID 5297190)
-- Dependencies: 6
-- Name: dblink_connect_u(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_connect_u(text, text) RETURNS text
    AS '$libdir/dblink', 'dblink_connect'
    LANGUAGE c STRICT SECURITY DEFINER;


ALTER FUNCTION public.dblink_connect_u(text, text) OWNER TO postgres;

--
-- TOC entry 196 (class 1255 OID 5297191)
-- Dependencies: 6
-- Name: dblink_current_query(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_current_query() RETURNS text
    AS '$libdir/dblink', 'dblink_current_query'
    LANGUAGE c;


ALTER FUNCTION public.dblink_current_query() OWNER TO postgres;

--
-- TOC entry 197 (class 1255 OID 5297192)
-- Dependencies: 6
-- Name: dblink_disconnect(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_disconnect() RETURNS text
    AS '$libdir/dblink', 'dblink_disconnect'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_disconnect() OWNER TO postgres;

--
-- TOC entry 198 (class 1255 OID 5297193)
-- Dependencies: 6
-- Name: dblink_disconnect(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_disconnect(text) RETURNS text
    AS '$libdir/dblink', 'dblink_disconnect'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_disconnect(text) OWNER TO postgres;

--
-- TOC entry 199 (class 1255 OID 5297194)
-- Dependencies: 6
-- Name: dblink_error_message(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_error_message(text) RETURNS text
    AS '$libdir/dblink', 'dblink_error_message'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_error_message(text) OWNER TO postgres;

--
-- TOC entry 200 (class 1255 OID 5297195)
-- Dependencies: 6
-- Name: dblink_exec(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_exec(text, text) RETURNS text
    AS '$libdir/dblink', 'dblink_exec'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_exec(text, text) OWNER TO postgres;

--
-- TOC entry 201 (class 1255 OID 5297196)
-- Dependencies: 6
-- Name: dblink_exec(text, text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_exec(text, text, boolean) RETURNS text
    AS '$libdir/dblink', 'dblink_exec'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_exec(text, text, boolean) OWNER TO postgres;

--
-- TOC entry 202 (class 1255 OID 5297197)
-- Dependencies: 6
-- Name: dblink_exec(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_exec(text) RETURNS text
    AS '$libdir/dblink', 'dblink_exec'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_exec(text) OWNER TO postgres;

--
-- TOC entry 203 (class 1255 OID 5297198)
-- Dependencies: 6
-- Name: dblink_exec(text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_exec(text, boolean) RETURNS text
    AS '$libdir/dblink', 'dblink_exec'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_exec(text, boolean) OWNER TO postgres;

--
-- TOC entry 204 (class 1255 OID 5297199)
-- Dependencies: 6
-- Name: dblink_fetch(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_fetch(text, integer) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_fetch'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_fetch(text, integer) OWNER TO postgres;

--
-- TOC entry 205 (class 1255 OID 5297200)
-- Dependencies: 6
-- Name: dblink_fetch(text, integer, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_fetch(text, integer, boolean) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_fetch'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_fetch(text, integer, boolean) OWNER TO postgres;

--
-- TOC entry 206 (class 1255 OID 5297201)
-- Dependencies: 6
-- Name: dblink_fetch(text, text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_fetch(text, text, integer) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_fetch'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_fetch(text, text, integer) OWNER TO postgres;

--
-- TOC entry 207 (class 1255 OID 5297202)
-- Dependencies: 6
-- Name: dblink_fetch(text, text, integer, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_fetch(text, text, integer, boolean) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_fetch'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_fetch(text, text, integer, boolean) OWNER TO postgres;

--
-- TOC entry 208 (class 1255 OID 5297203)
-- Dependencies: 6
-- Name: dblink_get_connections(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_get_connections() RETURNS text[]
    AS '$libdir/dblink', 'dblink_get_connections'
    LANGUAGE c;


ALTER FUNCTION public.dblink_get_connections() OWNER TO postgres;

--
-- TOC entry 209 (class 1255 OID 5297204)
-- Dependencies: 1234 6
-- Name: dblink_get_pkey(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_get_pkey(text) RETURNS SETOF dblink_pkey_results
    AS '$libdir/dblink', 'dblink_get_pkey'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_get_pkey(text) OWNER TO postgres;

--
-- TOC entry 210 (class 1255 OID 5297205)
-- Dependencies: 6
-- Name: dblink_get_result(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_get_result(text) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_get_result'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_get_result(text) OWNER TO postgres;

--
-- TOC entry 211 (class 1255 OID 5297206)
-- Dependencies: 6
-- Name: dblink_get_result(text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_get_result(text, boolean) RETURNS SETOF record
    AS '$libdir/dblink', 'dblink_get_result'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_get_result(text, boolean) OWNER TO postgres;

--
-- TOC entry 212 (class 1255 OID 5297207)
-- Dependencies: 6
-- Name: dblink_is_busy(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_is_busy(text) RETURNS integer
    AS '$libdir/dblink', 'dblink_is_busy'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_is_busy(text) OWNER TO postgres;

--
-- TOC entry 213 (class 1255 OID 5297208)
-- Dependencies: 6
-- Name: dblink_open(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_open(text, text) RETURNS text
    AS '$libdir/dblink', 'dblink_open'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_open(text, text) OWNER TO postgres;

--
-- TOC entry 214 (class 1255 OID 5297209)
-- Dependencies: 6
-- Name: dblink_open(text, text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_open(text, text, boolean) RETURNS text
    AS '$libdir/dblink', 'dblink_open'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_open(text, text, boolean) OWNER TO postgres;

--
-- TOC entry 215 (class 1255 OID 5297210)
-- Dependencies: 6
-- Name: dblink_open(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_open(text, text, text) RETURNS text
    AS '$libdir/dblink', 'dblink_open'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_open(text, text, text) OWNER TO postgres;

--
-- TOC entry 216 (class 1255 OID 5297211)
-- Dependencies: 6
-- Name: dblink_open(text, text, text, boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_open(text, text, text, boolean) RETURNS text
    AS '$libdir/dblink', 'dblink_open'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_open(text, text, text, boolean) OWNER TO postgres;

--
-- TOC entry 217 (class 1255 OID 5297212)
-- Dependencies: 6
-- Name: dblink_send_query(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dblink_send_query(text, text) RETURNS integer
    AS '$libdir/dblink', 'dblink_send_query'
    LANGUAGE c STRICT;


ALTER FUNCTION public.dblink_send_query(text, text) OWNER TO postgres;

--
-- TOC entry 219 (class 1255 OID 5297213)
-- Dependencies: 6
-- Name: dearmor(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dearmor(text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_dearmor'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.dearmor(text) OWNER TO postgres;

--
-- TOC entry 220 (class 1255 OID 5297214)
-- Dependencies: 6
-- Name: decrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION decrypt(bytea, bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_decrypt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.decrypt(bytea, bytea, text) OWNER TO postgres;

--
-- TOC entry 221 (class 1255 OID 5297215)
-- Dependencies: 6
-- Name: decrypt_iv(bytea, bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION decrypt_iv(bytea, bytea, bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_decrypt_iv'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.decrypt_iv(bytea, bytea, bytea, text) OWNER TO postgres;

--
-- TOC entry 222 (class 1255 OID 5297216)
-- Dependencies: 1348 6
-- Name: defined(hstore, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION defined(hstore, text) RETURNS boolean
    AS '$libdir/hstore', 'defined'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.defined(hstore, text) OWNER TO postgres;

--
-- TOC entry 223 (class 1255 OID 5297217)
-- Dependencies: 1348 1348 6
-- Name: delete(hstore, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION delete(hstore, text) RETURNS hstore
    AS '$libdir/hstore', 'delete'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.delete(hstore, text) OWNER TO postgres;

--
-- TOC entry 224 (class 1255 OID 5297218)
-- Dependencies: 6
-- Name: difference(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION difference(text, text) RETURNS integer
    AS '$libdir/fuzzystrmatch', 'difference'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.difference(text, text) OWNER TO postgres;

--
-- TOC entry 225 (class 1255 OID 5297220)
-- Dependencies: 6
-- Name: digest(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION digest(text, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_digest'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.digest(text, text) OWNER TO postgres;

--
-- TOC entry 226 (class 1255 OID 5297221)
-- Dependencies: 6
-- Name: digest(bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION digest(bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_digest'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.digest(bytea, text) OWNER TO postgres;

--
-- TOC entry 227 (class 1255 OID 5297223)
-- Dependencies: 1860 6
-- Name: disablelongtransactions(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION disablelongtransactions() RETURNS text
    AS $$
DECLARE
	rec RECORD;

BEGIN

	--
	-- Drop all triggers applied by CheckAuth()
	--
	FOR rec IN
		SELECT c.relname, t.tgname, t.tgargs FROM pg_trigger t, pg_class c, pg_proc p
		WHERE p.proname = 'checkauthtrigger' and t.tgfoid = p.oid and t.tgrelid = c.oid
	LOOP
		EXECUTE 'DROP TRIGGER ' || quote_ident(rec.tgname) ||
			' ON ' || quote_ident(rec.relname);
	END LOOP;

	--
	-- Drop the authorization_table table
	--
	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table' LOOP
		DROP TABLE authorization_table;
	END LOOP;

	--
	-- Drop the authorized_tables view
	--
	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables' LOOP
		DROP VIEW authorized_tables;
	END LOOP;

	RETURN 'Long transactions support disabled';
END;
$$
    LANGUAGE plpgsql;


ALTER FUNCTION public.disablelongtransactions() OWNER TO postgres;

--
-- TOC entry 228 (class 1255 OID 5297228)
-- Dependencies: 6
-- Name: dmetaphone(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dmetaphone(text) RETURNS text
    AS '$libdir/fuzzystrmatch', 'dmetaphone'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.dmetaphone(text) OWNER TO postgres;

--
-- TOC entry 229 (class 1255 OID 5297229)
-- Dependencies: 6
-- Name: dmetaphone_alt(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dmetaphone_alt(text) RETURNS text
    AS '$libdir/fuzzystrmatch', 'dmetaphone_alt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.dmetaphone_alt(text) OWNER TO postgres;

--
-- TOC entry 230 (class 1255 OID 5297231)
-- Dependencies: 6 1860
-- Name: dropgeometrycolumn(character varying, character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dropgeometrycolumn(character varying, character varying, character varying, character varying) RETURNS text
    AS $_$
DECLARE
	catalog_name alias for $1; 
	schema_name alias for $2;
	table_name alias for $3;
	column_name alias for $4;
	myrec RECORD;
	okay boolean;
	real_schema name;

BEGIN



	-- Find, check or fix schema_name
	IF ( schema_name != '' ) THEN
		okay = 'f';

		FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP
			okay := 't';
		END LOOP;

		IF ( okay <> 't' ) THEN
			RAISE NOTICE 'Invalid schema name - using current_schema()';
			SELECT current_schema() into real_schema;
		ELSE
			real_schema = schema_name;
		END IF;
	ELSE
		SELECT current_schema() into real_schema;
	END IF;




 	-- Find out if the column is in the geometry_columns table
	okay = 'f';
	FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP
		okay := 't';
	END LOOP; 
	IF (okay <> 't') THEN 
		RAISE EXCEPTION 'column not found in geometry_columns table';
		RETURN 'f';
	END IF;

	-- Remove ref from geometry_columns table
	EXECUTE 'delete from geometry_columns where f_table_schema = ' ||
		quote_literal(real_schema) || ' and f_table_name = ' ||
		quote_literal(table_name)  || ' and f_geometry_column = ' ||
		quote_literal(column_name);
	
	-- Remove table column
	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' ||
		quote_ident(table_name) || ' DROP COLUMN ' ||
		quote_ident(column_name);



	RETURN real_schema || '.' || table_name || '.' || column_name ||' effectively removed.';
	
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.dropgeometrycolumn(character varying, character varying, character varying, character varying) OWNER TO postgres;

--
-- TOC entry 231 (class 1255 OID 5297232)
-- Dependencies: 1860 6
-- Name: dropgeometrycolumn(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dropgeometrycolumn(character varying, character varying, character varying) RETURNS text
    AS $_$
DECLARE
	ret text;
BEGIN
	SELECT DropGeometryColumn('',$1,$2,$3) into ret;
	RETURN ret;
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.dropgeometrycolumn(character varying, character varying, character varying) OWNER TO postgres;

--
-- TOC entry 232 (class 1255 OID 5297233)
-- Dependencies: 1860 6
-- Name: dropgeometrycolumn(character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dropgeometrycolumn(character varying, character varying) RETURNS text
    AS $_$
DECLARE
	ret text;
BEGIN
	SELECT DropGeometryColumn('','',$1,$2) into ret;
	RETURN ret;
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.dropgeometrycolumn(character varying, character varying) OWNER TO postgres;

--
-- TOC entry 233 (class 1255 OID 5297234)
-- Dependencies: 1860 6
-- Name: dropgeometrytable(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dropgeometrytable(character varying, character varying, character varying) RETURNS text
    AS $_$
DECLARE
	catalog_name alias for $1; 
	schema_name alias for $2;
	table_name alias for $3;
	real_schema name;

BEGIN


	IF ( schema_name = '' ) THEN
		SELECT current_schema() into real_schema;
	ELSE
		real_schema = schema_name;
	END IF;


	-- Remove refs from geometry_columns table
	EXECUTE 'DELETE FROM geometry_columns WHERE ' ||

		'f_table_schema = ' || quote_literal(real_schema) ||
		' AND ' ||

		' f_table_name = ' || quote_literal(table_name);
	
	-- Remove table 
	EXECUTE 'DROP TABLE '

		|| quote_ident(real_schema) || '.' ||

		quote_ident(table_name);

	RETURN

		real_schema || '.' ||

		table_name ||' dropped.';
	
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.dropgeometrytable(character varying, character varying, character varying) OWNER TO postgres;

--
-- TOC entry 234 (class 1255 OID 5297235)
-- Dependencies: 6
-- Name: dropgeometrytable(character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dropgeometrytable(character varying, character varying) RETURNS text
    AS $_$SELECT DropGeometryTable('',$1,$2)$_$
    LANGUAGE sql STRICT;


ALTER FUNCTION public.dropgeometrytable(character varying, character varying) OWNER TO postgres;

--
-- TOC entry 235 (class 1255 OID 5297236)
-- Dependencies: 6
-- Name: dropgeometrytable(character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dropgeometrytable(character varying) RETURNS text
    AS $_$SELECT DropGeometryTable('','',$1)$_$
    LANGUAGE sql STRICT;


ALTER FUNCTION public.dropgeometrytable(character varying) OWNER TO postgres;

--
-- TOC entry 236 (class 1255 OID 5297241)
-- Dependencies: 6 1348
-- Name: each(hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION each(hs hstore, OUT key text, OUT value text) RETURNS SETOF record
    AS '$libdir/hstore', 'each'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.each(hs hstore, OUT key text, OUT value text) OWNER TO postgres;

--
-- TOC entry 237 (class 1255 OID 5297242)
-- Dependencies: 6 1588 1249
-- Name: earth_box(earth, double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION earth_box(earth, double precision) RETURNS cube
    AS $_$SELECT cube_enlarge($1, gc_to_sec($2), 3)$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.earth_box(earth, double precision) OWNER TO postgres;

--
-- TOC entry 238 (class 1255 OID 5297243)
-- Dependencies: 6 1588 1588
-- Name: earth_distance(earth, earth); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION earth_distance(earth, earth) RETURNS double precision
    AS $_$SELECT sec_to_gc(cube_distance($1, $2))$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.earth_distance(earth, earth) OWNER TO postgres;

--
-- TOC entry 239 (class 1255 OID 5297244)
-- Dependencies: 6 1860
-- Name: enablelongtransactions(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION enablelongtransactions() RETURNS text
    AS $$
DECLARE
	"query" text;
	exists bool;
	rec RECORD;

BEGIN

	exists = 'f';
	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table'
	LOOP
		exists = 't';
	END LOOP;

	IF NOT exists
	THEN
		"query" = 'CREATE TABLE authorization_table (
			toid oid, -- table oid
			rid text, -- row id
			expires timestamp,
			authid text
		)';
		EXECUTE "query";
	END IF;

	exists = 'f';
	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables'
	LOOP
		exists = 't';
	END LOOP;

	IF NOT exists THEN
		"query" = 'CREATE VIEW authorized_tables AS ' ||
			'SELECT ' ||

			'n.nspname as schema, ' ||

			'c.relname as table, trim(' ||
			quote_literal(chr(92) || '000') ||
			' from t.tgargs) as id_column ' ||
			'FROM pg_trigger t, pg_class c, pg_proc p ' ||

			', pg_namespace n ' ||

			'WHERE p.proname = ' || quote_literal('checkauthtrigger') ||

			' AND c.relnamespace = n.oid' ||

			' AND t.tgfoid = p.oid and t.tgrelid = c.oid';
		EXECUTE "query";
	END IF;

	RETURN 'Long transactions support enabled';
END;
$$
    LANGUAGE plpgsql;


ALTER FUNCTION public.enablelongtransactions() OWNER TO postgres;

--
-- TOC entry 240 (class 1255 OID 5297245)
-- Dependencies: 6
-- Name: encrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION encrypt(bytea, bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_encrypt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.encrypt(bytea, bytea, text) OWNER TO postgres;

--
-- TOC entry 241 (class 1255 OID 5297246)
-- Dependencies: 6
-- Name: encrypt_iv(bytea, bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION encrypt_iv(bytea, bytea, bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_encrypt_iv'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.encrypt_iv(bytea, bytea, bytea, text) OWNER TO postgres;

--
-- TOC entry 242 (class 1255 OID 5297249)
-- Dependencies: 1235 6
-- Name: eq(chkpass, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION eq(chkpass, text) RETURNS boolean
    AS '$libdir/chkpass', 'chkpass_eq'
    LANGUAGE c STRICT;


ALTER FUNCTION public.eq(chkpass, text) OWNER TO postgres;

--
-- TOC entry 243 (class 1255 OID 5297254)
-- Dependencies: 1348 6
-- Name: exist(hstore, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION exist(hstore, text) RETURNS boolean
    AS '$libdir/hstore', 'exists'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.exist(hstore, text) OWNER TO postgres;

--
-- TOC entry 244 (class 1255 OID 5297261)
-- Dependencies: 1348 6
-- Name: fetchval(hstore, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION fetchval(hstore, text) RETURNS text
    AS '$libdir/hstore', 'fetchval'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.fetchval(hstore, text) OWNER TO postgres;

--
-- TOC entry 245 (class 1255 OID 5297264)
-- Dependencies: 1860 6
-- Name: find_srid(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION find_srid(character varying, character varying, character varying) RETURNS integer
    AS $_$DECLARE
   schem text;
   tabl text;
   sr int4;
BEGIN
   IF $1 IS NULL THEN
      RAISE EXCEPTION 'find_srid() - schema is NULL!';
   END IF;
   IF $2 IS NULL THEN
      RAISE EXCEPTION 'find_srid() - table name is NULL!';
   END IF;
   IF $3 IS NULL THEN
      RAISE EXCEPTION 'find_srid() - column name is NULL!';
   END IF;
   schem = $1;
   tabl = $2;
-- if the table contains a . and the schema is empty
-- split the table into a schema and a table
-- otherwise drop through to default behavior
   IF ( schem = '' and tabl LIKE '%.%' ) THEN
     schem = substr(tabl,1,strpos(tabl,'.')-1);
     tabl = substr(tabl,length(schem)+2);
   ELSE
     schem = schem || '%';
   END IF;

   select SRID into sr from geometry_columns where f_table_schema like schem and f_table_name = tabl and f_geometry_column = $3;
   IF NOT FOUND THEN
       RAISE EXCEPTION 'find_srid() - couldnt find the corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS table?  Is there an uppercase/lowercase missmatch?';
   END IF;
  return sr;
END;
$_$
    LANGUAGE plpgsql IMMUTABLE STRICT;


ALTER FUNCTION public.find_srid(character varying, character varying, character varying) OWNER TO postgres;

--
-- TOC entry 246 (class 1255 OID 5297265)
-- Dependencies: 1860 6
-- Name: fix_geometry_columns(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION fix_geometry_columns() RETURNS text
    AS $$
DECLARE
	mislinked record;
	result text;
	linked integer;
	deleted integer;

	foundschema integer;

BEGIN


	-- Since 7.3 schema support has been added.
	-- Previous postgis versions used to put the database name in
	-- the schema column. This needs to be fixed, so we try to 
	-- set the correct schema for each geometry_colums record
	-- looking at table, column, type and srid.
	UPDATE geometry_columns SET f_table_schema = n.nspname
		FROM pg_namespace n, pg_class c, pg_attribute a,
			pg_constraint sridcheck, pg_constraint typecheck
                WHERE ( f_table_schema is NULL
		OR f_table_schema = ''
                OR f_table_schema NOT IN (
                        SELECT nspname::varchar
                        FROM pg_namespace nn, pg_class cc, pg_attribute aa
                        WHERE cc.relnamespace = nn.oid
                        AND cc.relname = f_table_name::name
                        AND aa.attrelid = cc.oid
                        AND aa.attname = f_geometry_column::name))
                AND f_table_name::name = c.relname
                AND c.oid = a.attrelid
                AND c.relnamespace = n.oid
                AND f_geometry_column::name = a.attname

                AND sridcheck.conrelid = c.oid
		AND sridcheck.consrc LIKE '(srid(% = %)'
                AND sridcheck.consrc ~ textcat(' = ', srid::text)

                AND typecheck.conrelid = c.oid
		AND typecheck.consrc LIKE
	'((geometrytype(%) = ''%''::text) OR (% IS NULL))'
                AND typecheck.consrc ~ textcat(' = ''', type::text)

                AND NOT EXISTS (
                        SELECT oid FROM geometry_columns gc
                        WHERE c.relname::varchar = gc.f_table_name
                        AND n.nspname::varchar = gc.f_table_schema
                        AND a.attname::varchar = gc.f_geometry_column
                );

	GET DIAGNOSTICS foundschema = ROW_COUNT;



	-- no linkage to system table needed
	return 'fixed:'||foundschema::text;


	-- fix linking to system tables
	SELECT 0 INTO linked;
	FOR mislinked in
		SELECT gc.oid as gcrec,
			a.attrelid as attrelid, a.attnum as attnum
                FROM geometry_columns gc, pg_class c,

		pg_namespace n, pg_attribute a



                WHERE ( gc.attrelid IS NULL OR gc.attrelid != a.attrelid 
			OR gc.varattnum IS NULL OR gc.varattnum != a.attnum)

                AND n.nspname = gc.f_table_schema::name
                AND c.relnamespace = n.oid

                AND c.relname = gc.f_table_name::name
                AND a.attname = f_geometry_column::name
                AND a.attrelid = c.oid
	LOOP
		UPDATE geometry_columns SET
			attrelid = mislinked.attrelid,
			varattnum = mislinked.attnum,
			stats = NULL
			WHERE geometry_columns.oid = mislinked.gcrec;
		SELECT linked+1 INTO linked;
	END LOOP; 

	-- remove stale records
	DELETE FROM geometry_columns WHERE attrelid IS NULL;

	GET DIAGNOSTICS deleted = ROW_COUNT;

	result = 

		'fixed:' || foundschema::text ||

		' linked:' || linked::text || 
		' deleted:' || deleted::text;

	return result;

END;
$$
    LANGUAGE plpgsql;


ALTER FUNCTION public.fix_geometry_columns() OWNER TO postgres;

--
-- TOC entry 247 (class 1255 OID 5297273)
-- Dependencies: 6
-- Name: g_cube_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_cube_compress(internal) RETURNS internal
    AS '$libdir/cube', 'g_cube_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_cube_compress(internal) OWNER TO postgres;

--
-- TOC entry 248 (class 1255 OID 5297274)
-- Dependencies: 1249 6
-- Name: g_cube_consistent(internal, cube, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_cube_consistent(internal, cube, integer) RETURNS boolean
    AS '$libdir/cube', 'g_cube_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_cube_consistent(internal, cube, integer) OWNER TO postgres;

--
-- TOC entry 249 (class 1255 OID 5297275)
-- Dependencies: 6
-- Name: g_cube_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_cube_decompress(internal) RETURNS internal
    AS '$libdir/cube', 'g_cube_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_cube_decompress(internal) OWNER TO postgres;

--
-- TOC entry 250 (class 1255 OID 5297276)
-- Dependencies: 6
-- Name: g_cube_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_cube_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/cube', 'g_cube_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.g_cube_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 251 (class 1255 OID 5297277)
-- Dependencies: 6
-- Name: g_cube_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_cube_picksplit(internal, internal) RETURNS internal
    AS '$libdir/cube', 'g_cube_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_cube_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 252 (class 1255 OID 5297278)
-- Dependencies: 1249 1249 6
-- Name: g_cube_same(cube, cube, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_cube_same(cube, cube, internal) RETURNS internal
    AS '$libdir/cube', 'g_cube_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_cube_same(cube, cube, internal) OWNER TO postgres;

--
-- TOC entry 253 (class 1255 OID 5297279)
-- Dependencies: 6 1249
-- Name: g_cube_union(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_cube_union(internal, internal) RETURNS cube
    AS '$libdir/cube', 'g_cube_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_cube_union(internal, internal) OWNER TO postgres;

--
-- TOC entry 254 (class 1255 OID 5297280)
-- Dependencies: 6
-- Name: g_int_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_int_compress(internal) RETURNS internal
    AS '$libdir/_int', 'g_int_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_int_compress(internal) OWNER TO postgres;

--
-- TOC entry 255 (class 1255 OID 5297281)
-- Dependencies: 6
-- Name: g_int_consistent(internal, integer[], integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_int_consistent(internal, integer[], integer) RETURNS boolean
    AS '$libdir/_int', 'g_int_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_int_consistent(internal, integer[], integer) OWNER TO postgres;

--
-- TOC entry 256 (class 1255 OID 5297282)
-- Dependencies: 6
-- Name: g_int_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_int_decompress(internal) RETURNS internal
    AS '$libdir/_int', 'g_int_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_int_decompress(internal) OWNER TO postgres;

--
-- TOC entry 257 (class 1255 OID 5297283)
-- Dependencies: 6
-- Name: g_int_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_int_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/_int', 'g_int_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.g_int_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 258 (class 1255 OID 5297284)
-- Dependencies: 6
-- Name: g_int_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_int_picksplit(internal, internal) RETURNS internal
    AS '$libdir/_int', 'g_int_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_int_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 259 (class 1255 OID 5297285)
-- Dependencies: 6
-- Name: g_int_same(integer[], integer[], internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_int_same(integer[], integer[], internal) RETURNS internal
    AS '$libdir/_int', 'g_int_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_int_same(integer[], integer[], internal) OWNER TO postgres;

--
-- TOC entry 260 (class 1255 OID 5297286)
-- Dependencies: 6
-- Name: g_int_union(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_int_union(internal, internal) RETURNS integer[]
    AS '$libdir/_int', 'g_int_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_int_union(internal, internal) OWNER TO postgres;

--
-- TOC entry 261 (class 1255 OID 5297287)
-- Dependencies: 6
-- Name: g_intbig_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_intbig_compress(internal) RETURNS internal
    AS '$libdir/_int', 'g_intbig_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_intbig_compress(internal) OWNER TO postgres;

--
-- TOC entry 262 (class 1255 OID 5297288)
-- Dependencies: 6
-- Name: g_intbig_consistent(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_intbig_consistent(internal, internal, integer) RETURNS boolean
    AS '$libdir/_int', 'g_intbig_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_intbig_consistent(internal, internal, integer) OWNER TO postgres;

--
-- TOC entry 263 (class 1255 OID 5297289)
-- Dependencies: 6
-- Name: g_intbig_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_intbig_decompress(internal) RETURNS internal
    AS '$libdir/_int', 'g_intbig_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_intbig_decompress(internal) OWNER TO postgres;

--
-- TOC entry 264 (class 1255 OID 5297290)
-- Dependencies: 6
-- Name: g_intbig_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_intbig_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/_int', 'g_intbig_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.g_intbig_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 265 (class 1255 OID 5297291)
-- Dependencies: 6
-- Name: g_intbig_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_intbig_picksplit(internal, internal) RETURNS internal
    AS '$libdir/_int', 'g_intbig_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_intbig_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 266 (class 1255 OID 5297292)
-- Dependencies: 6
-- Name: g_intbig_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_intbig_same(internal, internal, internal) RETURNS internal
    AS '$libdir/_int', 'g_intbig_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_intbig_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 267 (class 1255 OID 5297293)
-- Dependencies: 6
-- Name: g_intbig_union(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION g_intbig_union(internal, internal) RETURNS integer[]
    AS '$libdir/_int', 'g_intbig_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.g_intbig_union(internal, internal) OWNER TO postgres;

--
-- TOC entry 268 (class 1255 OID 5297294)
-- Dependencies: 6
-- Name: gbt_bit_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bit_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bit_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bit_compress(internal) OWNER TO postgres;

--
-- TOC entry 269 (class 1255 OID 5297295)
-- Dependencies: 6
-- Name: gbt_bit_consistent(internal, bit, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bit_consistent(internal, bit, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_bit_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bit_consistent(internal, bit, smallint) OWNER TO postgres;

--
-- TOC entry 270 (class 1255 OID 5297296)
-- Dependencies: 6
-- Name: gbt_bit_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bit_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bit_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_bit_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 271 (class 1255 OID 5297297)
-- Dependencies: 6
-- Name: gbt_bit_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bit_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bit_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bit_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 272 (class 1255 OID 5297298)
-- Dependencies: 6
-- Name: gbt_bit_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bit_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bit_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bit_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 273 (class 1255 OID 5297299)
-- Dependencies: 1332 6
-- Name: gbt_bit_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bit_union(bytea, internal) RETURNS gbtreekey_var
    AS '$libdir/btree_gist', 'gbt_bit_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bit_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 274 (class 1255 OID 5297300)
-- Dependencies: 6
-- Name: gbt_bpchar_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bpchar_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bpchar_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bpchar_compress(internal) OWNER TO postgres;

--
-- TOC entry 275 (class 1255 OID 5297301)
-- Dependencies: 6
-- Name: gbt_bpchar_consistent(internal, character, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bpchar_consistent(internal, character, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_bpchar_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bpchar_consistent(internal, character, smallint) OWNER TO postgres;

--
-- TOC entry 276 (class 1255 OID 5297302)
-- Dependencies: 6
-- Name: gbt_bytea_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bytea_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bytea_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bytea_compress(internal) OWNER TO postgres;

--
-- TOC entry 277 (class 1255 OID 5297303)
-- Dependencies: 6
-- Name: gbt_bytea_consistent(internal, bytea, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bytea_consistent(internal, bytea, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_bytea_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bytea_consistent(internal, bytea, smallint) OWNER TO postgres;

--
-- TOC entry 278 (class 1255 OID 5297304)
-- Dependencies: 6
-- Name: gbt_bytea_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bytea_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bytea_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_bytea_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 279 (class 1255 OID 5297305)
-- Dependencies: 6
-- Name: gbt_bytea_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bytea_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bytea_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bytea_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 280 (class 1255 OID 5297306)
-- Dependencies: 6
-- Name: gbt_bytea_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bytea_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_bytea_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bytea_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 281 (class 1255 OID 5297307)
-- Dependencies: 1332 6
-- Name: gbt_bytea_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_bytea_union(bytea, internal) RETURNS gbtreekey_var
    AS '$libdir/btree_gist', 'gbt_bytea_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_bytea_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 282 (class 1255 OID 5297308)
-- Dependencies: 6
-- Name: gbt_cash_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_cash_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_cash_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_cash_compress(internal) OWNER TO postgres;

--
-- TOC entry 283 (class 1255 OID 5297309)
-- Dependencies: 6
-- Name: gbt_cash_consistent(internal, money, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_cash_consistent(internal, money, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_cash_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_cash_consistent(internal, money, smallint) OWNER TO postgres;

--
-- TOC entry 284 (class 1255 OID 5297310)
-- Dependencies: 6
-- Name: gbt_cash_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_cash_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_cash_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_cash_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 285 (class 1255 OID 5297311)
-- Dependencies: 6
-- Name: gbt_cash_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_cash_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_cash_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_cash_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 286 (class 1255 OID 5297312)
-- Dependencies: 6
-- Name: gbt_cash_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_cash_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_cash_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_cash_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 287 (class 1255 OID 5297313)
-- Dependencies: 6 1329
-- Name: gbt_cash_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_cash_union(bytea, internal) RETURNS gbtreekey8
    AS '$libdir/btree_gist', 'gbt_cash_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_cash_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 288 (class 1255 OID 5297314)
-- Dependencies: 6
-- Name: gbt_date_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_date_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_date_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_date_compress(internal) OWNER TO postgres;

--
-- TOC entry 289 (class 1255 OID 5297315)
-- Dependencies: 6
-- Name: gbt_date_consistent(internal, date, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_date_consistent(internal, date, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_date_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_date_consistent(internal, date, smallint) OWNER TO postgres;

--
-- TOC entry 290 (class 1255 OID 5297316)
-- Dependencies: 6
-- Name: gbt_date_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_date_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_date_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_date_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 291 (class 1255 OID 5297317)
-- Dependencies: 6
-- Name: gbt_date_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_date_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_date_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_date_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 292 (class 1255 OID 5297318)
-- Dependencies: 6
-- Name: gbt_date_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_date_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_date_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_date_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 293 (class 1255 OID 5297319)
-- Dependencies: 6 1329
-- Name: gbt_date_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_date_union(bytea, internal) RETURNS gbtreekey8
    AS '$libdir/btree_gist', 'gbt_date_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_date_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 294 (class 1255 OID 5297320)
-- Dependencies: 6
-- Name: gbt_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_decompress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_decompress(internal) OWNER TO postgres;

--
-- TOC entry 295 (class 1255 OID 5297321)
-- Dependencies: 6
-- Name: gbt_float4_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float4_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_float4_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float4_compress(internal) OWNER TO postgres;

--
-- TOC entry 296 (class 1255 OID 5297322)
-- Dependencies: 6
-- Name: gbt_float4_consistent(internal, real, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float4_consistent(internal, real, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_float4_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float4_consistent(internal, real, smallint) OWNER TO postgres;

--
-- TOC entry 297 (class 1255 OID 5297323)
-- Dependencies: 6
-- Name: gbt_float4_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float4_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_float4_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_float4_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 298 (class 1255 OID 5297324)
-- Dependencies: 6
-- Name: gbt_float4_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float4_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_float4_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float4_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 299 (class 1255 OID 5297325)
-- Dependencies: 6
-- Name: gbt_float4_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float4_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_float4_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float4_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 300 (class 1255 OID 5297326)
-- Dependencies: 1329 6
-- Name: gbt_float4_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float4_union(bytea, internal) RETURNS gbtreekey8
    AS '$libdir/btree_gist', 'gbt_float4_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float4_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 301 (class 1255 OID 5297327)
-- Dependencies: 6
-- Name: gbt_float8_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float8_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_float8_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float8_compress(internal) OWNER TO postgres;

--
-- TOC entry 302 (class 1255 OID 5297328)
-- Dependencies: 6
-- Name: gbt_float8_consistent(internal, double precision, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float8_consistent(internal, double precision, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_float8_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float8_consistent(internal, double precision, smallint) OWNER TO postgres;

--
-- TOC entry 303 (class 1255 OID 5297329)
-- Dependencies: 6
-- Name: gbt_float8_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float8_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_float8_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_float8_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 304 (class 1255 OID 5297330)
-- Dependencies: 6
-- Name: gbt_float8_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float8_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_float8_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float8_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 305 (class 1255 OID 5297331)
-- Dependencies: 6
-- Name: gbt_float8_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float8_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_float8_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float8_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 306 (class 1255 OID 5297332)
-- Dependencies: 1319 6
-- Name: gbt_float8_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_float8_union(bytea, internal) RETURNS gbtreekey16
    AS '$libdir/btree_gist', 'gbt_float8_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_float8_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 307 (class 1255 OID 5297333)
-- Dependencies: 6
-- Name: gbt_inet_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_inet_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_inet_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_inet_compress(internal) OWNER TO postgres;

--
-- TOC entry 308 (class 1255 OID 5297334)
-- Dependencies: 6
-- Name: gbt_inet_consistent(internal, inet, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_inet_consistent(internal, inet, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_inet_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_inet_consistent(internal, inet, smallint) OWNER TO postgres;

--
-- TOC entry 309 (class 1255 OID 5297335)
-- Dependencies: 6
-- Name: gbt_inet_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_inet_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_inet_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_inet_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 310 (class 1255 OID 5297336)
-- Dependencies: 6
-- Name: gbt_inet_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_inet_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_inet_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_inet_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 311 (class 1255 OID 5297337)
-- Dependencies: 6
-- Name: gbt_inet_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_inet_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_inet_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_inet_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 312 (class 1255 OID 5297338)
-- Dependencies: 1319 6
-- Name: gbt_inet_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_inet_union(bytea, internal) RETURNS gbtreekey16
    AS '$libdir/btree_gist', 'gbt_inet_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_inet_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 313 (class 1255 OID 5297339)
-- Dependencies: 6
-- Name: gbt_int2_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int2_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int2_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int2_compress(internal) OWNER TO postgres;

--
-- TOC entry 314 (class 1255 OID 5297340)
-- Dependencies: 6
-- Name: gbt_int2_consistent(internal, smallint, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int2_consistent(internal, smallint, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_int2_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int2_consistent(internal, smallint, smallint) OWNER TO postgres;

--
-- TOC entry 315 (class 1255 OID 5297341)
-- Dependencies: 6
-- Name: gbt_int2_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int2_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int2_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_int2_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 316 (class 1255 OID 5297342)
-- Dependencies: 6
-- Name: gbt_int2_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int2_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int2_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int2_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 317 (class 1255 OID 5297343)
-- Dependencies: 6
-- Name: gbt_int2_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int2_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int2_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int2_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 318 (class 1255 OID 5297344)
-- Dependencies: 1325 6
-- Name: gbt_int2_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int2_union(bytea, internal) RETURNS gbtreekey4
    AS '$libdir/btree_gist', 'gbt_int2_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int2_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 319 (class 1255 OID 5297345)
-- Dependencies: 6
-- Name: gbt_int4_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int4_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int4_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int4_compress(internal) OWNER TO postgres;

--
-- TOC entry 320 (class 1255 OID 5297346)
-- Dependencies: 6
-- Name: gbt_int4_consistent(internal, integer, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int4_consistent(internal, integer, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_int4_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int4_consistent(internal, integer, smallint) OWNER TO postgres;

--
-- TOC entry 321 (class 1255 OID 5297347)
-- Dependencies: 6
-- Name: gbt_int4_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int4_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int4_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_int4_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 322 (class 1255 OID 5297348)
-- Dependencies: 6
-- Name: gbt_int4_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int4_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int4_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int4_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 323 (class 1255 OID 5297349)
-- Dependencies: 6
-- Name: gbt_int4_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int4_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int4_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int4_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 324 (class 1255 OID 5297350)
-- Dependencies: 1329 6
-- Name: gbt_int4_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int4_union(bytea, internal) RETURNS gbtreekey8
    AS '$libdir/btree_gist', 'gbt_int4_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int4_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 325 (class 1255 OID 5297351)
-- Dependencies: 6
-- Name: gbt_int8_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int8_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int8_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int8_compress(internal) OWNER TO postgres;

--
-- TOC entry 326 (class 1255 OID 5297352)
-- Dependencies: 6
-- Name: gbt_int8_consistent(internal, bigint, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int8_consistent(internal, bigint, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_int8_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int8_consistent(internal, bigint, smallint) OWNER TO postgres;

--
-- TOC entry 327 (class 1255 OID 5297353)
-- Dependencies: 6
-- Name: gbt_int8_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int8_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int8_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_int8_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 328 (class 1255 OID 5297354)
-- Dependencies: 6
-- Name: gbt_int8_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int8_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int8_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int8_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 329 (class 1255 OID 5297355)
-- Dependencies: 6
-- Name: gbt_int8_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int8_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_int8_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int8_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 330 (class 1255 OID 5297356)
-- Dependencies: 6 1319
-- Name: gbt_int8_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_int8_union(bytea, internal) RETURNS gbtreekey16
    AS '$libdir/btree_gist', 'gbt_int8_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_int8_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 331 (class 1255 OID 5297357)
-- Dependencies: 6
-- Name: gbt_intv_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_intv_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_intv_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_intv_compress(internal) OWNER TO postgres;

--
-- TOC entry 332 (class 1255 OID 5297358)
-- Dependencies: 6
-- Name: gbt_intv_consistent(internal, interval, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_intv_consistent(internal, interval, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_intv_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_intv_consistent(internal, interval, smallint) OWNER TO postgres;

--
-- TOC entry 333 (class 1255 OID 5297359)
-- Dependencies: 6
-- Name: gbt_intv_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_intv_decompress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_intv_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_intv_decompress(internal) OWNER TO postgres;

--
-- TOC entry 334 (class 1255 OID 5297360)
-- Dependencies: 6
-- Name: gbt_intv_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_intv_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_intv_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_intv_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 335 (class 1255 OID 5297361)
-- Dependencies: 6
-- Name: gbt_intv_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_intv_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_intv_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_intv_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 336 (class 1255 OID 5297362)
-- Dependencies: 6
-- Name: gbt_intv_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_intv_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_intv_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_intv_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 337 (class 1255 OID 5297363)
-- Dependencies: 6 1322
-- Name: gbt_intv_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_intv_union(bytea, internal) RETURNS gbtreekey32
    AS '$libdir/btree_gist', 'gbt_intv_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_intv_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 338 (class 1255 OID 5297364)
-- Dependencies: 6
-- Name: gbt_macad_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_macad_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_macad_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_macad_compress(internal) OWNER TO postgres;

--
-- TOC entry 339 (class 1255 OID 5297365)
-- Dependencies: 6
-- Name: gbt_macad_consistent(internal, macaddr, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_macad_consistent(internal, macaddr, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_macad_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_macad_consistent(internal, macaddr, smallint) OWNER TO postgres;

--
-- TOC entry 340 (class 1255 OID 5297366)
-- Dependencies: 6
-- Name: gbt_macad_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_macad_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_macad_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_macad_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 341 (class 1255 OID 5297367)
-- Dependencies: 6
-- Name: gbt_macad_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_macad_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_macad_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_macad_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 342 (class 1255 OID 5297368)
-- Dependencies: 6
-- Name: gbt_macad_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_macad_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_macad_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_macad_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 343 (class 1255 OID 5297369)
-- Dependencies: 1319 6
-- Name: gbt_macad_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_macad_union(bytea, internal) RETURNS gbtreekey16
    AS '$libdir/btree_gist', 'gbt_macad_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_macad_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 344 (class 1255 OID 5297370)
-- Dependencies: 6
-- Name: gbt_numeric_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_numeric_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_numeric_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_numeric_compress(internal) OWNER TO postgres;

--
-- TOC entry 345 (class 1255 OID 5297371)
-- Dependencies: 6
-- Name: gbt_numeric_consistent(internal, numeric, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_numeric_consistent(internal, numeric, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_numeric_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_numeric_consistent(internal, numeric, smallint) OWNER TO postgres;

--
-- TOC entry 346 (class 1255 OID 5297372)
-- Dependencies: 6
-- Name: gbt_numeric_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_numeric_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_numeric_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_numeric_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 347 (class 1255 OID 5297373)
-- Dependencies: 6
-- Name: gbt_numeric_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_numeric_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_numeric_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_numeric_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 348 (class 1255 OID 5297374)
-- Dependencies: 6
-- Name: gbt_numeric_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_numeric_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_numeric_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_numeric_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 349 (class 1255 OID 5297375)
-- Dependencies: 6 1332
-- Name: gbt_numeric_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_numeric_union(bytea, internal) RETURNS gbtreekey_var
    AS '$libdir/btree_gist', 'gbt_numeric_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_numeric_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 350 (class 1255 OID 5297376)
-- Dependencies: 6
-- Name: gbt_oid_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_oid_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_oid_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_oid_compress(internal) OWNER TO postgres;

--
-- TOC entry 351 (class 1255 OID 5297377)
-- Dependencies: 6
-- Name: gbt_oid_consistent(internal, oid, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_oid_consistent(internal, oid, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_oid_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_oid_consistent(internal, oid, smallint) OWNER TO postgres;

--
-- TOC entry 352 (class 1255 OID 5297378)
-- Dependencies: 6
-- Name: gbt_oid_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_oid_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_oid_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_oid_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 353 (class 1255 OID 5297379)
-- Dependencies: 6
-- Name: gbt_oid_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_oid_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_oid_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_oid_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 354 (class 1255 OID 5297380)
-- Dependencies: 6
-- Name: gbt_oid_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_oid_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_oid_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_oid_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 355 (class 1255 OID 5297381)
-- Dependencies: 6 1329
-- Name: gbt_oid_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_oid_union(bytea, internal) RETURNS gbtreekey8
    AS '$libdir/btree_gist', 'gbt_oid_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_oid_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 356 (class 1255 OID 5297382)
-- Dependencies: 6
-- Name: gbt_text_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_text_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_text_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_text_compress(internal) OWNER TO postgres;

--
-- TOC entry 357 (class 1255 OID 5297383)
-- Dependencies: 6
-- Name: gbt_text_consistent(internal, text, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_text_consistent(internal, text, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_text_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_text_consistent(internal, text, smallint) OWNER TO postgres;

--
-- TOC entry 358 (class 1255 OID 5297384)
-- Dependencies: 6
-- Name: gbt_text_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_text_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_text_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_text_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 359 (class 1255 OID 5297385)
-- Dependencies: 6
-- Name: gbt_text_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_text_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_text_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_text_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 360 (class 1255 OID 5297386)
-- Dependencies: 6
-- Name: gbt_text_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_text_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_text_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_text_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 361 (class 1255 OID 5297387)
-- Dependencies: 1332 6
-- Name: gbt_text_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_text_union(bytea, internal) RETURNS gbtreekey_var
    AS '$libdir/btree_gist', 'gbt_text_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_text_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 362 (class 1255 OID 5297388)
-- Dependencies: 6
-- Name: gbt_time_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_time_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_time_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_time_compress(internal) OWNER TO postgres;

--
-- TOC entry 363 (class 1255 OID 5297389)
-- Dependencies: 6
-- Name: gbt_time_consistent(internal, time without time zone, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_time_consistent(internal, time without time zone, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_time_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_time_consistent(internal, time without time zone, smallint) OWNER TO postgres;

--
-- TOC entry 364 (class 1255 OID 5297390)
-- Dependencies: 6
-- Name: gbt_time_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_time_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_time_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_time_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 365 (class 1255 OID 5297391)
-- Dependencies: 6
-- Name: gbt_time_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_time_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_time_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_time_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 366 (class 1255 OID 5297392)
-- Dependencies: 6
-- Name: gbt_time_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_time_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_time_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_time_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 367 (class 1255 OID 5297393)
-- Dependencies: 1319 6
-- Name: gbt_time_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_time_union(bytea, internal) RETURNS gbtreekey16
    AS '$libdir/btree_gist', 'gbt_time_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_time_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 368 (class 1255 OID 5297394)
-- Dependencies: 6
-- Name: gbt_timetz_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_timetz_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_timetz_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_timetz_compress(internal) OWNER TO postgres;

--
-- TOC entry 369 (class 1255 OID 5297395)
-- Dependencies: 6
-- Name: gbt_timetz_consistent(internal, time with time zone, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_timetz_consistent(internal, time with time zone, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_timetz_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_timetz_consistent(internal, time with time zone, smallint) OWNER TO postgres;

--
-- TOC entry 370 (class 1255 OID 5297396)
-- Dependencies: 6
-- Name: gbt_ts_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_ts_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_ts_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_ts_compress(internal) OWNER TO postgres;

--
-- TOC entry 371 (class 1255 OID 5297397)
-- Dependencies: 6
-- Name: gbt_ts_consistent(internal, timestamp without time zone, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_ts_consistent(internal, timestamp without time zone, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_ts_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_ts_consistent(internal, timestamp without time zone, smallint) OWNER TO postgres;

--
-- TOC entry 372 (class 1255 OID 5297398)
-- Dependencies: 6
-- Name: gbt_ts_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_ts_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_ts_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gbt_ts_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 373 (class 1255 OID 5297399)
-- Dependencies: 6
-- Name: gbt_ts_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_ts_picksplit(internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_ts_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_ts_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 374 (class 1255 OID 5297400)
-- Dependencies: 6
-- Name: gbt_ts_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_ts_same(internal, internal, internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_ts_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_ts_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 375 (class 1255 OID 5297401)
-- Dependencies: 1319 6
-- Name: gbt_ts_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_ts_union(bytea, internal) RETURNS gbtreekey16
    AS '$libdir/btree_gist', 'gbt_ts_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_ts_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 376 (class 1255 OID 5297402)
-- Dependencies: 6
-- Name: gbt_tstz_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_tstz_compress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_tstz_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_tstz_compress(internal) OWNER TO postgres;

--
-- TOC entry 377 (class 1255 OID 5297403)
-- Dependencies: 6
-- Name: gbt_tstz_consistent(internal, timestamp with time zone, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_tstz_consistent(internal, timestamp with time zone, smallint) RETURNS boolean
    AS '$libdir/btree_gist', 'gbt_tstz_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_tstz_consistent(internal, timestamp with time zone, smallint) OWNER TO postgres;

--
-- TOC entry 378 (class 1255 OID 5297404)
-- Dependencies: 6
-- Name: gbt_var_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gbt_var_decompress(internal) RETURNS internal
    AS '$libdir/btree_gist', 'gbt_var_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gbt_var_decompress(internal) OWNER TO postgres;

--
-- TOC entry 379 (class 1255 OID 5297405)
-- Dependencies: 6
-- Name: gc_to_sec(double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gc_to_sec(double precision) RETURNS double precision
    AS $_$SELECT CASE WHEN $1 < 0 THEN 0::float8 WHEN $1/earth() > pi() THEN 2*earth() ELSE 2*earth()*sin($1/(2*earth())) END$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.gc_to_sec(double precision) OWNER TO postgres;

--
-- TOC entry 380 (class 1255 OID 5297406)
-- Dependencies: 6
-- Name: gen_random_bytes(integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gen_random_bytes(integer) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_random_bytes'
    LANGUAGE c STRICT;


ALTER FUNCTION public.gen_random_bytes(integer) OWNER TO postgres;

--
-- TOC entry 381 (class 1255 OID 5297407)
-- Dependencies: 6
-- Name: gen_salt(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gen_salt(text) RETURNS text
    AS '$libdir/pgcrypto', 'pg_gen_salt'
    LANGUAGE c STRICT;


ALTER FUNCTION public.gen_salt(text) OWNER TO postgres;

--
-- TOC entry 382 (class 1255 OID 5297408)
-- Dependencies: 6
-- Name: gen_salt(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gen_salt(text, integer) RETURNS text
    AS '$libdir/pgcrypto', 'pg_gen_salt_rounds'
    LANGUAGE c STRICT;


ALTER FUNCTION public.gen_salt(text, integer) OWNER TO postgres;

--
-- TOC entry 383 (class 1255 OID 5297409)
-- Dependencies: 6
-- Name: geo_distance(point, point); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION geo_distance(point, point) RETURNS double precision
    AS '$libdir/earthdistance', 'geo_distance'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.geo_distance(point, point) OWNER TO postgres;

--
-- TOC entry 384 (class 1255 OID 5297447)
-- Dependencies: 6 1860
-- Name: get_proj4_from_srid(integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION get_proj4_from_srid(integer) RETURNS text
    AS $_$
BEGIN
	RETURN proj4text::text FROM spatial_ref_sys WHERE srid= $1;
END;
$_$
    LANGUAGE plpgsql IMMUTABLE STRICT;


ALTER FUNCTION public.get_proj4_from_srid(integer) OWNER TO postgres;

--
-- TOC entry 385 (class 1255 OID 5297448)
-- Dependencies: 6
-- Name: get_raw_page(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION get_raw_page(text, integer) RETURNS bytea
    AS '$libdir/pageinspect', 'get_raw_page'
    LANGUAGE c STRICT;


ALTER FUNCTION public.get_raw_page(text, integer) OWNER TO postgres;

--
-- TOC entry 386 (class 1255 OID 5297449)
-- Dependencies: 6
-- Name: get_timetravel(name); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION get_timetravel(name) RETURNS integer
    AS '$libdir/timetravel', 'get_timetravel'
    LANGUAGE c STRICT;


ALTER FUNCTION public.get_timetravel(name) OWNER TO postgres;

--
-- TOC entry 387 (class 1255 OID 5297453)
-- Dependencies: 6
-- Name: ghstore_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_compress(internal) RETURNS internal
    AS '$libdir/hstore', 'ghstore_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ghstore_compress(internal) OWNER TO postgres;

--
-- TOC entry 388 (class 1255 OID 5297454)
-- Dependencies: 6
-- Name: ghstore_consistent(internal, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_consistent(internal, internal, integer) RETURNS boolean
    AS '$libdir/hstore', 'ghstore_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ghstore_consistent(internal, internal, integer) OWNER TO postgres;

--
-- TOC entry 389 (class 1255 OID 5297455)
-- Dependencies: 6
-- Name: ghstore_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_decompress(internal) RETURNS internal
    AS '$libdir/hstore', 'ghstore_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ghstore_decompress(internal) OWNER TO postgres;

--
-- TOC entry 390 (class 1255 OID 5297456)
-- Dependencies: 6
-- Name: ghstore_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/hstore', 'ghstore_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ghstore_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 391 (class 1255 OID 5297457)
-- Dependencies: 6
-- Name: ghstore_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_picksplit(internal, internal) RETURNS internal
    AS '$libdir/hstore', 'ghstore_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ghstore_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 392 (class 1255 OID 5297458)
-- Dependencies: 6
-- Name: ghstore_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_same(internal, internal, internal) RETURNS internal
    AS '$libdir/hstore', 'ghstore_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ghstore_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 393 (class 1255 OID 5297459)
-- Dependencies: 6
-- Name: ghstore_union(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ghstore_union(internal, internal) RETURNS internal
    AS '$libdir/hstore', 'ghstore_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ghstore_union(internal, internal) OWNER TO postgres;

--
-- TOC entry 394 (class 1255 OID 5297460)
-- Dependencies: 6
-- Name: gin_consistent_hstore(internal, smallint, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gin_consistent_hstore(internal, smallint, internal) RETURNS internal
    AS '$libdir/hstore', 'gin_consistent_hstore'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gin_consistent_hstore(internal, smallint, internal) OWNER TO postgres;

--
-- TOC entry 395 (class 1255 OID 5297461)
-- Dependencies: 6
-- Name: gin_extract_hstore(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gin_extract_hstore(internal, internal) RETURNS internal
    AS '$libdir/hstore', 'gin_extract_hstore'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gin_extract_hstore(internal, internal) OWNER TO postgres;

--
-- TOC entry 396 (class 1255 OID 5297462)
-- Dependencies: 6
-- Name: gin_extract_hstore_query(internal, internal, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gin_extract_hstore_query(internal, internal, smallint) RETURNS internal
    AS '$libdir/hstore', 'gin_extract_hstore_query'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gin_extract_hstore_query(internal, internal, smallint) OWNER TO postgres;

--
-- TOC entry 397 (class 1255 OID 5297463)
-- Dependencies: 6
-- Name: gin_extract_trgm(text, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gin_extract_trgm(text, internal) RETURNS internal
    AS '$libdir/pg_trgm', 'gin_extract_trgm'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gin_extract_trgm(text, internal) OWNER TO postgres;

--
-- TOC entry 398 (class 1255 OID 5297464)
-- Dependencies: 6
-- Name: gin_extract_trgm(text, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gin_extract_trgm(text, internal, internal) RETURNS internal
    AS '$libdir/pg_trgm', 'gin_extract_trgm'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gin_extract_trgm(text, internal, internal) OWNER TO postgres;

--
-- TOC entry 399 (class 1255 OID 5297465)
-- Dependencies: 6
-- Name: gin_trgm_consistent(internal, internal, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gin_trgm_consistent(internal, internal, text) RETURNS internal
    AS '$libdir/pg_trgm', 'gin_trgm_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gin_trgm_consistent(internal, internal, text) OWNER TO postgres;

--
-- TOC entry 400 (class 1255 OID 5297466)
-- Dependencies: 6
-- Name: ginint4_consistent(internal, smallint, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ginint4_consistent(internal, smallint, internal) RETURNS internal
    AS '$libdir/_int', 'ginint4_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ginint4_consistent(internal, smallint, internal) OWNER TO postgres;

--
-- TOC entry 401 (class 1255 OID 5297467)
-- Dependencies: 6
-- Name: ginint4_queryextract(internal, internal, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ginint4_queryextract(internal, internal, smallint) RETURNS internal
    AS '$libdir/_int', 'ginint4_queryextract'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ginint4_queryextract(internal, internal, smallint) OWNER TO postgres;

--
-- TOC entry 402 (class 1255 OID 5297468)
-- Dependencies: 6
-- Name: gseg_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gseg_compress(internal) RETURNS internal
    AS '$libdir/seg', 'gseg_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gseg_compress(internal) OWNER TO postgres;

--
-- TOC entry 403 (class 1255 OID 5297469)
-- Dependencies: 1494 6
-- Name: gseg_consistent(internal, seg, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gseg_consistent(internal, seg, integer) RETURNS boolean
    AS '$libdir/seg', 'gseg_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gseg_consistent(internal, seg, integer) OWNER TO postgres;

--
-- TOC entry 404 (class 1255 OID 5297470)
-- Dependencies: 6
-- Name: gseg_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gseg_decompress(internal) RETURNS internal
    AS '$libdir/seg', 'gseg_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gseg_decompress(internal) OWNER TO postgres;

--
-- TOC entry 405 (class 1255 OID 5297471)
-- Dependencies: 6
-- Name: gseg_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gseg_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/seg', 'gseg_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gseg_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 406 (class 1255 OID 5297472)
-- Dependencies: 6
-- Name: gseg_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gseg_picksplit(internal, internal) RETURNS internal
    AS '$libdir/seg', 'gseg_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gseg_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 407 (class 1255 OID 5297473)
-- Dependencies: 1494 1494 6
-- Name: gseg_same(seg, seg, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gseg_same(seg, seg, internal) RETURNS internal
    AS '$libdir/seg', 'gseg_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gseg_same(seg, seg, internal) OWNER TO postgres;

--
-- TOC entry 408 (class 1255 OID 5297474)
-- Dependencies: 1494 6
-- Name: gseg_union(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gseg_union(internal, internal) RETURNS seg
    AS '$libdir/seg', 'gseg_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gseg_union(internal, internal) OWNER TO postgres;

--
-- TOC entry 409 (class 1255 OID 5297475)
-- Dependencies: 6
-- Name: gtrgm_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_compress(internal) RETURNS internal
    AS '$libdir/pg_trgm', 'gtrgm_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gtrgm_compress(internal) OWNER TO postgres;

--
-- TOC entry 410 (class 1255 OID 5297476)
-- Dependencies: 1345 6
-- Name: gtrgm_consistent(gtrgm, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_consistent(gtrgm, internal, integer) RETURNS boolean
    AS '$libdir/pg_trgm', 'gtrgm_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gtrgm_consistent(gtrgm, internal, integer) OWNER TO postgres;

--
-- TOC entry 411 (class 1255 OID 5297477)
-- Dependencies: 6
-- Name: gtrgm_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_decompress(internal) RETURNS internal
    AS '$libdir/pg_trgm', 'gtrgm_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gtrgm_decompress(internal) OWNER TO postgres;

--
-- TOC entry 412 (class 1255 OID 5297478)
-- Dependencies: 6
-- Name: gtrgm_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/pg_trgm', 'gtrgm_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.gtrgm_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 413 (class 1255 OID 5297479)
-- Dependencies: 6
-- Name: gtrgm_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_picksplit(internal, internal) RETURNS internal
    AS '$libdir/pg_trgm', 'gtrgm_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gtrgm_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 414 (class 1255 OID 5297480)
-- Dependencies: 1345 1345 6
-- Name: gtrgm_same(gtrgm, gtrgm, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_same(gtrgm, gtrgm, internal) RETURNS internal
    AS '$libdir/pg_trgm', 'gtrgm_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gtrgm_same(gtrgm, gtrgm, internal) OWNER TO postgres;

--
-- TOC entry 415 (class 1255 OID 5297481)
-- Dependencies: 6
-- Name: gtrgm_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gtrgm_union(bytea, internal) RETURNS integer[]
    AS '$libdir/pg_trgm', 'gtrgm_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.gtrgm_union(bytea, internal) OWNER TO postgres;

--
-- TOC entry 416 (class 1255 OID 5297483)
-- Dependencies: 6 1293
-- Name: hashean13(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hashean13(ean13) RETURNS integer
    AS $$hashint8$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.hashean13(ean13) OWNER TO postgres;

--
-- TOC entry 417 (class 1255 OID 5297484)
-- Dependencies: 6 1373
-- Name: hashisbn(isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hashisbn(isbn) RETURNS integer
    AS $$hashint8$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.hashisbn(isbn) OWNER TO postgres;

--
-- TOC entry 418 (class 1255 OID 5297485)
-- Dependencies: 6 1376
-- Name: hashisbn13(isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hashisbn13(isbn13) RETURNS integer
    AS $$hashint8$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.hashisbn13(isbn13) OWNER TO postgres;

--
-- TOC entry 419 (class 1255 OID 5297486)
-- Dependencies: 6 1380
-- Name: hashismn(ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hashismn(ismn) RETURNS integer
    AS $$hashint8$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.hashismn(ismn) OWNER TO postgres;

--
-- TOC entry 420 (class 1255 OID 5297487)
-- Dependencies: 1383 6
-- Name: hashismn13(ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hashismn13(ismn13) RETURNS integer
    AS $$hashint8$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.hashismn13(ismn13) OWNER TO postgres;

--
-- TOC entry 421 (class 1255 OID 5297488)
-- Dependencies: 6 1385
-- Name: hashissn(issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hashissn(issn) RETURNS integer
    AS $$hashint8$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.hashissn(issn) OWNER TO postgres;

--
-- TOC entry 422 (class 1255 OID 5297489)
-- Dependencies: 1388 6
-- Name: hashissn13(issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hashissn13(issn13) RETURNS integer
    AS $$hashint8$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.hashissn13(issn13) OWNER TO postgres;

--
-- TOC entry 423 (class 1255 OID 5297490)
-- Dependencies: 6 1592
-- Name: hashupc(upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hashupc(upc) RETURNS integer
    AS $$hashint8$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.hashupc(upc) OWNER TO postgres;

--
-- TOC entry 424 (class 1255 OID 5297491)
-- Dependencies: 6
-- Name: heap_page_items(bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION heap_page_items(page bytea, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 smallint, OUT t_infomask smallint, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid) RETURNS SETOF record
    AS '$libdir/pageinspect', 'heap_page_items'
    LANGUAGE c STRICT;


ALTER FUNCTION public.heap_page_items(page bytea, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 smallint, OUT t_infomask smallint, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid) OWNER TO postgres;

--
-- TOC entry 425 (class 1255 OID 5297495)
-- Dependencies: 6
-- Name: hmac(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hmac(text, text, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_hmac'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.hmac(text, text, text) OWNER TO postgres;

--
-- TOC entry 426 (class 1255 OID 5297496)
-- Dependencies: 6
-- Name: hmac(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hmac(bytea, bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pg_hmac'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.hmac(bytea, bytea, text) OWNER TO postgres;

--
-- TOC entry 427 (class 1255 OID 5297497)
-- Dependencies: 1348 6 1348 1348
-- Name: hs_concat(hstore, hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hs_concat(hstore, hstore) RETURNS hstore
    AS '$libdir/hstore', 'hs_concat'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.hs_concat(hstore, hstore) OWNER TO postgres;

--
-- TOC entry 428 (class 1255 OID 5297498)
-- Dependencies: 1348 1348 6
-- Name: hs_contained(hstore, hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hs_contained(hstore, hstore) RETURNS boolean
    AS '$libdir/hstore', 'hs_contained'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.hs_contained(hstore, hstore) OWNER TO postgres;

--
-- TOC entry 429 (class 1255 OID 5297499)
-- Dependencies: 1348 6 1348
-- Name: hs_contains(hstore, hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hs_contains(hstore, hstore) RETURNS boolean
    AS '$libdir/hstore', 'hs_contains'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.hs_contains(hstore, hstore) OWNER TO postgres;

--
-- TOC entry 430 (class 1255 OID 5297500)
-- Dependencies: 6
-- Name: icount(integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION icount(integer[]) RETURNS integer
    AS '$libdir/_int', 'icount'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.icount(integer[]) OWNER TO postgres;

--
-- TOC entry 431 (class 1255 OID 5297501)
-- Dependencies: 6
-- Name: idx(integer[], integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION idx(integer[], integer) RETURNS integer
    AS '$libdir/_int', 'idx'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.idx(integer[], integer) OWNER TO postgres;

--
-- TOC entry 432 (class 1255 OID 5297502)
-- Dependencies: 1410 1410 6
-- Name: index(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION index(ltree, ltree) RETURNS integer
    AS '$libdir/ltree', 'ltree_index'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.index(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 433 (class 1255 OID 5297503)
-- Dependencies: 1410 6 1410
-- Name: index(ltree, ltree, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION index(ltree, ltree, integer) RETURNS integer
    AS '$libdir/ltree', 'ltree_index'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.index(ltree, ltree, integer) OWNER TO postgres;

--
-- TOC entry 434 (class 1255 OID 5297504)
-- Dependencies: 6
-- Name: insert_username(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION insert_username() RETURNS trigger
    AS '$libdir/insert_username', 'insert_username'
    LANGUAGE c;


ALTER FUNCTION public.insert_username() OWNER TO postgres;

--
-- TOC entry 435 (class 1255 OID 5297505)
-- Dependencies: 6
-- Name: int_agg_final_array(integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION int_agg_final_array(integer[]) RETURNS integer[]
    AS '$libdir/int_aggregate', 'int_agg_final_array'
    LANGUAGE c;


ALTER FUNCTION public.int_agg_final_array(integer[]) OWNER TO postgres;

--
-- TOC entry 436 (class 1255 OID 5297506)
-- Dependencies: 6
-- Name: int_agg_state(integer[], integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION int_agg_state(integer[], integer) RETURNS integer[]
    AS '$libdir/int_aggregate', 'int_agg_state'
    LANGUAGE c;


ALTER FUNCTION public.int_agg_state(integer[], integer) OWNER TO postgres;

--
-- TOC entry 437 (class 1255 OID 5297507)
-- Dependencies: 6
-- Name: int_array_enum(integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION int_array_enum(integer[]) RETURNS SETOF integer
    AS '$libdir/int_aggregate', 'int_enum'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.int_array_enum(integer[]) OWNER TO postgres;

--
-- TOC entry 438 (class 1255 OID 5297508)
-- Dependencies: 6
-- Name: intarray_del_elem(integer[], integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION intarray_del_elem(integer[], integer) RETURNS integer[]
    AS '$libdir/_int', 'intarray_del_elem'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.intarray_del_elem(integer[], integer) OWNER TO postgres;

--
-- TOC entry 439 (class 1255 OID 5297509)
-- Dependencies: 6
-- Name: intarray_push_array(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION intarray_push_array(integer[], integer[]) RETURNS integer[]
    AS '$libdir/_int', 'intarray_push_array'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.intarray_push_array(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 440 (class 1255 OID 5297510)
-- Dependencies: 6
-- Name: intarray_push_elem(integer[], integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION intarray_push_elem(integer[], integer) RETURNS integer[]
    AS '$libdir/_int', 'intarray_push_elem'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.intarray_push_elem(integer[], integer) OWNER TO postgres;

--
-- TOC entry 441 (class 1255 OID 5297514)
-- Dependencies: 6
-- Name: intset(integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION intset(integer) RETURNS integer[]
    AS '$libdir/_int', 'intset'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.intset(integer) OWNER TO postgres;

--
-- TOC entry 442 (class 1255 OID 5297515)
-- Dependencies: 6
-- Name: intset_subtract(integer[], integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION intset_subtract(integer[], integer[]) RETURNS integer[]
    AS '$libdir/_int', 'intset_subtract'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.intset_subtract(integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 443 (class 1255 OID 5297516)
-- Dependencies: 6
-- Name: intset_union_elem(integer[], integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION intset_union_elem(integer[], integer) RETURNS integer[]
    AS '$libdir/_int', 'intset_union_elem'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.intset_union_elem(integer[], integer) OWNER TO postgres;

--
-- TOC entry 444 (class 1255 OID 5297517)
-- Dependencies: 1293 6
-- Name: is_valid(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_valid(ean13) RETURNS boolean
    AS '$libdir/isn', 'is_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.is_valid(ean13) OWNER TO postgres;

--
-- TOC entry 445 (class 1255 OID 5297518)
-- Dependencies: 1376 6
-- Name: is_valid(isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_valid(isbn13) RETURNS boolean
    AS '$libdir/isn', 'is_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.is_valid(isbn13) OWNER TO postgres;

--
-- TOC entry 446 (class 1255 OID 5297519)
-- Dependencies: 6 1383
-- Name: is_valid(ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_valid(ismn13) RETURNS boolean
    AS '$libdir/isn', 'is_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.is_valid(ismn13) OWNER TO postgres;

--
-- TOC entry 447 (class 1255 OID 5297520)
-- Dependencies: 6 1388
-- Name: is_valid(issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_valid(issn13) RETURNS boolean
    AS '$libdir/isn', 'is_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.is_valid(issn13) OWNER TO postgres;

--
-- TOC entry 448 (class 1255 OID 5297521)
-- Dependencies: 6 1373
-- Name: is_valid(isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_valid(isbn) RETURNS boolean
    AS '$libdir/isn', 'is_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.is_valid(isbn) OWNER TO postgres;

--
-- TOC entry 449 (class 1255 OID 5297522)
-- Dependencies: 1380 6
-- Name: is_valid(ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_valid(ismn) RETURNS boolean
    AS '$libdir/isn', 'is_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.is_valid(ismn) OWNER TO postgres;

--
-- TOC entry 450 (class 1255 OID 5297523)
-- Dependencies: 1385 6
-- Name: is_valid(issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_valid(issn) RETURNS boolean
    AS '$libdir/isn', 'is_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.is_valid(issn) OWNER TO postgres;

--
-- TOC entry 451 (class 1255 OID 5297524)
-- Dependencies: 1592 6
-- Name: is_valid(upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_valid(upc) RETURNS boolean
    AS '$libdir/isn', 'is_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.is_valid(upc) OWNER TO postgres;

--
-- TOC entry 452 (class 1255 OID 5297525)
-- Dependencies: 6 1293 1373
-- Name: isbn(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isbn(ean13) RETURNS isbn
    AS '$libdir/isn', 'isbn_cast_from_ean13'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isbn(ean13) OWNER TO postgres;

--
-- TOC entry 453 (class 1255 OID 5297526)
-- Dependencies: 1376 6 1293
-- Name: isbn13(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isbn13(ean13) RETURNS isbn13
    AS '$libdir/isn', 'isbn_cast_from_ean13'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isbn13(ean13) OWNER TO postgres;

--
-- TOC entry 454 (class 1255 OID 5297528)
-- Dependencies: 6 1348
-- Name: isdefined(hstore, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isdefined(hstore, text) RETURNS boolean
    AS '$libdir/hstore', 'defined'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isdefined(hstore, text) OWNER TO postgres;

--
-- TOC entry 455 (class 1255 OID 5297530)
-- Dependencies: 6 1348
-- Name: isexists(hstore, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isexists(hstore, text) RETURNS boolean
    AS '$libdir/hstore', 'exists'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isexists(hstore, text) OWNER TO postgres;

--
-- TOC entry 456 (class 1255 OID 5297531)
-- Dependencies: 1293 1380 6
-- Name: ismn(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ismn(ean13) RETURNS ismn
    AS '$libdir/isn', 'ismn_cast_from_ean13'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ismn(ean13) OWNER TO postgres;

--
-- TOC entry 457 (class 1255 OID 5297532)
-- Dependencies: 6 1383 1293
-- Name: ismn13(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ismn13(ean13) RETURNS ismn13
    AS '$libdir/isn', 'ismn_cast_from_ean13'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ismn13(ean13) OWNER TO postgres;

--
-- TOC entry 458 (class 1255 OID 5297533)
-- Dependencies: 6
-- Name: isn_weak(boolean); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isn_weak(boolean) RETURNS boolean
    AS '$libdir/isn', 'accept_weak_input'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isn_weak(boolean) OWNER TO postgres;

--
-- TOC entry 459 (class 1255 OID 5297534)
-- Dependencies: 6
-- Name: isn_weak(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isn_weak() RETURNS boolean
    AS '$libdir/isn', 'weak_input_status'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.isn_weak() OWNER TO postgres;

--
-- TOC entry 460 (class 1255 OID 5297535)
-- Dependencies: 1293 6 1293
-- Name: isneq(ean13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ean13, ean13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ean13, ean13) OWNER TO postgres;

--
-- TOC entry 461 (class 1255 OID 5297536)
-- Dependencies: 1376 1293 6
-- Name: isneq(ean13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ean13, isbn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 462 (class 1255 OID 5297537)
-- Dependencies: 6 1383 1293
-- Name: isneq(ean13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ean13, ismn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 463 (class 1255 OID 5297538)
-- Dependencies: 1293 6 1388
-- Name: isneq(ean13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ean13, issn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ean13, issn13) OWNER TO postgres;

--
-- TOC entry 464 (class 1255 OID 5297539)
-- Dependencies: 6 1293 1373
-- Name: isneq(ean13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ean13, isbn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ean13, isbn) OWNER TO postgres;

--
-- TOC entry 465 (class 1255 OID 5297540)
-- Dependencies: 1380 1293 6
-- Name: isneq(ean13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ean13, ismn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ean13, ismn) OWNER TO postgres;

--
-- TOC entry 466 (class 1255 OID 5297541)
-- Dependencies: 1293 6 1385
-- Name: isneq(ean13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ean13, issn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ean13, issn) OWNER TO postgres;

--
-- TOC entry 467 (class 1255 OID 5297542)
-- Dependencies: 6 1293 1592
-- Name: isneq(ean13, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ean13, upc) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ean13, upc) OWNER TO postgres;

--
-- TOC entry 468 (class 1255 OID 5297543)
-- Dependencies: 6 1376 1376
-- Name: isneq(isbn13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(isbn13, isbn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 469 (class 1255 OID 5297544)
-- Dependencies: 6 1376 1373
-- Name: isneq(isbn13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(isbn13, isbn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 470 (class 1255 OID 5297545)
-- Dependencies: 6 1376 1293
-- Name: isneq(isbn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(isbn13, ean13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 471 (class 1255 OID 5297546)
-- Dependencies: 6 1373 1373
-- Name: isneq(isbn, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(isbn, isbn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(isbn, isbn) OWNER TO postgres;

--
-- TOC entry 472 (class 1255 OID 5297547)
-- Dependencies: 6 1373 1376
-- Name: isneq(isbn, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(isbn, isbn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 473 (class 1255 OID 5297548)
-- Dependencies: 6 1373 1293
-- Name: isneq(isbn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(isbn, ean13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(isbn, ean13) OWNER TO postgres;

--
-- TOC entry 474 (class 1255 OID 5297549)
-- Dependencies: 6 1383 1383
-- Name: isneq(ismn13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ismn13, ismn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 475 (class 1255 OID 5297550)
-- Dependencies: 6 1383 1380
-- Name: isneq(ismn13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ismn13, ismn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 476 (class 1255 OID 5297551)
-- Dependencies: 6 1383 1293
-- Name: isneq(ismn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ismn13, ean13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 477 (class 1255 OID 5297552)
-- Dependencies: 6 1380 1380
-- Name: isneq(ismn, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ismn, ismn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ismn, ismn) OWNER TO postgres;

--
-- TOC entry 478 (class 1255 OID 5297553)
-- Dependencies: 6 1380 1383
-- Name: isneq(ismn, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ismn, ismn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 479 (class 1255 OID 5297554)
-- Dependencies: 6 1380 1293
-- Name: isneq(ismn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(ismn, ean13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(ismn, ean13) OWNER TO postgres;

--
-- TOC entry 480 (class 1255 OID 5297555)
-- Dependencies: 6 1388 1388
-- Name: isneq(issn13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(issn13, issn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(issn13, issn13) OWNER TO postgres;

--
-- TOC entry 481 (class 1255 OID 5297556)
-- Dependencies: 6 1388 1385
-- Name: isneq(issn13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(issn13, issn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(issn13, issn) OWNER TO postgres;

--
-- TOC entry 482 (class 1255 OID 5297557)
-- Dependencies: 6 1388 1293
-- Name: isneq(issn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(issn13, ean13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(issn13, ean13) OWNER TO postgres;

--
-- TOC entry 483 (class 1255 OID 5297558)
-- Dependencies: 6 1385 1385
-- Name: isneq(issn, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(issn, issn) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(issn, issn) OWNER TO postgres;

--
-- TOC entry 484 (class 1255 OID 5297559)
-- Dependencies: 6 1385 1388
-- Name: isneq(issn, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(issn, issn13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(issn, issn13) OWNER TO postgres;

--
-- TOC entry 485 (class 1255 OID 5297560)
-- Dependencies: 6 1385 1293
-- Name: isneq(issn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(issn, ean13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(issn, ean13) OWNER TO postgres;

--
-- TOC entry 486 (class 1255 OID 5297561)
-- Dependencies: 6 1592 1592
-- Name: isneq(upc, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(upc, upc) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(upc, upc) OWNER TO postgres;

--
-- TOC entry 487 (class 1255 OID 5297562)
-- Dependencies: 6 1592 1293
-- Name: isneq(upc, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isneq(upc, ean13) RETURNS boolean
    AS $$int8eq$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isneq(upc, ean13) OWNER TO postgres;

--
-- TOC entry 488 (class 1255 OID 5297563)
-- Dependencies: 6 1293 1293
-- Name: isnge(ean13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ean13, ean13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ean13, ean13) OWNER TO postgres;

--
-- TOC entry 489 (class 1255 OID 5297564)
-- Dependencies: 6 1293 1376
-- Name: isnge(ean13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ean13, isbn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 490 (class 1255 OID 5297565)
-- Dependencies: 6 1293 1383
-- Name: isnge(ean13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ean13, ismn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 491 (class 1255 OID 5297566)
-- Dependencies: 6 1293 1388
-- Name: isnge(ean13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ean13, issn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ean13, issn13) OWNER TO postgres;

--
-- TOC entry 492 (class 1255 OID 5297567)
-- Dependencies: 6 1293 1373
-- Name: isnge(ean13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ean13, isbn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ean13, isbn) OWNER TO postgres;

--
-- TOC entry 493 (class 1255 OID 5297568)
-- Dependencies: 6 1293 1380
-- Name: isnge(ean13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ean13, ismn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ean13, ismn) OWNER TO postgres;

--
-- TOC entry 494 (class 1255 OID 5297569)
-- Dependencies: 6 1293 1385
-- Name: isnge(ean13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ean13, issn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ean13, issn) OWNER TO postgres;

--
-- TOC entry 495 (class 1255 OID 5297570)
-- Dependencies: 6 1293 1592
-- Name: isnge(ean13, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ean13, upc) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ean13, upc) OWNER TO postgres;

--
-- TOC entry 496 (class 1255 OID 5297571)
-- Dependencies: 6 1376 1376
-- Name: isnge(isbn13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(isbn13, isbn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 497 (class 1255 OID 5297572)
-- Dependencies: 6 1376 1373
-- Name: isnge(isbn13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(isbn13, isbn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 498 (class 1255 OID 5297573)
-- Dependencies: 6 1376 1293
-- Name: isnge(isbn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(isbn13, ean13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 499 (class 1255 OID 5297574)
-- Dependencies: 6 1373 1373
-- Name: isnge(isbn, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(isbn, isbn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(isbn, isbn) OWNER TO postgres;

--
-- TOC entry 500 (class 1255 OID 5297575)
-- Dependencies: 6 1373 1376
-- Name: isnge(isbn, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(isbn, isbn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 501 (class 1255 OID 5297576)
-- Dependencies: 6 1373 1293
-- Name: isnge(isbn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(isbn, ean13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(isbn, ean13) OWNER TO postgres;

--
-- TOC entry 502 (class 1255 OID 5297577)
-- Dependencies: 6 1383 1383
-- Name: isnge(ismn13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ismn13, ismn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 503 (class 1255 OID 5297578)
-- Dependencies: 6 1383 1380
-- Name: isnge(ismn13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ismn13, ismn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 504 (class 1255 OID 5297579)
-- Dependencies: 6 1383 1293
-- Name: isnge(ismn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ismn13, ean13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 505 (class 1255 OID 5297580)
-- Dependencies: 6 1380 1380
-- Name: isnge(ismn, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ismn, ismn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ismn, ismn) OWNER TO postgres;

--
-- TOC entry 506 (class 1255 OID 5297581)
-- Dependencies: 6 1380 1383
-- Name: isnge(ismn, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ismn, ismn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 507 (class 1255 OID 5297582)
-- Dependencies: 6 1380 1293
-- Name: isnge(ismn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(ismn, ean13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(ismn, ean13) OWNER TO postgres;

--
-- TOC entry 508 (class 1255 OID 5297583)
-- Dependencies: 6 1388 1388
-- Name: isnge(issn13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(issn13, issn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(issn13, issn13) OWNER TO postgres;

--
-- TOC entry 509 (class 1255 OID 5297584)
-- Dependencies: 6 1388 1385
-- Name: isnge(issn13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(issn13, issn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(issn13, issn) OWNER TO postgres;

--
-- TOC entry 510 (class 1255 OID 5297585)
-- Dependencies: 6 1388 1293
-- Name: isnge(issn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(issn13, ean13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(issn13, ean13) OWNER TO postgres;

--
-- TOC entry 511 (class 1255 OID 5297586)
-- Dependencies: 6 1385 1385
-- Name: isnge(issn, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(issn, issn) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(issn, issn) OWNER TO postgres;

--
-- TOC entry 512 (class 1255 OID 5297587)
-- Dependencies: 6 1385 1388
-- Name: isnge(issn, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(issn, issn13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(issn, issn13) OWNER TO postgres;

--
-- TOC entry 513 (class 1255 OID 5297588)
-- Dependencies: 6 1385 1293
-- Name: isnge(issn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(issn, ean13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(issn, ean13) OWNER TO postgres;

--
-- TOC entry 514 (class 1255 OID 5297589)
-- Dependencies: 6 1592 1592
-- Name: isnge(upc, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(upc, upc) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(upc, upc) OWNER TO postgres;

--
-- TOC entry 515 (class 1255 OID 5297590)
-- Dependencies: 6 1592 1293
-- Name: isnge(upc, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnge(upc, ean13) RETURNS boolean
    AS $$int8ge$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnge(upc, ean13) OWNER TO postgres;

--
-- TOC entry 516 (class 1255 OID 5297591)
-- Dependencies: 6 1293 1293
-- Name: isngt(ean13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ean13, ean13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ean13, ean13) OWNER TO postgres;

--
-- TOC entry 517 (class 1255 OID 5297592)
-- Dependencies: 6 1293 1376
-- Name: isngt(ean13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ean13, isbn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 518 (class 1255 OID 5297593)
-- Dependencies: 6 1293 1383
-- Name: isngt(ean13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ean13, ismn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 519 (class 1255 OID 5297594)
-- Dependencies: 6 1293 1388
-- Name: isngt(ean13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ean13, issn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ean13, issn13) OWNER TO postgres;

--
-- TOC entry 520 (class 1255 OID 5297595)
-- Dependencies: 6 1293 1373
-- Name: isngt(ean13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ean13, isbn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ean13, isbn) OWNER TO postgres;

--
-- TOC entry 521 (class 1255 OID 5297596)
-- Dependencies: 6 1293 1380
-- Name: isngt(ean13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ean13, ismn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ean13, ismn) OWNER TO postgres;

--
-- TOC entry 522 (class 1255 OID 5297597)
-- Dependencies: 6 1293 1385
-- Name: isngt(ean13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ean13, issn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ean13, issn) OWNER TO postgres;

--
-- TOC entry 523 (class 1255 OID 5297598)
-- Dependencies: 6 1293 1592
-- Name: isngt(ean13, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ean13, upc) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ean13, upc) OWNER TO postgres;

--
-- TOC entry 524 (class 1255 OID 5297599)
-- Dependencies: 6 1376 1376
-- Name: isngt(isbn13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(isbn13, isbn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 525 (class 1255 OID 5297600)
-- Dependencies: 6 1376 1373
-- Name: isngt(isbn13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(isbn13, isbn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 526 (class 1255 OID 5297601)
-- Dependencies: 6 1376 1293
-- Name: isngt(isbn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(isbn13, ean13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 527 (class 1255 OID 5297602)
-- Dependencies: 6 1373 1373
-- Name: isngt(isbn, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(isbn, isbn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(isbn, isbn) OWNER TO postgres;

--
-- TOC entry 528 (class 1255 OID 5297603)
-- Dependencies: 6 1373 1376
-- Name: isngt(isbn, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(isbn, isbn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 529 (class 1255 OID 5297604)
-- Dependencies: 6 1373 1293
-- Name: isngt(isbn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(isbn, ean13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(isbn, ean13) OWNER TO postgres;

--
-- TOC entry 530 (class 1255 OID 5297605)
-- Dependencies: 6 1383 1383
-- Name: isngt(ismn13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ismn13, ismn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 531 (class 1255 OID 5297606)
-- Dependencies: 6 1383 1380
-- Name: isngt(ismn13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ismn13, ismn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 532 (class 1255 OID 5297607)
-- Dependencies: 6 1383 1293
-- Name: isngt(ismn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ismn13, ean13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 533 (class 1255 OID 5297608)
-- Dependencies: 6 1380 1380
-- Name: isngt(ismn, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ismn, ismn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ismn, ismn) OWNER TO postgres;

--
-- TOC entry 534 (class 1255 OID 5297609)
-- Dependencies: 6 1380 1383
-- Name: isngt(ismn, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ismn, ismn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 535 (class 1255 OID 5297610)
-- Dependencies: 6 1380 1293
-- Name: isngt(ismn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(ismn, ean13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(ismn, ean13) OWNER TO postgres;

--
-- TOC entry 536 (class 1255 OID 5297611)
-- Dependencies: 6 1388 1388
-- Name: isngt(issn13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(issn13, issn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(issn13, issn13) OWNER TO postgres;

--
-- TOC entry 537 (class 1255 OID 5297612)
-- Dependencies: 6 1388 1385
-- Name: isngt(issn13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(issn13, issn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(issn13, issn) OWNER TO postgres;

--
-- TOC entry 538 (class 1255 OID 5297613)
-- Dependencies: 6 1388 1293
-- Name: isngt(issn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(issn13, ean13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(issn13, ean13) OWNER TO postgres;

--
-- TOC entry 539 (class 1255 OID 5297614)
-- Dependencies: 6 1385 1385
-- Name: isngt(issn, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(issn, issn) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(issn, issn) OWNER TO postgres;

--
-- TOC entry 540 (class 1255 OID 5297615)
-- Dependencies: 6 1385 1388
-- Name: isngt(issn, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(issn, issn13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(issn, issn13) OWNER TO postgres;

--
-- TOC entry 541 (class 1255 OID 5297616)
-- Dependencies: 6 1385 1293
-- Name: isngt(issn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(issn, ean13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(issn, ean13) OWNER TO postgres;

--
-- TOC entry 542 (class 1255 OID 5297617)
-- Dependencies: 6 1592 1592
-- Name: isngt(upc, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(upc, upc) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(upc, upc) OWNER TO postgres;

--
-- TOC entry 543 (class 1255 OID 5297618)
-- Dependencies: 6 1592 1293
-- Name: isngt(upc, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isngt(upc, ean13) RETURNS boolean
    AS $$int8gt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isngt(upc, ean13) OWNER TO postgres;

--
-- TOC entry 544 (class 1255 OID 5297619)
-- Dependencies: 6 1293 1293
-- Name: isnle(ean13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ean13, ean13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ean13, ean13) OWNER TO postgres;

--
-- TOC entry 545 (class 1255 OID 5297620)
-- Dependencies: 6 1293 1376
-- Name: isnle(ean13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ean13, isbn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 546 (class 1255 OID 5297621)
-- Dependencies: 6 1293 1383
-- Name: isnle(ean13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ean13, ismn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 547 (class 1255 OID 5297622)
-- Dependencies: 6 1293 1388
-- Name: isnle(ean13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ean13, issn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ean13, issn13) OWNER TO postgres;

--
-- TOC entry 548 (class 1255 OID 5297623)
-- Dependencies: 6 1293 1373
-- Name: isnle(ean13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ean13, isbn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ean13, isbn) OWNER TO postgres;

--
-- TOC entry 549 (class 1255 OID 5297624)
-- Dependencies: 6 1293 1380
-- Name: isnle(ean13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ean13, ismn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ean13, ismn) OWNER TO postgres;

--
-- TOC entry 550 (class 1255 OID 5297625)
-- Dependencies: 6 1293 1385
-- Name: isnle(ean13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ean13, issn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ean13, issn) OWNER TO postgres;

--
-- TOC entry 551 (class 1255 OID 5297626)
-- Dependencies: 6 1293 1592
-- Name: isnle(ean13, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ean13, upc) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ean13, upc) OWNER TO postgres;

--
-- TOC entry 552 (class 1255 OID 5297627)
-- Dependencies: 6 1376 1376
-- Name: isnle(isbn13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(isbn13, isbn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 553 (class 1255 OID 5297628)
-- Dependencies: 6 1376 1373
-- Name: isnle(isbn13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(isbn13, isbn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 554 (class 1255 OID 5297629)
-- Dependencies: 6 1376 1293
-- Name: isnle(isbn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(isbn13, ean13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 555 (class 1255 OID 5297630)
-- Dependencies: 6 1373 1373
-- Name: isnle(isbn, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(isbn, isbn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(isbn, isbn) OWNER TO postgres;

--
-- TOC entry 556 (class 1255 OID 5297631)
-- Dependencies: 6 1373 1376
-- Name: isnle(isbn, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(isbn, isbn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 557 (class 1255 OID 5297632)
-- Dependencies: 6 1373 1293
-- Name: isnle(isbn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(isbn, ean13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(isbn, ean13) OWNER TO postgres;

--
-- TOC entry 558 (class 1255 OID 5297633)
-- Dependencies: 6 1383 1383
-- Name: isnle(ismn13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ismn13, ismn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 559 (class 1255 OID 5297634)
-- Dependencies: 6 1383 1380
-- Name: isnle(ismn13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ismn13, ismn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 560 (class 1255 OID 5297635)
-- Dependencies: 6 1383 1293
-- Name: isnle(ismn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ismn13, ean13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 561 (class 1255 OID 5297636)
-- Dependencies: 6 1380 1380
-- Name: isnle(ismn, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ismn, ismn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ismn, ismn) OWNER TO postgres;

--
-- TOC entry 562 (class 1255 OID 5297637)
-- Dependencies: 6 1380 1383
-- Name: isnle(ismn, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ismn, ismn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 563 (class 1255 OID 5297638)
-- Dependencies: 6 1380 1293
-- Name: isnle(ismn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(ismn, ean13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(ismn, ean13) OWNER TO postgres;

--
-- TOC entry 564 (class 1255 OID 5297639)
-- Dependencies: 6 1388 1388
-- Name: isnle(issn13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(issn13, issn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(issn13, issn13) OWNER TO postgres;

--
-- TOC entry 565 (class 1255 OID 5297640)
-- Dependencies: 6 1388 1385
-- Name: isnle(issn13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(issn13, issn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(issn13, issn) OWNER TO postgres;

--
-- TOC entry 566 (class 1255 OID 5297641)
-- Dependencies: 6 1388 1293
-- Name: isnle(issn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(issn13, ean13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(issn13, ean13) OWNER TO postgres;

--
-- TOC entry 567 (class 1255 OID 5297642)
-- Dependencies: 6 1385 1385
-- Name: isnle(issn, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(issn, issn) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(issn, issn) OWNER TO postgres;

--
-- TOC entry 568 (class 1255 OID 5297643)
-- Dependencies: 6 1385 1388
-- Name: isnle(issn, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(issn, issn13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(issn, issn13) OWNER TO postgres;

--
-- TOC entry 569 (class 1255 OID 5297644)
-- Dependencies: 6 1385 1293
-- Name: isnle(issn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(issn, ean13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(issn, ean13) OWNER TO postgres;

--
-- TOC entry 570 (class 1255 OID 5297645)
-- Dependencies: 6 1592 1592
-- Name: isnle(upc, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(upc, upc) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(upc, upc) OWNER TO postgres;

--
-- TOC entry 571 (class 1255 OID 5297646)
-- Dependencies: 6 1592 1293
-- Name: isnle(upc, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnle(upc, ean13) RETURNS boolean
    AS $$int8le$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnle(upc, ean13) OWNER TO postgres;

--
-- TOC entry 572 (class 1255 OID 5297647)
-- Dependencies: 6 1293 1293
-- Name: isnlt(ean13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ean13, ean13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ean13, ean13) OWNER TO postgres;

--
-- TOC entry 573 (class 1255 OID 5297648)
-- Dependencies: 6 1293 1376
-- Name: isnlt(ean13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ean13, isbn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 574 (class 1255 OID 5297649)
-- Dependencies: 6 1293 1383
-- Name: isnlt(ean13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ean13, ismn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 575 (class 1255 OID 5297650)
-- Dependencies: 6 1293 1388
-- Name: isnlt(ean13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ean13, issn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ean13, issn13) OWNER TO postgres;

--
-- TOC entry 576 (class 1255 OID 5297651)
-- Dependencies: 6 1293 1373
-- Name: isnlt(ean13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ean13, isbn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ean13, isbn) OWNER TO postgres;

--
-- TOC entry 577 (class 1255 OID 5297652)
-- Dependencies: 6 1293 1380
-- Name: isnlt(ean13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ean13, ismn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ean13, ismn) OWNER TO postgres;

--
-- TOC entry 578 (class 1255 OID 5297653)
-- Dependencies: 6 1293 1385
-- Name: isnlt(ean13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ean13, issn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ean13, issn) OWNER TO postgres;

--
-- TOC entry 579 (class 1255 OID 5297654)
-- Dependencies: 6 1293 1592
-- Name: isnlt(ean13, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ean13, upc) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ean13, upc) OWNER TO postgres;

--
-- TOC entry 580 (class 1255 OID 5297655)
-- Dependencies: 6 1376 1376
-- Name: isnlt(isbn13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(isbn13, isbn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 581 (class 1255 OID 5297656)
-- Dependencies: 6 1376 1373
-- Name: isnlt(isbn13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(isbn13, isbn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 582 (class 1255 OID 5297657)
-- Dependencies: 6 1376 1293
-- Name: isnlt(isbn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(isbn13, ean13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 583 (class 1255 OID 5297658)
-- Dependencies: 6 1373 1373
-- Name: isnlt(isbn, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(isbn, isbn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(isbn, isbn) OWNER TO postgres;

--
-- TOC entry 584 (class 1255 OID 5297659)
-- Dependencies: 6 1373 1376
-- Name: isnlt(isbn, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(isbn, isbn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 585 (class 1255 OID 5297660)
-- Dependencies: 6 1373 1293
-- Name: isnlt(isbn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(isbn, ean13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(isbn, ean13) OWNER TO postgres;

--
-- TOC entry 586 (class 1255 OID 5297661)
-- Dependencies: 6 1383 1383
-- Name: isnlt(ismn13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ismn13, ismn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 587 (class 1255 OID 5297662)
-- Dependencies: 6 1383 1380
-- Name: isnlt(ismn13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ismn13, ismn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 588 (class 1255 OID 5297663)
-- Dependencies: 6 1383 1293
-- Name: isnlt(ismn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ismn13, ean13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 589 (class 1255 OID 5297664)
-- Dependencies: 6 1380 1380
-- Name: isnlt(ismn, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ismn, ismn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ismn, ismn) OWNER TO postgres;

--
-- TOC entry 590 (class 1255 OID 5297665)
-- Dependencies: 6 1380 1383
-- Name: isnlt(ismn, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ismn, ismn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 591 (class 1255 OID 5297666)
-- Dependencies: 6 1380 1293
-- Name: isnlt(ismn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(ismn, ean13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(ismn, ean13) OWNER TO postgres;

--
-- TOC entry 592 (class 1255 OID 5297667)
-- Dependencies: 6 1388 1388
-- Name: isnlt(issn13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(issn13, issn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(issn13, issn13) OWNER TO postgres;

--
-- TOC entry 593 (class 1255 OID 5297668)
-- Dependencies: 6 1388 1385
-- Name: isnlt(issn13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(issn13, issn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(issn13, issn) OWNER TO postgres;

--
-- TOC entry 594 (class 1255 OID 5297669)
-- Dependencies: 6 1388 1293
-- Name: isnlt(issn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(issn13, ean13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(issn13, ean13) OWNER TO postgres;

--
-- TOC entry 595 (class 1255 OID 5297670)
-- Dependencies: 6 1385 1385
-- Name: isnlt(issn, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(issn, issn) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(issn, issn) OWNER TO postgres;

--
-- TOC entry 596 (class 1255 OID 5297671)
-- Dependencies: 6 1385 1388
-- Name: isnlt(issn, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(issn, issn13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(issn, issn13) OWNER TO postgres;

--
-- TOC entry 597 (class 1255 OID 5297672)
-- Dependencies: 6 1385 1293
-- Name: isnlt(issn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(issn, ean13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(issn, ean13) OWNER TO postgres;

--
-- TOC entry 598 (class 1255 OID 5297673)
-- Dependencies: 6 1592 1592
-- Name: isnlt(upc, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(upc, upc) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(upc, upc) OWNER TO postgres;

--
-- TOC entry 599 (class 1255 OID 5297674)
-- Dependencies: 6 1592 1293
-- Name: isnlt(upc, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnlt(upc, ean13) RETURNS boolean
    AS $$int8lt$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnlt(upc, ean13) OWNER TO postgres;

--
-- TOC entry 600 (class 1255 OID 5297675)
-- Dependencies: 6 1293 1293
-- Name: isnne(ean13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ean13, ean13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ean13, ean13) OWNER TO postgres;

--
-- TOC entry 601 (class 1255 OID 5297676)
-- Dependencies: 6 1293 1376
-- Name: isnne(ean13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ean13, isbn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 602 (class 1255 OID 5297677)
-- Dependencies: 6 1293 1383
-- Name: isnne(ean13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ean13, ismn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 603 (class 1255 OID 5297678)
-- Dependencies: 6 1293 1388
-- Name: isnne(ean13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ean13, issn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ean13, issn13) OWNER TO postgres;

--
-- TOC entry 604 (class 1255 OID 5297679)
-- Dependencies: 6 1293 1373
-- Name: isnne(ean13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ean13, isbn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ean13, isbn) OWNER TO postgres;

--
-- TOC entry 605 (class 1255 OID 5297680)
-- Dependencies: 6 1293 1380
-- Name: isnne(ean13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ean13, ismn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ean13, ismn) OWNER TO postgres;

--
-- TOC entry 606 (class 1255 OID 5297681)
-- Dependencies: 6 1293 1385
-- Name: isnne(ean13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ean13, issn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ean13, issn) OWNER TO postgres;

--
-- TOC entry 607 (class 1255 OID 5297682)
-- Dependencies: 6 1293 1592
-- Name: isnne(ean13, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ean13, upc) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ean13, upc) OWNER TO postgres;

--
-- TOC entry 608 (class 1255 OID 5297683)
-- Dependencies: 6 1376 1376
-- Name: isnne(isbn13, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(isbn13, isbn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 609 (class 1255 OID 5297684)
-- Dependencies: 6 1376 1373
-- Name: isnne(isbn13, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(isbn13, isbn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 610 (class 1255 OID 5297685)
-- Dependencies: 6 1376 1293
-- Name: isnne(isbn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(isbn13, ean13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 611 (class 1255 OID 5297686)
-- Dependencies: 6 1373 1373
-- Name: isnne(isbn, isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(isbn, isbn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(isbn, isbn) OWNER TO postgres;

--
-- TOC entry 612 (class 1255 OID 5297687)
-- Dependencies: 6 1373 1376
-- Name: isnne(isbn, isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(isbn, isbn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 613 (class 1255 OID 5297688)
-- Dependencies: 6 1373 1293
-- Name: isnne(isbn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(isbn, ean13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(isbn, ean13) OWNER TO postgres;

--
-- TOC entry 614 (class 1255 OID 5297689)
-- Dependencies: 6 1383 1383
-- Name: isnne(ismn13, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ismn13, ismn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 615 (class 1255 OID 5297690)
-- Dependencies: 6 1383 1380
-- Name: isnne(ismn13, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ismn13, ismn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 616 (class 1255 OID 5297691)
-- Dependencies: 6 1383 1293
-- Name: isnne(ismn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ismn13, ean13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 617 (class 1255 OID 5297692)
-- Dependencies: 6 1380 1380
-- Name: isnne(ismn, ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ismn, ismn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ismn, ismn) OWNER TO postgres;

--
-- TOC entry 618 (class 1255 OID 5297693)
-- Dependencies: 6 1380 1383
-- Name: isnne(ismn, ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ismn, ismn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 619 (class 1255 OID 5297694)
-- Dependencies: 6 1380 1293
-- Name: isnne(ismn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(ismn, ean13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(ismn, ean13) OWNER TO postgres;

--
-- TOC entry 620 (class 1255 OID 5297695)
-- Dependencies: 6 1388 1388
-- Name: isnne(issn13, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(issn13, issn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(issn13, issn13) OWNER TO postgres;

--
-- TOC entry 621 (class 1255 OID 5297696)
-- Dependencies: 6 1388 1385
-- Name: isnne(issn13, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(issn13, issn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(issn13, issn) OWNER TO postgres;

--
-- TOC entry 622 (class 1255 OID 5297697)
-- Dependencies: 6 1388 1293
-- Name: isnne(issn13, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(issn13, ean13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(issn13, ean13) OWNER TO postgres;

--
-- TOC entry 623 (class 1255 OID 5297698)
-- Dependencies: 6 1385 1385
-- Name: isnne(issn, issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(issn, issn) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(issn, issn) OWNER TO postgres;

--
-- TOC entry 624 (class 1255 OID 5297699)
-- Dependencies: 1385 6 1388
-- Name: isnne(issn, issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(issn, issn13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(issn, issn13) OWNER TO postgres;

--
-- TOC entry 625 (class 1255 OID 5297700)
-- Dependencies: 1385 6 1293
-- Name: isnne(issn, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(issn, ean13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(issn, ean13) OWNER TO postgres;

--
-- TOC entry 626 (class 1255 OID 5297701)
-- Dependencies: 6 1592 1592
-- Name: isnne(upc, upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(upc, upc) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(upc, upc) OWNER TO postgres;

--
-- TOC entry 627 (class 1255 OID 5297702)
-- Dependencies: 6 1592 1293
-- Name: isnne(upc, ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION isnne(upc, ean13) RETURNS boolean
    AS $$int8ne$$
    LANGUAGE internal IMMUTABLE STRICT;


ALTER FUNCTION public.isnne(upc, ean13) OWNER TO postgres;

--
-- TOC entry 628 (class 1255 OID 5297705)
-- Dependencies: 6 1385 1293
-- Name: issn(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION issn(ean13) RETURNS issn
    AS '$libdir/isn', 'issn_cast_from_ean13'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.issn(ean13) OWNER TO postgres;

--
-- TOC entry 629 (class 1255 OID 5297706)
-- Dependencies: 6 1388 1293
-- Name: issn13(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION issn13(ean13) RETURNS issn13
    AS '$libdir/isn', 'issn_cast_from_ean13'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.issn13(ean13) OWNER TO postgres;

--
-- TOC entry 630 (class 1255 OID 5297709)
-- Dependencies: 6 1588
-- Name: latitude(earth); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION latitude(earth) RETURNS double precision
    AS $_$SELECT CASE WHEN cube_ll_coord($1, 3)/earth() < -1 THEN -90::float8 WHEN cube_ll_coord($1, 3)/earth() > 1 THEN 90::float8 ELSE degrees(asin(cube_ll_coord($1, 3)/earth())) END$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.latitude(earth) OWNER TO postgres;

--
-- TOC entry 631 (class 1255 OID 5297710)
-- Dependencies: 6 1410 1412
-- Name: lca(ltree[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lca(ltree[]) RETURNS ltree
    AS '$libdir/ltree', '_lca'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lca(ltree[]) OWNER TO postgres;

--
-- TOC entry 632 (class 1255 OID 5297711)
-- Dependencies: 6 1410 1410 1410
-- Name: lca(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lca(ltree, ltree) RETURNS ltree
    AS '$libdir/ltree', 'lca'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lca(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 633 (class 1255 OID 5297712)
-- Dependencies: 6 1410 1410 1410 1410
-- Name: lca(ltree, ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lca(ltree, ltree, ltree) RETURNS ltree
    AS '$libdir/ltree', 'lca'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lca(ltree, ltree, ltree) OWNER TO postgres;

--
-- TOC entry 634 (class 1255 OID 5297713)
-- Dependencies: 6 1410 1410 1410 1410 1410
-- Name: lca(ltree, ltree, ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lca(ltree, ltree, ltree, ltree) RETURNS ltree
    AS '$libdir/ltree', 'lca'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lca(ltree, ltree, ltree, ltree) OWNER TO postgres;

--
-- TOC entry 635 (class 1255 OID 5297714)
-- Dependencies: 6 1410 1410 1410 1410 1410 1410
-- Name: lca(ltree, ltree, ltree, ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lca(ltree, ltree, ltree, ltree, ltree) RETURNS ltree
    AS '$libdir/ltree', 'lca'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lca(ltree, ltree, ltree, ltree, ltree) OWNER TO postgres;

--
-- TOC entry 636 (class 1255 OID 5297715)
-- Dependencies: 6 1410 1410 1410 1410 1410 1410 1410
-- Name: lca(ltree, ltree, ltree, ltree, ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lca(ltree, ltree, ltree, ltree, ltree, ltree) RETURNS ltree
    AS '$libdir/ltree', 'lca'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lca(ltree, ltree, ltree, ltree, ltree, ltree) OWNER TO postgres;

--
-- TOC entry 637 (class 1255 OID 5297716)
-- Dependencies: 6 1410 1410 1410 1410 1410 1410 1410 1410
-- Name: lca(ltree, ltree, ltree, ltree, ltree, ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lca(ltree, ltree, ltree, ltree, ltree, ltree, ltree) RETURNS ltree
    AS '$libdir/ltree', 'lca'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lca(ltree, ltree, ltree, ltree, ltree, ltree, ltree) OWNER TO postgres;

--
-- TOC entry 638 (class 1255 OID 5297717)
-- Dependencies: 6 1410 1410 1410 1410 1410 1410 1410 1410 1410
-- Name: lca(ltree, ltree, ltree, ltree, ltree, ltree, ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lca(ltree, ltree, ltree, ltree, ltree, ltree, ltree, ltree) RETURNS ltree
    AS '$libdir/ltree', 'lca'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lca(ltree, ltree, ltree, ltree, ltree, ltree, ltree, ltree) OWNER TO postgres;

--
-- TOC entry 639 (class 1255 OID 5297724)
-- Dependencies: 6
-- Name: levenshtein(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION levenshtein(text, text) RETURNS integer
    AS '$libdir/fuzzystrmatch', 'levenshtein'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.levenshtein(text, text) OWNER TO postgres;

--
-- TOC entry 640 (class 1255 OID 5297730)
-- Dependencies: 6 1588
-- Name: ll_to_earth(double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ll_to_earth(double precision, double precision) RETURNS earth
    AS $_$SELECT cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.ll_to_earth(double precision, double precision) OWNER TO postgres;

--
-- TOC entry 641 (class 1255 OID 5297731)
-- Dependencies: 6
-- Name: lo_manage(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lo_manage() RETURNS trigger
    AS '$libdir/lo', 'lo_manage'
    LANGUAGE c;


ALTER FUNCTION public.lo_manage() OWNER TO postgres;

--
-- TOC entry 642 (class 1255 OID 5297732)
-- Dependencies: 6 1609
-- Name: lo_oid(lo); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lo_oid(lo) RETURNS oid
    AS $_$SELECT $1::pg_catalog.oid$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.lo_oid(lo) OWNER TO postgres;

--
-- TOC entry 643 (class 1255 OID 5297734)
-- Dependencies: 6 1860
-- Name: lockrow(text, text, text, text, timestamp without time zone); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lockrow(text, text, text, text, timestamp without time zone) RETURNS integer
    AS $_$
DECLARE
	myschema alias for $1;
	mytable alias for $2;
	myrid   alias for $3;
	authid alias for $4;
	expires alias for $5;
	ret int;
	mytoid oid;
	myrec RECORD;
	
BEGIN

	IF NOT LongTransactionsEnabled() THEN
		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
	END IF;

	EXECUTE 'DELETE FROM authorization_table WHERE expires < now()'; 


	SELECT c.oid INTO mytoid FROM pg_class c, pg_namespace n
		WHERE c.relname = mytable
		AND c.relnamespace = n.oid
		AND n.nspname = myschema;





	-- RAISE NOTICE 'toid: %', mytoid;

	FOR myrec IN SELECT * FROM authorization_table WHERE 
		toid = mytoid AND rid = myrid
	LOOP
		IF myrec.authid != authid THEN
			RETURN 0;
		ELSE
			RETURN 1;
		END IF;
	END LOOP;

	EXECUTE 'INSERT INTO authorization_table VALUES ('||
		quote_literal(mytoid::text)||','||quote_literal(myrid)||
		','||quote_literal(expires::text)||
		','||quote_literal(authid) ||')';

	GET DIAGNOSTICS ret = ROW_COUNT;

	RETURN ret;
END;$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.lockrow(text, text, text, text, timestamp without time zone) OWNER TO postgres;

--
-- TOC entry 644 (class 1255 OID 5297735)
-- Dependencies: 6
-- Name: lockrow(text, text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lockrow(text, text, text, text) RETURNS integer
    AS $_$SELECT LockRow($1, $2, $3, $4, now()::timestamp+'1:00');$_$
    LANGUAGE sql STRICT;


ALTER FUNCTION public.lockrow(text, text, text, text) OWNER TO postgres;

--
-- TOC entry 645 (class 1255 OID 5297736)
-- Dependencies: 6
-- Name: lockrow(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lockrow(text, text, text) RETURNS integer
    AS $_$SELECT LockRow(current_schema(), $1, $2, $3, now()::timestamp+'1:00');$_$
    LANGUAGE sql STRICT;


ALTER FUNCTION public.lockrow(text, text, text) OWNER TO postgres;

--
-- TOC entry 646 (class 1255 OID 5297737)
-- Dependencies: 6
-- Name: lockrow(text, text, text, timestamp without time zone); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lockrow(text, text, text, timestamp without time zone) RETURNS integer
    AS $_$SELECT LockRow(current_schema(), $1, $2, $3, $4);$_$
    LANGUAGE sql STRICT;


ALTER FUNCTION public.lockrow(text, text, text, timestamp without time zone) OWNER TO postgres;

--
-- TOC entry 647 (class 1255 OID 5297738)
-- Dependencies: 6 1588
-- Name: longitude(earth); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION longitude(earth) RETURNS double precision
    AS $_$SELECT degrees(atan2(cube_ll_coord($1, 2), cube_ll_coord($1, 1)))$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.longitude(earth) OWNER TO postgres;

--
-- TOC entry 648 (class 1255 OID 5297739)
-- Dependencies: 6 1860
-- Name: longtransactionsenabled(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION longtransactionsenabled() RETURNS boolean
    AS $$
DECLARE
	rec RECORD;
BEGIN
	FOR rec IN SELECT oid FROM pg_class WHERE relname = 'authorized_tables'
	LOOP
		return 't';
	END LOOP;
	return 'f';
END;
$$
    LANGUAGE plpgsql;


ALTER FUNCTION public.longtransactionsenabled() OWNER TO postgres;

--
-- TOC entry 649 (class 1255 OID 5297740)
-- Dependencies: 6 1410 1409
-- Name: lt_q_regex(ltree, lquery[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lt_q_regex(ltree, lquery[]) RETURNS boolean
    AS '$libdir/ltree', 'lt_q_regex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lt_q_regex(ltree, lquery[]) OWNER TO postgres;

--
-- TOC entry 650 (class 1255 OID 5297741)
-- Dependencies: 6 1409 1410
-- Name: lt_q_rregex(lquery[], ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION lt_q_rregex(lquery[], ltree) RETURNS boolean
    AS '$libdir/ltree', 'lt_q_rregex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.lt_q_rregex(lquery[], ltree) OWNER TO postgres;

--
-- TOC entry 651 (class 1255 OID 5297742)
-- Dependencies: 6 1410 1407
-- Name: ltq_regex(ltree, lquery); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltq_regex(ltree, lquery) RETURNS boolean
    AS '$libdir/ltree', 'ltq_regex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltq_regex(ltree, lquery) OWNER TO postgres;

--
-- TOC entry 652 (class 1255 OID 5297743)
-- Dependencies: 6 1407 1410
-- Name: ltq_rregex(lquery, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltq_rregex(lquery, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltq_rregex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltq_rregex(lquery, ltree) OWNER TO postgres;

--
-- TOC entry 653 (class 1255 OID 5297744)
-- Dependencies: 6 1410
-- Name: ltree2text(ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree2text(ltree) RETURNS text
    AS '$libdir/ltree', 'ltree2text'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree2text(ltree) OWNER TO postgres;

--
-- TOC entry 654 (class 1255 OID 5297745)
-- Dependencies: 6 1410 1410 1410
-- Name: ltree_addltree(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_addltree(ltree, ltree) RETURNS ltree
    AS '$libdir/ltree', 'ltree_addltree'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_addltree(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 655 (class 1255 OID 5297746)
-- Dependencies: 6 1410 1410
-- Name: ltree_addtext(ltree, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_addtext(ltree, text) RETURNS ltree
    AS '$libdir/ltree', 'ltree_addtext'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_addtext(ltree, text) OWNER TO postgres;

--
-- TOC entry 656 (class 1255 OID 5297747)
-- Dependencies: 6 1410 1410
-- Name: ltree_cmp(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_cmp(ltree, ltree) RETURNS integer
    AS '$libdir/ltree', 'ltree_cmp'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_cmp(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 657 (class 1255 OID 5297748)
-- Dependencies: 6
-- Name: ltree_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_compress(internal) RETURNS internal
    AS '$libdir/ltree', 'ltree_compress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ltree_compress(internal) OWNER TO postgres;

--
-- TOC entry 658 (class 1255 OID 5297749)
-- Dependencies: 6
-- Name: ltree_consistent(internal, internal, smallint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_consistent(internal, internal, smallint) RETURNS boolean
    AS '$libdir/ltree', 'ltree_consistent'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ltree_consistent(internal, internal, smallint) OWNER TO postgres;

--
-- TOC entry 659 (class 1255 OID 5297750)
-- Dependencies: 6
-- Name: ltree_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_decompress(internal) RETURNS internal
    AS '$libdir/ltree', 'ltree_decompress'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ltree_decompress(internal) OWNER TO postgres;

--
-- TOC entry 660 (class 1255 OID 5297751)
-- Dependencies: 6 1410 1410
-- Name: ltree_eq(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_eq(ltree, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltree_eq'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_eq(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 661 (class 1255 OID 5297752)
-- Dependencies: 6 1410 1410
-- Name: ltree_ge(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_ge(ltree, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltree_ge'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_ge(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 662 (class 1255 OID 5297753)
-- Dependencies: 6 1410 1410
-- Name: ltree_gt(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_gt(ltree, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltree_gt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_gt(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 663 (class 1255 OID 5297754)
-- Dependencies: 6 1410 1410
-- Name: ltree_isparent(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_isparent(ltree, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltree_isparent'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_isparent(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 664 (class 1255 OID 5297755)
-- Dependencies: 6 1410 1410
-- Name: ltree_le(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_le(ltree, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltree_le'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_le(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 665 (class 1255 OID 5297756)
-- Dependencies: 6 1410 1410
-- Name: ltree_lt(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_lt(ltree, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltree_lt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_lt(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 666 (class 1255 OID 5297757)
-- Dependencies: 1410 6 1410
-- Name: ltree_ne(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_ne(ltree, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltree_ne'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_ne(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 667 (class 1255 OID 5297758)
-- Dependencies: 6
-- Name: ltree_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_penalty(internal, internal, internal) RETURNS internal
    AS '$libdir/ltree', 'ltree_penalty'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_penalty(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 668 (class 1255 OID 5297759)
-- Dependencies: 6
-- Name: ltree_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_picksplit(internal, internal) RETURNS internal
    AS '$libdir/ltree', 'ltree_picksplit'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ltree_picksplit(internal, internal) OWNER TO postgres;

--
-- TOC entry 669 (class 1255 OID 5297760)
-- Dependencies: 1410 6 1410
-- Name: ltree_risparent(ltree, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_risparent(ltree, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltree_risparent'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_risparent(ltree, ltree) OWNER TO postgres;

--
-- TOC entry 670 (class 1255 OID 5297761)
-- Dependencies: 6
-- Name: ltree_same(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_same(internal, internal, internal) RETURNS internal
    AS '$libdir/ltree', 'ltree_same'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ltree_same(internal, internal, internal) OWNER TO postgres;

--
-- TOC entry 671 (class 1255 OID 5297762)
-- Dependencies: 1410 1410 6
-- Name: ltree_textadd(text, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_textadd(text, ltree) RETURNS ltree
    AS '$libdir/ltree', 'ltree_textadd'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltree_textadd(text, ltree) OWNER TO postgres;

--
-- TOC entry 672 (class 1255 OID 5297763)
-- Dependencies: 6
-- Name: ltree_union(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltree_union(internal, internal) RETURNS integer
    AS '$libdir/ltree', 'ltree_union'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.ltree_union(internal, internal) OWNER TO postgres;

--
-- TOC entry 673 (class 1255 OID 5297764)
-- Dependencies: 6
-- Name: ltreeparentsel(internal, oid, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltreeparentsel(internal, oid, internal, integer) RETURNS double precision
    AS '$libdir/ltree', 'ltreeparentsel'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltreeparentsel(internal, oid, internal, integer) OWNER TO postgres;

--
-- TOC entry 674 (class 1255 OID 5297765)
-- Dependencies: 6 1416 1410
-- Name: ltxtq_exec(ltree, ltxtquery); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltxtq_exec(ltree, ltxtquery) RETURNS boolean
    AS '$libdir/ltree', 'ltxtq_exec'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltxtq_exec(ltree, ltxtquery) OWNER TO postgres;

--
-- TOC entry 675 (class 1255 OID 5297766)
-- Dependencies: 1410 1416 6
-- Name: ltxtq_rexec(ltxtquery, ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ltxtq_rexec(ltxtquery, ltree) RETURNS boolean
    AS '$libdir/ltree', 'ltxtq_rexec'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.ltxtq_rexec(ltxtquery, ltree) OWNER TO postgres;

--
-- TOC entry 676 (class 1255 OID 5297775)
-- Dependencies: 1293 6 1293
-- Name: make_valid(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION make_valid(ean13) RETURNS ean13
    AS '$libdir/isn', 'make_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.make_valid(ean13) OWNER TO postgres;

--
-- TOC entry 677 (class 1255 OID 5297776)
-- Dependencies: 1376 6 1376
-- Name: make_valid(isbn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION make_valid(isbn13) RETURNS isbn13
    AS '$libdir/isn', 'make_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.make_valid(isbn13) OWNER TO postgres;

--
-- TOC entry 678 (class 1255 OID 5297777)
-- Dependencies: 1383 6 1383
-- Name: make_valid(ismn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION make_valid(ismn13) RETURNS ismn13
    AS '$libdir/isn', 'make_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.make_valid(ismn13) OWNER TO postgres;

--
-- TOC entry 679 (class 1255 OID 5297778)
-- Dependencies: 1388 1388 6
-- Name: make_valid(issn13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION make_valid(issn13) RETURNS issn13
    AS '$libdir/isn', 'make_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.make_valid(issn13) OWNER TO postgres;

--
-- TOC entry 680 (class 1255 OID 5297779)
-- Dependencies: 1373 6 1373
-- Name: make_valid(isbn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION make_valid(isbn) RETURNS isbn
    AS '$libdir/isn', 'make_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.make_valid(isbn) OWNER TO postgres;

--
-- TOC entry 681 (class 1255 OID 5297780)
-- Dependencies: 1380 1380 6
-- Name: make_valid(ismn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION make_valid(ismn) RETURNS ismn
    AS '$libdir/isn', 'make_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.make_valid(ismn) OWNER TO postgres;

--
-- TOC entry 682 (class 1255 OID 5297781)
-- Dependencies: 1385 1385 6
-- Name: make_valid(issn); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION make_valid(issn) RETURNS issn
    AS '$libdir/isn', 'make_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.make_valid(issn) OWNER TO postgres;

--
-- TOC entry 683 (class 1255 OID 5297782)
-- Dependencies: 1592 1592 6
-- Name: make_valid(upc); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION make_valid(upc) RETURNS upc
    AS '$libdir/isn', 'make_valid'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.make_valid(upc) OWNER TO postgres;

--
-- TOC entry 684 (class 1255 OID 5297793)
-- Dependencies: 6
-- Name: metaphone(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION metaphone(text, integer) RETURNS text
    AS '$libdir/fuzzystrmatch', 'metaphone'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.metaphone(text, integer) OWNER TO postgres;

--
-- TOC entry 685 (class 1255 OID 5297794)
-- Dependencies: 6
-- Name: moddatetime(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION moddatetime() RETURNS trigger
    AS '$libdir/moddatetime', 'moddatetime'
    LANGUAGE c;


ALTER FUNCTION public.moddatetime() OWNER TO postgres;

--
-- TOC entry 686 (class 1255 OID 5297797)
-- Dependencies: 1235 6
-- Name: ne(chkpass, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ne(chkpass, text) RETURNS boolean
    AS '$libdir/chkpass', 'chkpass_ne'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ne(chkpass, text) OWNER TO postgres;

--
-- TOC entry 687 (class 1255 OID 5297798)
-- Dependencies: 6 1410
-- Name: nlevel(ltree); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION nlevel(ltree) RETURNS integer
    AS '$libdir/ltree', 'nlevel'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.nlevel(ltree) OWNER TO postgres;

--
-- TOC entry 688 (class 1255 OID 5297800)
-- Dependencies: 6
-- Name: normal_rand(integer, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION normal_rand(integer, double precision, double precision) RETURNS SETOF double precision
    AS '$libdir/tablefunc', 'normal_rand'
    LANGUAGE c STRICT;


ALTER FUNCTION public.normal_rand(integer, double precision, double precision) OWNER TO postgres;

--
-- TOC entry 689 (class 1255 OID 5297808)
-- Dependencies: 6
-- Name: page_header(bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION page_header(page bytea, OUT lsn text, OUT tli smallint, OUT flags smallint, OUT lower smallint, OUT upper smallint, OUT special smallint, OUT pagesize smallint, OUT version smallint, OUT prune_xid xid) RETURNS record
    AS '$libdir/pageinspect', 'page_header'
    LANGUAGE c STRICT;


ALTER FUNCTION public.page_header(page bytea, OUT lsn text, OUT tli smallint, OUT flags smallint, OUT lower smallint, OUT upper smallint, OUT special smallint, OUT pagesize smallint, OUT version smallint, OUT prune_xid xid) OWNER TO postgres;

--
-- TOC entry 690 (class 1255 OID 5297812)
-- Dependencies: 6
-- Name: pg_relpages(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pg_relpages(text) RETURNS integer
    AS '$libdir/pgstattuple', 'pg_relpages'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pg_relpages(text) OWNER TO postgres;

--
-- TOC entry 691 (class 1255 OID 5297813)
-- Dependencies: 6
-- Name: pgp_key_id(bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_key_id(bytea) RETURNS text
    AS '$libdir/pgcrypto', 'pgp_key_id_w'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_key_id(bytea) OWNER TO postgres;

--
-- TOC entry 692 (class 1255 OID 5297814)
-- Dependencies: 6
-- Name: pgp_pub_decrypt(bytea, bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt(bytea, bytea) RETURNS text
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea) OWNER TO postgres;

--
-- TOC entry 693 (class 1255 OID 5297815)
-- Dependencies: 6
-- Name: pgp_pub_decrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text) RETURNS text
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea, text) OWNER TO postgres;

--
-- TOC entry 694 (class 1255 OID 5297816)
-- Dependencies: 6
-- Name: pgp_pub_decrypt(bytea, bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text, text) RETURNS text
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea, text, text) OWNER TO postgres;

--
-- TOC entry 695 (class 1255 OID 5297817)
-- Dependencies: 6
-- Name: pgp_pub_decrypt_bytea(bytea, bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea) OWNER TO postgres;

--
-- TOC entry 696 (class 1255 OID 5297818)
-- Dependencies: 6
-- Name: pgp_pub_decrypt_bytea(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea, text) OWNER TO postgres;

--
-- TOC entry 697 (class 1255 OID 5297819)
-- Dependencies: 6
-- Name: pgp_pub_decrypt_bytea(bytea, bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea, text, text) OWNER TO postgres;

--
-- TOC entry 698 (class 1255 OID 5297820)
-- Dependencies: 6
-- Name: pgp_pub_encrypt(text, bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_encrypt(text, bytea) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_pub_encrypt_text'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgp_pub_encrypt(text, bytea) OWNER TO postgres;

--
-- TOC entry 699 (class 1255 OID 5297821)
-- Dependencies: 6
-- Name: pgp_pub_encrypt(text, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_encrypt(text, bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_pub_encrypt_text'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgp_pub_encrypt(text, bytea, text) OWNER TO postgres;

--
-- TOC entry 700 (class 1255 OID 5297822)
-- Dependencies: 6
-- Name: pgp_pub_encrypt_bytea(bytea, bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_pub_encrypt_bytea'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgp_pub_encrypt_bytea(bytea, bytea) OWNER TO postgres;

--
-- TOC entry 701 (class 1255 OID 5297823)
-- Dependencies: 6
-- Name: pgp_pub_encrypt_bytea(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_pub_encrypt_bytea'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgp_pub_encrypt_bytea(bytea, bytea, text) OWNER TO postgres;

--
-- TOC entry 702 (class 1255 OID 5297824)
-- Dependencies: 6
-- Name: pgp_sym_decrypt(bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_decrypt(bytea, text) RETURNS text
    AS '$libdir/pgcrypto', 'pgp_sym_decrypt_text'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_sym_decrypt(bytea, text) OWNER TO postgres;

--
-- TOC entry 703 (class 1255 OID 5297825)
-- Dependencies: 6
-- Name: pgp_sym_decrypt(bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_decrypt(bytea, text, text) RETURNS text
    AS '$libdir/pgcrypto', 'pgp_sym_decrypt_text'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_sym_decrypt(bytea, text, text) OWNER TO postgres;

--
-- TOC entry 704 (class 1255 OID 5297826)
-- Dependencies: 6
-- Name: pgp_sym_decrypt_bytea(bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_sym_decrypt_bytea'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_sym_decrypt_bytea(bytea, text) OWNER TO postgres;

--
-- TOC entry 705 (class 1255 OID 5297827)
-- Dependencies: 6
-- Name: pgp_sym_decrypt_bytea(bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_sym_decrypt_bytea'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.pgp_sym_decrypt_bytea(bytea, text, text) OWNER TO postgres;

--
-- TOC entry 706 (class 1255 OID 5297828)
-- Dependencies: 6
-- Name: pgp_sym_encrypt(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_encrypt(text, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_sym_encrypt_text'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgp_sym_encrypt(text, text) OWNER TO postgres;

--
-- TOC entry 707 (class 1255 OID 5297829)
-- Dependencies: 6
-- Name: pgp_sym_encrypt(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_encrypt(text, text, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_sym_encrypt_text'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgp_sym_encrypt(text, text, text) OWNER TO postgres;

--
-- TOC entry 708 (class 1255 OID 5297830)
-- Dependencies: 6
-- Name: pgp_sym_encrypt_bytea(bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_sym_encrypt_bytea'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgp_sym_encrypt_bytea(bytea, text) OWNER TO postgres;

--
-- TOC entry 709 (class 1255 OID 5297831)
-- Dependencies: 6
-- Name: pgp_sym_encrypt_bytea(bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text, text) RETURNS bytea
    AS '$libdir/pgcrypto', 'pgp_sym_encrypt_bytea'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgp_sym_encrypt_bytea(bytea, text, text) OWNER TO postgres;

--
-- TOC entry 710 (class 1255 OID 5297832)
-- Dependencies: 6
-- Name: pgstatindex(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgstatindex(relname text, OUT version integer, OUT tree_level integer, OUT index_size integer, OUT root_block_no integer, OUT internal_pages integer, OUT leaf_pages integer, OUT empty_pages integer, OUT deleted_pages integer, OUT avg_leaf_density double precision, OUT leaf_fragmentation double precision) RETURNS record
    AS '$libdir/pgstattuple', 'pgstatindex'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgstatindex(relname text, OUT version integer, OUT tree_level integer, OUT index_size integer, OUT root_block_no integer, OUT internal_pages integer, OUT leaf_pages integer, OUT empty_pages integer, OUT deleted_pages integer, OUT avg_leaf_density double precision, OUT leaf_fragmentation double precision) OWNER TO postgres;

--
-- TOC entry 711 (class 1255 OID 5297833)
-- Dependencies: 6
-- Name: pgstattuple(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgstattuple(relname text, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision) RETURNS record
    AS '$libdir/pgstattuple', 'pgstattuple'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgstattuple(relname text, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision) OWNER TO postgres;

--
-- TOC entry 712 (class 1255 OID 5297834)
-- Dependencies: 6
-- Name: pgstattuple(oid); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgstattuple(reloid oid, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision) RETURNS record
    AS '$libdir/pgstattuple', 'pgstattuplebyid'
    LANGUAGE c STRICT;


ALTER FUNCTION public.pgstattuple(reloid oid, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision) OWNER TO postgres;

--
-- TOC entry 713 (class 1255 OID 5297838)
-- Dependencies: 1860 6
-- Name: postgis_full_version(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION postgis_full_version() RETURNS text
    AS $$
DECLARE
	libver text;
	projver text;
	geosver text;
	jtsver text;
	usestats bool;
	dbproc text;
	relproc text;
	fullver text;
BEGIN
	SELECT postgis_lib_version() INTO libver;
	SELECT postgis_proj_version() INTO projver;
	SELECT postgis_geos_version() INTO geosver;
	SELECT postgis_jts_version() INTO jtsver;
	SELECT postgis_uses_stats() INTO usestats;
	SELECT postgis_scripts_installed() INTO dbproc;
	SELECT postgis_scripts_released() INTO relproc;

	fullver = 'POSTGIS="' || libver || '"';

	IF  geosver IS NOT NULL THEN
		fullver = fullver || ' GEOS="' || geosver || '"';
	END IF;

	IF  jtsver IS NOT NULL THEN
		fullver = fullver || ' JTS="' || jtsver || '"';
	END IF;

	IF  projver IS NOT NULL THEN
		fullver = fullver || ' PROJ="' || projver || '"';
	END IF;

	IF usestats THEN
		fullver = fullver || ' USE_STATS';
	END IF;

	-- fullver = fullver || ' DBPROC="' || dbproc || '"';
	-- fullver = fullver || ' RELPROC="' || relproc || '"';

	IF dbproc != relproc THEN
		fullver = fullver || ' (procs from ' || dbproc || ' need upgrade)';
	END IF;

	RETURN fullver;
END
$$
    LANGUAGE plpgsql IMMUTABLE;


ALTER FUNCTION public.postgis_full_version() OWNER TO postgres;

--
-- TOC entry 714 (class 1255 OID 5297846)
-- Dependencies: 6
-- Name: postgis_scripts_build_date(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION postgis_scripts_build_date() RETURNS text
    AS $$SELECT '2009-05-28 14:51:29'::text AS version$$
    LANGUAGE sql IMMUTABLE;


ALTER FUNCTION public.postgis_scripts_build_date() OWNER TO postgres;

--
-- TOC entry 715 (class 1255 OID 5297847)
-- Dependencies: 6
-- Name: postgis_scripts_installed(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION postgis_scripts_installed() RETURNS text
    AS $$SELECT '1.3.6'::text AS version$$
    LANGUAGE sql IMMUTABLE;


ALTER FUNCTION public.postgis_scripts_installed() OWNER TO postgres;

--
-- TOC entry 716 (class 1255 OID 5297851)
-- Dependencies: 1860 6
-- Name: probe_geometry_columns(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION probe_geometry_columns() RETURNS text
    AS $$
DECLARE
	inserted integer;
	oldcount integer;
	probed integer;
	stale integer;
BEGIN

	SELECT count(*) INTO oldcount FROM geometry_columns;

	SELECT count(*) INTO probed
		FROM pg_class c, pg_attribute a, pg_type t, 

			pg_namespace n,
			pg_constraint sridcheck, pg_constraint typecheck




		WHERE t.typname = 'geometry'
		AND a.atttypid = t.oid
		AND a.attrelid = c.oid

		AND c.relnamespace = n.oid
		AND sridcheck.connamespace = n.oid
		AND typecheck.connamespace = n.oid



		AND sridcheck.conrelid = c.oid
		AND sridcheck.consrc LIKE '(srid('||a.attname||') = %)'
		AND typecheck.conrelid = c.oid
		AND typecheck.consrc LIKE
	'((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))'







		;

	INSERT INTO geometry_columns SELECT
		''::varchar as f_table_catalogue,

		n.nspname::varchar as f_table_schema,



		c.relname::varchar as f_table_name,
		a.attname::varchar as f_geometry_column,
		2 as coord_dimension,

		trim(both  ' =)' from 
			replace(replace(split_part(
				sridcheck.consrc, ' = ', 2), ')', ''), '(', ''))::integer AS srid,
		trim(both ' =)''' from substr(typecheck.consrc, 
			strpos(typecheck.consrc, '='),
			strpos(typecheck.consrc, '::')-
			strpos(typecheck.consrc, '=')
			))::varchar as type






		FROM pg_class c, pg_attribute a, pg_type t, 

			pg_namespace n,
			pg_constraint sridcheck, pg_constraint typecheck



		WHERE t.typname = 'geometry'
		AND a.atttypid = t.oid
		AND a.attrelid = c.oid

		AND c.relnamespace = n.oid
		AND sridcheck.connamespace = n.oid
		AND typecheck.connamespace = n.oid
		AND sridcheck.conrelid = c.oid
		AND sridcheck.consrc LIKE '(srid('||a.attname||') = %)'
		AND typecheck.conrelid = c.oid
		AND typecheck.consrc LIKE
	'((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))'








                AND NOT EXISTS (
                        SELECT oid FROM geometry_columns gc
                        WHERE c.relname::varchar = gc.f_table_name

                        AND n.nspname::varchar = gc.f_table_schema

                        AND a.attname::varchar = gc.f_geometry_column
                );

	GET DIAGNOSTICS inserted = ROW_COUNT;

	IF oldcount > probed THEN
		stale = oldcount-probed;
	ELSE
		stale = 0;
	END IF;

        RETURN 'probed:'||probed::text||
		' inserted:'||inserted::text||
		' conflicts:'||(probed-inserted)::text||
		' stale:'||stale::text;
END

$$
    LANGUAGE plpgsql;


ALTER FUNCTION public.probe_geometry_columns() OWNER TO postgres;

--
-- TOC entry 717 (class 1255 OID 5297852)
-- Dependencies: 1467 6
-- Name: querytree(query_int); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION querytree(query_int) RETURNS text
    AS '$libdir/_int', 'querytree'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.querytree(query_int) OWNER TO postgres;

--
-- TOC entry 718 (class 1255 OID 5297853)
-- Dependencies: 1235 6
-- Name: raw(chkpass); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION raw(chkpass) RETURNS text
    AS '$libdir/chkpass', 'chkpass_rout'
    LANGUAGE c STRICT;


ALTER FUNCTION public.raw(chkpass) OWNER TO postgres;

--
-- TOC entry 719 (class 1255 OID 5297854)
-- Dependencies: 1467 6
-- Name: rboolop(query_int, integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION rboolop(query_int, integer[]) RETURNS boolean
    AS '$libdir/_int', 'rboolop'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.rboolop(query_int, integer[]) OWNER TO postgres;

--
-- TOC entry 5163 (class 0 OID 0)
-- Dependencies: 719
-- Name: FUNCTION rboolop(query_int, integer[]); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION rboolop(query_int, integer[]) IS 'boolean operation with array';


--
-- TOC entry 720 (class 1255 OID 5297858)
-- Dependencies: 6
-- Name: rename_geometry_table_constraints(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION rename_geometry_table_constraints() RETURNS text
    AS $$
SELECT 'rename_geometry_table_constraint() is obsoleted'::text
$$
    LANGUAGE sql IMMUTABLE;


ALTER FUNCTION public.rename_geometry_table_constraints() OWNER TO postgres;

--
-- TOC entry 721 (class 1255 OID 5297863)
-- Dependencies: 6
-- Name: sec_to_gc(double precision); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION sec_to_gc(double precision) RETURNS double precision
    AS $_$SELECT CASE WHEN $1 < 0 THEN 0::float8 WHEN $1/(2*earth()) > 1 THEN pi()*earth() ELSE 2*earth()*asin($1/(2*earth())) END$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.sec_to_gc(double precision) OWNER TO postgres;

--
-- TOC entry 722 (class 1255 OID 5297864)
-- Dependencies: 1494 6 1494
-- Name: seg_cmp(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_cmp(seg, seg) RETURNS integer
    AS '$libdir/seg', 'seg_cmp'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_cmp(seg, seg) OWNER TO postgres;

--
-- TOC entry 5164 (class 0 OID 0)
-- Dependencies: 722
-- Name: FUNCTION seg_cmp(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_cmp(seg, seg) IS 'btree comparison function';


--
-- TOC entry 723 (class 1255 OID 5297865)
-- Dependencies: 1494 6 1494
-- Name: seg_contained(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_contained(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_contained'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_contained(seg, seg) OWNER TO postgres;

--
-- TOC entry 5165 (class 0 OID 0)
-- Dependencies: 723
-- Name: FUNCTION seg_contained(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_contained(seg, seg) IS 'contained in';


--
-- TOC entry 724 (class 1255 OID 5297866)
-- Dependencies: 1494 6 1494
-- Name: seg_contains(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_contains(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_contains'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_contains(seg, seg) OWNER TO postgres;

--
-- TOC entry 5166 (class 0 OID 0)
-- Dependencies: 724
-- Name: FUNCTION seg_contains(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_contains(seg, seg) IS 'contains';


--
-- TOC entry 725 (class 1255 OID 5297867)
-- Dependencies: 1494 6 1494
-- Name: seg_different(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_different(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_different'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_different(seg, seg) OWNER TO postgres;

--
-- TOC entry 5167 (class 0 OID 0)
-- Dependencies: 725
-- Name: FUNCTION seg_different(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_different(seg, seg) IS 'different';


--
-- TOC entry 726 (class 1255 OID 5297868)
-- Dependencies: 1494 6 1494
-- Name: seg_ge(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_ge(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_ge'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_ge(seg, seg) OWNER TO postgres;

--
-- TOC entry 5168 (class 0 OID 0)
-- Dependencies: 726
-- Name: FUNCTION seg_ge(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_ge(seg, seg) IS 'greater than or equal';


--
-- TOC entry 727 (class 1255 OID 5297869)
-- Dependencies: 1494 6 1494
-- Name: seg_gt(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_gt(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_gt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_gt(seg, seg) OWNER TO postgres;

--
-- TOC entry 5169 (class 0 OID 0)
-- Dependencies: 727
-- Name: FUNCTION seg_gt(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_gt(seg, seg) IS 'greater than';


--
-- TOC entry 728 (class 1255 OID 5297870)
-- Dependencies: 1494 6 1494 1494
-- Name: seg_inter(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_inter(seg, seg) RETURNS seg
    AS '$libdir/seg', 'seg_inter'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_inter(seg, seg) OWNER TO postgres;

--
-- TOC entry 729 (class 1255 OID 5297871)
-- Dependencies: 6 1494 1494
-- Name: seg_le(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_le(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_le'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_le(seg, seg) OWNER TO postgres;

--
-- TOC entry 5170 (class 0 OID 0)
-- Dependencies: 729
-- Name: FUNCTION seg_le(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_le(seg, seg) IS 'less than or equal';


--
-- TOC entry 730 (class 1255 OID 5297872)
-- Dependencies: 1494 6 1494
-- Name: seg_left(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_left(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_left'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_left(seg, seg) OWNER TO postgres;

--
-- TOC entry 5171 (class 0 OID 0)
-- Dependencies: 730
-- Name: FUNCTION seg_left(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_left(seg, seg) IS 'is left of';


--
-- TOC entry 731 (class 1255 OID 5297873)
-- Dependencies: 6 1494
-- Name: seg_lower(seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_lower(seg) RETURNS real
    AS '$libdir/seg', 'seg_lower'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_lower(seg) OWNER TO postgres;

--
-- TOC entry 732 (class 1255 OID 5297874)
-- Dependencies: 1494 6 1494
-- Name: seg_lt(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_lt(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_lt'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_lt(seg, seg) OWNER TO postgres;

--
-- TOC entry 5172 (class 0 OID 0)
-- Dependencies: 732
-- Name: FUNCTION seg_lt(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_lt(seg, seg) IS 'less than';


--
-- TOC entry 733 (class 1255 OID 5297875)
-- Dependencies: 1494 6 1494
-- Name: seg_over_left(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_over_left(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_over_left'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_over_left(seg, seg) OWNER TO postgres;

--
-- TOC entry 5173 (class 0 OID 0)
-- Dependencies: 733
-- Name: FUNCTION seg_over_left(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_over_left(seg, seg) IS 'overlaps or is left of';


--
-- TOC entry 734 (class 1255 OID 5297876)
-- Dependencies: 1494 6 1494
-- Name: seg_over_right(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_over_right(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_over_right'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_over_right(seg, seg) OWNER TO postgres;

--
-- TOC entry 5174 (class 0 OID 0)
-- Dependencies: 734
-- Name: FUNCTION seg_over_right(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_over_right(seg, seg) IS 'overlaps or is right of';


--
-- TOC entry 735 (class 1255 OID 5297877)
-- Dependencies: 1494 6 1494
-- Name: seg_overlap(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_overlap(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_overlap'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_overlap(seg, seg) OWNER TO postgres;

--
-- TOC entry 5175 (class 0 OID 0)
-- Dependencies: 735
-- Name: FUNCTION seg_overlap(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_overlap(seg, seg) IS 'overlaps';


--
-- TOC entry 736 (class 1255 OID 5297878)
-- Dependencies: 1494 6 1494
-- Name: seg_right(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_right(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_right'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_right(seg, seg) OWNER TO postgres;

--
-- TOC entry 5176 (class 0 OID 0)
-- Dependencies: 736
-- Name: FUNCTION seg_right(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_right(seg, seg) IS 'is right of';


--
-- TOC entry 737 (class 1255 OID 5297879)
-- Dependencies: 1494 6 1494
-- Name: seg_same(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_same(seg, seg) RETURNS boolean
    AS '$libdir/seg', 'seg_same'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_same(seg, seg) OWNER TO postgres;

--
-- TOC entry 5177 (class 0 OID 0)
-- Dependencies: 737
-- Name: FUNCTION seg_same(seg, seg); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION seg_same(seg, seg) IS 'same as';


--
-- TOC entry 738 (class 1255 OID 5297880)
-- Dependencies: 6 1494
-- Name: seg_size(seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_size(seg) RETURNS real
    AS '$libdir/seg', 'seg_size'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_size(seg) OWNER TO postgres;

--
-- TOC entry 739 (class 1255 OID 5297881)
-- Dependencies: 1494 6 1494 1494
-- Name: seg_union(seg, seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_union(seg, seg) RETURNS seg
    AS '$libdir/seg', 'seg_union'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_union(seg, seg) OWNER TO postgres;

--
-- TOC entry 740 (class 1255 OID 5297882)
-- Dependencies: 1494 6
-- Name: seg_upper(seg); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION seg_upper(seg) RETURNS real
    AS '$libdir/seg', 'seg_upper'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.seg_upper(seg) OWNER TO postgres;

--
-- TOC entry 741 (class 1255 OID 5297884)
-- Dependencies: 6
-- Name: set_limit(real); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION set_limit(real) RETURNS real
    AS '$libdir/pg_trgm', 'set_limit'
    LANGUAGE c STRICT;


ALTER FUNCTION public.set_limit(real) OWNER TO postgres;

--
-- TOC entry 742 (class 1255 OID 5297885)
-- Dependencies: 6
-- Name: set_timetravel(name, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION set_timetravel(name, integer) RETURNS integer
    AS '$libdir/timetravel', 'set_timetravel'
    LANGUAGE c STRICT;


ALTER FUNCTION public.set_timetravel(name, integer) OWNER TO postgres;

--
-- TOC entry 743 (class 1255 OID 5297891)
-- Dependencies: 6
-- Name: show_limit(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION show_limit() RETURNS real
    AS '$libdir/pg_trgm', 'show_limit'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.show_limit() OWNER TO postgres;

--
-- TOC entry 744 (class 1255 OID 5297892)
-- Dependencies: 6
-- Name: show_trgm(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION show_trgm(text) RETURNS text[]
    AS '$libdir/pg_trgm', 'show_trgm'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.show_trgm(text) OWNER TO postgres;

--
-- TOC entry 745 (class 1255 OID 5297893)
-- Dependencies: 6
-- Name: similarity(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION similarity(text, text) RETURNS real
    AS '$libdir/pg_trgm', 'similarity'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.similarity(text, text) OWNER TO postgres;

--
-- TOC entry 746 (class 1255 OID 5297894)
-- Dependencies: 6
-- Name: similarity_op(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION similarity_op(text, text) RETURNS boolean
    AS '$libdir/pg_trgm', 'similarity_op'
    LANGUAGE c STABLE STRICT;


ALTER FUNCTION public.similarity_op(text, text) OWNER TO postgres;

--
-- TOC entry 747 (class 1255 OID 5297896)
-- Dependencies: 1348 6
-- Name: skeys(hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION skeys(hstore) RETURNS SETOF text
    AS '$libdir/hstore', 'skeys'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.skeys(hstore) OWNER TO postgres;

--
-- TOC entry 748 (class 1255 OID 5297899)
-- Dependencies: 6
-- Name: sort(integer[], text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION sort(integer[], text) RETURNS integer[]
    AS '$libdir/_int', 'sort'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.sort(integer[], text) OWNER TO postgres;

--
-- TOC entry 749 (class 1255 OID 5297900)
-- Dependencies: 6
-- Name: sort(integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION sort(integer[]) RETURNS integer[]
    AS '$libdir/_int', 'sort'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.sort(integer[]) OWNER TO postgres;

--
-- TOC entry 750 (class 1255 OID 5297901)
-- Dependencies: 6
-- Name: sort_asc(integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION sort_asc(integer[]) RETURNS integer[]
    AS '$libdir/_int', 'sort_asc'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.sort_asc(integer[]) OWNER TO postgres;

--
-- TOC entry 751 (class 1255 OID 5297902)
-- Dependencies: 6
-- Name: sort_desc(integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION sort_desc(integer[]) RETURNS integer[]
    AS '$libdir/_int', 'sort_desc'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.sort_desc(integer[]) OWNER TO postgres;

--
-- TOC entry 752 (class 1255 OID 5297903)
-- Dependencies: 6
-- Name: soundex(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION soundex(text) RETURNS text
    AS '$libdir/fuzzystrmatch', 'soundex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.soundex(text) OWNER TO postgres;

--
-- TOC entry 753 (class 1255 OID 5297908)
-- Dependencies: 6
-- Name: ssl_client_cert_present(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ssl_client_cert_present() RETURNS boolean
    AS '$libdir/sslinfo', 'ssl_client_cert_present'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ssl_client_cert_present() OWNER TO postgres;

--
-- TOC entry 754 (class 1255 OID 5297909)
-- Dependencies: 6
-- Name: ssl_client_dn(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ssl_client_dn() RETURNS text
    AS '$libdir/sslinfo', 'ssl_client_dn'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ssl_client_dn() OWNER TO postgres;

--
-- TOC entry 755 (class 1255 OID 5297910)
-- Dependencies: 6
-- Name: ssl_client_dn_field(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ssl_client_dn_field(text) RETURNS text
    AS '$libdir/sslinfo', 'ssl_client_dn_field'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ssl_client_dn_field(text) OWNER TO postgres;

--
-- TOC entry 756 (class 1255 OID 5297911)
-- Dependencies: 6
-- Name: ssl_client_serial(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ssl_client_serial() RETURNS numeric
    AS '$libdir/sslinfo', 'ssl_client_serial'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ssl_client_serial() OWNER TO postgres;

--
-- TOC entry 757 (class 1255 OID 5297912)
-- Dependencies: 6
-- Name: ssl_is_used(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ssl_is_used() RETURNS boolean
    AS '$libdir/sslinfo', 'ssl_is_used'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ssl_is_used() OWNER TO postgres;

--
-- TOC entry 758 (class 1255 OID 5297913)
-- Dependencies: 6
-- Name: ssl_issuer_dn(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ssl_issuer_dn() RETURNS text
    AS '$libdir/sslinfo', 'ssl_issuer_dn'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ssl_issuer_dn() OWNER TO postgres;

--
-- TOC entry 759 (class 1255 OID 5297914)
-- Dependencies: 6
-- Name: ssl_issuer_field(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION ssl_issuer_field(text) RETURNS text
    AS '$libdir/sslinfo', 'ssl_issuer_field'
    LANGUAGE c STRICT;


ALTER FUNCTION public.ssl_issuer_field(text) OWNER TO postgres;

--
-- TOC entry 760 (class 1255 OID 5298117)
-- Dependencies: 6
-- Name: subarray(integer[], integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION subarray(integer[], integer, integer) RETURNS integer[]
    AS '$libdir/_int', 'subarray'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.subarray(integer[], integer, integer) OWNER TO postgres;

--
-- TOC entry 761 (class 1255 OID 5298118)
-- Dependencies: 6
-- Name: subarray(integer[], integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION subarray(integer[], integer) RETURNS integer[]
    AS '$libdir/_int', 'subarray'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.subarray(integer[], integer) OWNER TO postgres;

--
-- TOC entry 762 (class 1255 OID 5298119)
-- Dependencies: 1410 6 1410
-- Name: subltree(ltree, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION subltree(ltree, integer, integer) RETURNS ltree
    AS '$libdir/ltree', 'subltree'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.subltree(ltree, integer, integer) OWNER TO postgres;

--
-- TOC entry 763 (class 1255 OID 5298120)
-- Dependencies: 1410 6 1410
-- Name: subpath(ltree, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION subpath(ltree, integer, integer) RETURNS ltree
    AS '$libdir/ltree', 'subpath'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.subpath(ltree, integer, integer) OWNER TO postgres;

--
-- TOC entry 764 (class 1255 OID 5298121)
-- Dependencies: 1410 6 1410
-- Name: subpath(ltree, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION subpath(ltree, integer) RETURNS ltree
    AS '$libdir/ltree', 'subpath'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.subpath(ltree, integer) OWNER TO postgres;

--
-- TOC entry 765 (class 1255 OID 5298123)
-- Dependencies: 1348 6
-- Name: svals(hstore); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION svals(hstore) RETURNS SETOF text
    AS '$libdir/hstore', 'svals'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.svals(hstore) OWNER TO postgres;

--
-- TOC entry 766 (class 1255 OID 5298126)
-- Dependencies: 6 1348
-- Name: tconvert(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION tconvert(text, text) RETURNS hstore
    AS '$libdir/hstore', 'tconvert'
    LANGUAGE c IMMUTABLE;


ALTER FUNCTION public.tconvert(text, text) OWNER TO postgres;

--
-- TOC entry 767 (class 1255 OID 5298129)
-- Dependencies: 6 1410
-- Name: text2ltree(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION text2ltree(text) RETURNS ltree
    AS '$libdir/ltree', 'text2ltree'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.text2ltree(text) OWNER TO postgres;

--
-- TOC entry 768 (class 1255 OID 5298130)
-- Dependencies: 6
-- Name: text_soundex(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION text_soundex(text) RETURNS text
    AS '$libdir/fuzzystrmatch', 'soundex'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.text_soundex(text) OWNER TO postgres;

--
-- TOC entry 769 (class 1255 OID 5298131)
-- Dependencies: 6
-- Name: timetravel(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION timetravel() RETURNS trigger
    AS '$libdir/timetravel', 'timetravel'
    LANGUAGE c;


ALTER FUNCTION public.timetravel() OWNER TO postgres;

--
-- TOC entry 770 (class 1255 OID 5298135)
-- Dependencies: 6
-- Name: uniq(integer[]); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION uniq(integer[]) RETURNS integer[]
    AS '$libdir/_int', 'uniq'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.uniq(integer[]) OWNER TO postgres;

--
-- TOC entry 771 (class 1255 OID 5298136)
-- Dependencies: 6 1860
-- Name: unlockrows(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION unlockrows(text) RETURNS integer
    AS $_$
DECLARE
	ret int;
BEGIN

	IF NOT LongTransactionsEnabled() THEN
		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
	END IF;

	EXECUTE 'DELETE FROM authorization_table where authid = ' ||
		quote_literal($1);

	GET DIAGNOSTICS ret = ROW_COUNT;

	RETURN ret;
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.unlockrows(text) OWNER TO postgres;

--
-- TOC entry 772 (class 1255 OID 5298137)
-- Dependencies: 6 1293 1592
-- Name: upc(ean13); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION upc(ean13) RETURNS upc
    AS '$libdir/isn', 'upc_cast_from_ean13'
    LANGUAGE c IMMUTABLE STRICT;


ALTER FUNCTION public.upc(ean13) OWNER TO postgres;

--
-- TOC entry 773 (class 1255 OID 5298138)
-- Dependencies: 6
-- Name: update_geometry_stats(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION update_geometry_stats() RETURNS text
    AS $$ SELECT 'update_geometry_stats() has been obsoleted. Statistics are automatically built running the ANALYZE command'::text$$
    LANGUAGE sql;


ALTER FUNCTION public.update_geometry_stats() OWNER TO postgres;

--
-- TOC entry 774 (class 1255 OID 5298139)
-- Dependencies: 6
-- Name: update_geometry_stats(character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION update_geometry_stats(character varying, character varying) RETURNS text
    AS $$SELECT update_geometry_stats();$$
    LANGUAGE sql;


ALTER FUNCTION public.update_geometry_stats(character varying, character varying) OWNER TO postgres;

--
-- TOC entry 775 (class 1255 OID 5298140)
-- Dependencies: 1860 6
-- Name: updategeometrysrid(character varying, character varying, character varying, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION updategeometrysrid(character varying, character varying, character varying, character varying, integer) RETURNS text
    AS $_$
DECLARE
	catalog_name alias for $1; 
	schema_name alias for $2;
	table_name alias for $3;
	column_name alias for $4;
	new_srid alias for $5;
	myrec RECORD;
	okay boolean;
	cname varchar;
	real_schema name;

BEGIN



	-- Find, check or fix schema_name
	IF ( schema_name != '' ) THEN
		okay = 'f';

		FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP
			okay := 't';
		END LOOP;

		IF ( okay <> 't' ) THEN
			RAISE EXCEPTION 'Invalid schema name';
		ELSE
			real_schema = schema_name;
		END IF;
	ELSE
		SELECT INTO real_schema current_schema()::text;
	END IF;


 	-- Find out if the column is in the geometry_columns table
	okay = 'f';
	FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP
		okay := 't';
	END LOOP; 
	IF (okay <> 't') THEN 
		RAISE EXCEPTION 'column not found in geometry_columns table';
		RETURN 'f';
	END IF;

	-- Update ref from geometry_columns table
	EXECUTE 'UPDATE geometry_columns SET SRID = ' || new_srid::text || 
		' where f_table_schema = ' ||
		quote_literal(real_schema) || ' and f_table_name = ' ||
		quote_literal(table_name)  || ' and f_geometry_column = ' ||
		quote_literal(column_name);
	
	-- Make up constraint name
	cname = 'enforce_srid_'  || column_name;

	-- Drop enforce_srid constraint



	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) ||
		'.' || quote_ident(table_name) ||

		' DROP constraint ' || quote_ident(cname);

	-- Update geometries SRID



	EXECUTE 'UPDATE ' || quote_ident(real_schema) ||
		'.' || quote_ident(table_name) ||

		' SET ' || quote_ident(column_name) ||
		' = setSRID(' || quote_ident(column_name) ||
		', ' || new_srid::text || ')';

	-- Reset enforce_srid constraint



	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) ||
		'.' || quote_ident(table_name) ||

		' ADD constraint ' || quote_ident(cname) ||
		' CHECK (srid(' || quote_ident(column_name) ||
		') = ' || new_srid::text || ')';

	RETURN real_schema || '.' || table_name || '.' || column_name ||' SRID changed to ' || new_srid::text;
	
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.updategeometrysrid(character varying, character varying, character varying, character varying, integer) OWNER TO postgres;

--
-- TOC entry 776 (class 1255 OID 5298141)
-- Dependencies: 6 1860
-- Name: updategeometrysrid(character varying, character varying, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION updategeometrysrid(character varying, character varying, character varying, integer) RETURNS text
    AS $_$
DECLARE
	ret  text;
BEGIN
	SELECT UpdateGeometrySRID('',$1,$2,$3,$4) into ret;
	RETURN ret;
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.updategeometrysrid(character varying, character varying, character varying, integer) OWNER TO postgres;

--
-- TOC entry 777 (class 1255 OID 5298142)
-- Dependencies: 1860 6
-- Name: updategeometrysrid(character varying, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION updategeometrysrid(character varying, character varying, integer) RETURNS text
    AS $_$
DECLARE
	ret  text;
BEGIN
	SELECT UpdateGeometrySRID('','',$1,$2,$3) into ret;
	RETURN ret;
END;
$_$
    LANGUAGE plpgsql STRICT;


ALTER FUNCTION public.updategeometrysrid(character varying, character varying, integer) OWNER TO postgres;

--
-- TOC entry 778 (class 1255 OID 5298148)
-- Dependencies: 6
-- Name: xpath_list(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION xpath_list(text, text) RETURNS text
    AS $_$SELECT xpath_list($1,$2,',')$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.xpath_list(text, text) OWNER TO postgres;

--
-- TOC entry 779 (class 1255 OID 5298149)
-- Dependencies: 6
-- Name: xpath_nodeset(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION xpath_nodeset(text, text) RETURNS text
    AS $_$SELECT xpath_nodeset($1,$2,'','')$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.xpath_nodeset(text, text) OWNER TO postgres;

--
-- TOC entry 780 (class 1255 OID 5298150)
-- Dependencies: 6
-- Name: xpath_nodeset(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION xpath_nodeset(text, text, text) RETURNS text
    AS $_$SELECT xpath_nodeset($1,$2,'',$3)$_$
    LANGUAGE sql IMMUTABLE STRICT;


ALTER FUNCTION public.xpath_nodeset(text, text, text) OWNER TO postgres;

--
-- TOC entry 1861 (class 1255 OID 5298158)
-- Dependencies: 435 6 436
-- Name: int_array_aggregate(integer); Type: AGGREGATE; Schema: public; Owner: postgres
--

CREATE AGGREGATE int_array_aggregate(integer) (
    SFUNC = int_agg_state,
    STYPE = integer[],
    FINALFUNC = int_agg_final_array
);


ALTER AGGREGATE public.int_array_aggregate(integer) OWNER TO postgres;

--
-- TOC entry 2564 (class 2617 OID 5298159)
-- Dependencies: 6 430
-- Name: #; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR # (
    PROCEDURE = icount,
    RIGHTARG = integer[]
);


ALTER OPERATOR public.# (NONE, integer[]) OWNER TO postgres;

--
-- TOC entry 2565 (class 2617 OID 5298160)
-- Dependencies: 431 6
-- Name: #; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR # (
    PROCEDURE = idx,
    LEFTARG = integer[],
    RIGHTARG = integer
);


ALTER OPERATOR public.# (integer[], integer) OWNER TO postgres;

--
-- TOC entry 2567 (class 2617 OID 5298161)
-- Dependencies: 746 6
-- Name: %; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR % (
    PROCEDURE = similarity_op,
    LEFTARG = text,
    RIGHTARG = text,
    COMMUTATOR = %,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.% (text, text) OWNER TO postgres;

--
-- TOC entry 2569 (class 2617 OID 5298162)
-- Dependencies: 79 6
-- Name: &; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR & (
    PROCEDURE = _int_inter,
    LEFTARG = integer[],
    RIGHTARG = integer[],
    COMMUTATOR = &
);


ALTER OPERATOR public.& (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2571 (class 2617 OID 5298163)
-- Dependencies: 176 6 1249 1249
-- Name: &&; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR && (
    PROCEDURE = cube_overlap,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = &&,
    RESTRICT = areasel,
    JOIN = areajoinsel
);


ALTER OPERATOR public.&& (cube, cube) OWNER TO postgres;

--
-- TOC entry 2572 (class 2617 OID 5298164)
-- Dependencies: 6 80
-- Name: &&; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR && (
    PROCEDURE = _int_overlap,
    LEFTARG = integer[],
    RIGHTARG = integer[],
    COMMUTATOR = &&,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.&& (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2573 (class 2617 OID 5298165)
-- Dependencies: 1494 1494 6 735
-- Name: &&; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR && (
    PROCEDURE = seg_overlap,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = &&,
    RESTRICT = areasel,
    JOIN = areajoinsel
);


ALTER OPERATOR public.&& (seg, seg) OWNER TO postgres;

--
-- TOC entry 2574 (class 2617 OID 5298166)
-- Dependencies: 1494 6 1494 733
-- Name: &<; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR &< (
    PROCEDURE = seg_over_left,
    LEFTARG = seg,
    RIGHTARG = seg,
    RESTRICT = positionsel,
    JOIN = positionjoinsel
);


ALTER OPERATOR public.&< (seg, seg) OWNER TO postgres;

--
-- TOC entry 2575 (class 2617 OID 5298167)
-- Dependencies: 1494 1494 6 734
-- Name: &>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR &> (
    PROCEDURE = seg_over_right,
    LEFTARG = seg,
    RIGHTARG = seg,
    RESTRICT = positionsel,
    JOIN = positionjoinsel
);


ALTER OPERATOR public.&> (seg, seg) OWNER TO postgres;

--
-- TOC entry 2576 (class 2617 OID 5298168)
-- Dependencies: 440 6
-- Name: +; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR + (
    PROCEDURE = intarray_push_elem,
    LEFTARG = integer[],
    RIGHTARG = integer
);


ALTER OPERATOR public.+ (integer[], integer) OWNER TO postgres;

--
-- TOC entry 2577 (class 2617 OID 5298169)
-- Dependencies: 439 6
-- Name: +; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR + (
    PROCEDURE = intarray_push_array,
    LEFTARG = integer[],
    RIGHTARG = integer[],
    COMMUTATOR = +
);


ALTER OPERATOR public.+ (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2578 (class 2617 OID 5298170)
-- Dependencies: 438 6
-- Name: -; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR - (
    PROCEDURE = intarray_del_elem,
    LEFTARG = integer[],
    RIGHTARG = integer
);


ALTER OPERATOR public.- (integer[], integer) OWNER TO postgres;

--
-- TOC entry 2579 (class 2617 OID 5298171)
-- Dependencies: 442 6
-- Name: -; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR - (
    PROCEDURE = intset_subtract,
    LEFTARG = integer[],
    RIGHTARG = integer[]
);


ALTER OPERATOR public.- (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2580 (class 2617 OID 5298172)
-- Dependencies: 1348 244 6
-- Name: ->; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR -> (
    PROCEDURE = fetchval,
    LEFTARG = hstore,
    RIGHTARG = text
);


ALTER OPERATOR public.-> (hstore, text) OWNER TO postgres;

--
-- TOC entry 2583 (class 2617 OID 5298175)
-- Dependencies: 6 1249 1249 174
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = cube_lt,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (cube, cube) OWNER TO postgres;

--
-- TOC entry 2586 (class 2617 OID 5298178)
-- Dependencies: 6 572 1293 1293
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ean13,
    RIGHTARG = ean13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ean13, ean13) OWNER TO postgres;

--
-- TOC entry 2570 (class 2617 OID 5298181)
-- Dependencies: 6 573 1376 1293
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ean13,
    RIGHTARG = isbn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 2589 (class 2617 OID 5298184)
-- Dependencies: 1293 6 1376 582
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = isbn13,
    RIGHTARG = ean13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 2592 (class 2617 OID 5298187)
-- Dependencies: 6 1293 1383 574
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ean13,
    RIGHTARG = ismn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 2595 (class 2617 OID 5298190)
-- Dependencies: 6 1383 1293 588
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ismn13,
    RIGHTARG = ean13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 2598 (class 2617 OID 5298193)
-- Dependencies: 1293 1388 6 575
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ean13,
    RIGHTARG = issn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ean13, issn13) OWNER TO postgres;

--
-- TOC entry 2601 (class 2617 OID 5298196)
-- Dependencies: 6 1388 1293 594
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = issn13,
    RIGHTARG = ean13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (issn13, ean13) OWNER TO postgres;

--
-- TOC entry 2604 (class 2617 OID 5298199)
-- Dependencies: 576 1293 6 1373
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ean13,
    RIGHTARG = isbn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ean13, isbn) OWNER TO postgres;

--
-- TOC entry 2607 (class 2617 OID 5298202)
-- Dependencies: 6 585 1293 1373
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = isbn,
    RIGHTARG = ean13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (isbn, ean13) OWNER TO postgres;

--
-- TOC entry 2609 (class 2617 OID 5298205)
-- Dependencies: 1380 577 6 1293
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ean13,
    RIGHTARG = ismn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ean13, ismn) OWNER TO postgres;

--
-- TOC entry 2611 (class 2617 OID 5298208)
-- Dependencies: 1293 591 6 1380
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ismn,
    RIGHTARG = ean13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ismn, ean13) OWNER TO postgres;

--
-- TOC entry 2614 (class 2617 OID 5298211)
-- Dependencies: 6 578 1385 1293
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ean13,
    RIGHTARG = issn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ean13, issn) OWNER TO postgres;

--
-- TOC entry 2617 (class 2617 OID 5298214)
-- Dependencies: 597 6 1385 1293
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = issn,
    RIGHTARG = ean13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (issn, ean13) OWNER TO postgres;

--
-- TOC entry 2620 (class 2617 OID 5298217)
-- Dependencies: 6 1293 1592 579
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ean13,
    RIGHTARG = upc,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ean13, upc) OWNER TO postgres;

--
-- TOC entry 2623 (class 2617 OID 5298220)
-- Dependencies: 6 1592 599 1293
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = upc,
    RIGHTARG = ean13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (upc, ean13) OWNER TO postgres;

--
-- TOC entry 2626 (class 2617 OID 5298223)
-- Dependencies: 1376 6 580 1376
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = isbn13,
    RIGHTARG = isbn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 2629 (class 2617 OID 5298226)
-- Dependencies: 581 6 1376 1373
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = isbn13,
    RIGHTARG = isbn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 2632 (class 2617 OID 5298229)
-- Dependencies: 6 584 1376 1373
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = isbn,
    RIGHTARG = isbn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 2635 (class 2617 OID 5298232)
-- Dependencies: 1373 583 6 1373
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = isbn,
    RIGHTARG = isbn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (isbn, isbn) OWNER TO postgres;

--
-- TOC entry 2638 (class 2617 OID 5298235)
-- Dependencies: 6 586 1383 1383
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ismn13,
    RIGHTARG = ismn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 2641 (class 2617 OID 5298238)
-- Dependencies: 6 1380 587 1383
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ismn13,
    RIGHTARG = ismn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 2644 (class 2617 OID 5298241)
-- Dependencies: 590 1383 1380 6
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ismn,
    RIGHTARG = ismn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 2647 (class 2617 OID 5298244)
-- Dependencies: 6 1380 589 1380
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = ismn,
    RIGHTARG = ismn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (ismn, ismn) OWNER TO postgres;

--
-- TOC entry 2650 (class 2617 OID 5298247)
-- Dependencies: 1388 592 1388 6
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = issn13,
    RIGHTARG = issn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (issn13, issn13) OWNER TO postgres;

--
-- TOC entry 2653 (class 2617 OID 5298250)
-- Dependencies: 6 1385 1388 593
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = issn13,
    RIGHTARG = issn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (issn13, issn) OWNER TO postgres;

--
-- TOC entry 2656 (class 2617 OID 5298253)
-- Dependencies: 1385 6 596 1388
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = issn,
    RIGHTARG = issn13,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (issn, issn13) OWNER TO postgres;

--
-- TOC entry 2659 (class 2617 OID 5298256)
-- Dependencies: 1385 1385 6 595
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = issn,
    RIGHTARG = issn,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (issn, issn) OWNER TO postgres;

--
-- TOC entry 2661 (class 2617 OID 5298259)
-- Dependencies: 6 598 1592 1592
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = isnlt,
    LEFTARG = upc,
    RIGHTARG = upc,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (upc, upc) OWNER TO postgres;

--
-- TOC entry 2663 (class 2617 OID 5298262)
-- Dependencies: 1410 1410 6 665
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = ltree_lt,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.< (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2668 (class 2617 OID 5298265)
-- Dependencies: 1494 6 1494 732
-- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR < (
    PROCEDURE = seg_lt,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = >,
    NEGATOR = >=,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.< (seg, seg) OWNER TO postgres;

--
-- TOC entry 2670 (class 2617 OID 5298267)
-- Dependencies: 1494 1494 6 730
-- Name: <<; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR << (
    PROCEDURE = seg_left,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = >>,
    RESTRICT = positionsel,
    JOIN = positionjoinsel
);


ALTER OPERATOR public.<< (seg, seg) OWNER TO postgres;

--
-- TOC entry 2671 (class 2617 OID 5298268)
-- Dependencies: 1249 172 6 1249
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = cube_le,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (cube, cube) OWNER TO postgres;

--
-- TOC entry 2672 (class 2617 OID 5298269)
-- Dependencies: 1293 544 1293 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ean13,
    RIGHTARG = ean13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ean13, ean13) OWNER TO postgres;

--
-- TOC entry 2673 (class 2617 OID 5298270)
-- Dependencies: 6 1293 1376 545
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ean13,
    RIGHTARG = isbn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 2674 (class 2617 OID 5298271)
-- Dependencies: 1293 554 6 1376
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = isbn13,
    RIGHTARG = ean13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 2675 (class 2617 OID 5298272)
-- Dependencies: 1293 546 1383 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ean13,
    RIGHTARG = ismn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 2676 (class 2617 OID 5298273)
-- Dependencies: 6 560 1293 1383
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ismn13,
    RIGHTARG = ean13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 2677 (class 2617 OID 5298274)
-- Dependencies: 1293 1388 6 547
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ean13,
    RIGHTARG = issn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ean13, issn13) OWNER TO postgres;

--
-- TOC entry 2678 (class 2617 OID 5298275)
-- Dependencies: 1293 6 1388 566
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = issn13,
    RIGHTARG = ean13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (issn13, ean13) OWNER TO postgres;

--
-- TOC entry 2679 (class 2617 OID 5298276)
-- Dependencies: 1293 1373 548 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ean13,
    RIGHTARG = isbn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ean13, isbn) OWNER TO postgres;

--
-- TOC entry 2680 (class 2617 OID 5298277)
-- Dependencies: 1373 1293 557 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = isbn,
    RIGHTARG = ean13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (isbn, ean13) OWNER TO postgres;

--
-- TOC entry 2681 (class 2617 OID 5298278)
-- Dependencies: 1293 1380 549 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ean13,
    RIGHTARG = ismn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ean13, ismn) OWNER TO postgres;

--
-- TOC entry 2682 (class 2617 OID 5298279)
-- Dependencies: 1380 1293 563 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ismn,
    RIGHTARG = ean13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ismn, ean13) OWNER TO postgres;

--
-- TOC entry 2683 (class 2617 OID 5298280)
-- Dependencies: 550 6 1293 1385
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ean13,
    RIGHTARG = issn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ean13, issn) OWNER TO postgres;

--
-- TOC entry 2684 (class 2617 OID 5298281)
-- Dependencies: 6 1385 1293 569
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = issn,
    RIGHTARG = ean13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (issn, ean13) OWNER TO postgres;

--
-- TOC entry 2685 (class 2617 OID 5298282)
-- Dependencies: 551 1592 1293 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ean13,
    RIGHTARG = upc,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ean13, upc) OWNER TO postgres;

--
-- TOC entry 2686 (class 2617 OID 5298283)
-- Dependencies: 6 571 1293 1592
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = upc,
    RIGHTARG = ean13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (upc, ean13) OWNER TO postgres;

--
-- TOC entry 2687 (class 2617 OID 5298284)
-- Dependencies: 552 1376 1376 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = isbn13,
    RIGHTARG = isbn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 2688 (class 2617 OID 5298285)
-- Dependencies: 1373 553 6 1376
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = isbn13,
    RIGHTARG = isbn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 2689 (class 2617 OID 5298286)
-- Dependencies: 556 6 1373 1376
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = isbn,
    RIGHTARG = isbn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 2690 (class 2617 OID 5298287)
-- Dependencies: 1373 555 1373 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = isbn,
    RIGHTARG = isbn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (isbn, isbn) OWNER TO postgres;

--
-- TOC entry 2691 (class 2617 OID 5298288)
-- Dependencies: 1383 6 1383 558
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ismn13,
    RIGHTARG = ismn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 2692 (class 2617 OID 5298289)
-- Dependencies: 559 6 1383 1380
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ismn13,
    RIGHTARG = ismn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 2693 (class 2617 OID 5298290)
-- Dependencies: 1383 6 1380 562
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ismn,
    RIGHTARG = ismn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 2694 (class 2617 OID 5298291)
-- Dependencies: 561 6 1380 1380
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = ismn,
    RIGHTARG = ismn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (ismn, ismn) OWNER TO postgres;

--
-- TOC entry 2695 (class 2617 OID 5298292)
-- Dependencies: 564 1388 1388 6
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = issn13,
    RIGHTARG = issn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (issn13, issn13) OWNER TO postgres;

--
-- TOC entry 2696 (class 2617 OID 5298293)
-- Dependencies: 6 1385 1388 565
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = issn13,
    RIGHTARG = issn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (issn13, issn) OWNER TO postgres;

--
-- TOC entry 2697 (class 2617 OID 5298294)
-- Dependencies: 6 1385 1388 568
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = issn,
    RIGHTARG = issn13,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (issn, issn13) OWNER TO postgres;

--
-- TOC entry 2698 (class 2617 OID 5298295)
-- Dependencies: 1385 6 1385 567
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = issn,
    RIGHTARG = issn,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (issn, issn) OWNER TO postgres;

--
-- TOC entry 2699 (class 2617 OID 5298296)
-- Dependencies: 6 1592 1592 570
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = isnle,
    LEFTARG = upc,
    RIGHTARG = upc,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (upc, upc) OWNER TO postgres;

--
-- TOC entry 2701 (class 2617 OID 5298297)
-- Dependencies: 1410 664 6 1410
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = ltree_le,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.<= (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2704 (class 2617 OID 5298298)
-- Dependencies: 1494 729 6 1494
-- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <= (
    PROCEDURE = seg_le,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = >=,
    NEGATOR = >,
    RESTRICT = scalarltsel,
    JOIN = scalarltjoinsel
);


ALTER OPERATOR public.<= (seg, seg) OWNER TO postgres;

--
-- TOC entry 2667 (class 2617 OID 5298300)
-- Dependencies: 6 686 1235
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = ne,
    LEFTARG = chkpass,
    RIGHTARG = text,
    NEGATOR = =
);


ALTER OPERATOR public.<> (chkpass, text) OWNER TO postgres;

--
-- TOC entry 2707 (class 2617 OID 5298302)
-- Dependencies: 175 1249 1249 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = cube_ne,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (cube, cube) OWNER TO postgres;

--
-- TOC entry 2710 (class 2617 OID 5298304)
-- Dependencies: 6 600 1293 1293
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ean13,
    RIGHTARG = ean13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ean13, ean13) OWNER TO postgres;

--
-- TOC entry 2713 (class 2617 OID 5298305)
-- Dependencies: 610 6 1376 1293
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = isbn13,
    RIGHTARG = ean13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 2711 (class 2617 OID 5298307)
-- Dependencies: 6 1293 1376 601
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ean13,
    RIGHTARG = isbn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 2705 (class 2617 OID 5298309)
-- Dependencies: 616 6 1383 1293
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ismn13,
    RIGHTARG = ean13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 2714 (class 2617 OID 5298311)
-- Dependencies: 602 1383 6 1293
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ean13,
    RIGHTARG = ismn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 2715 (class 2617 OID 5298313)
-- Dependencies: 6 1388 1293 622
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = issn13,
    RIGHTARG = ean13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (issn13, ean13) OWNER TO postgres;

--
-- TOC entry 2717 (class 2617 OID 5298315)
-- Dependencies: 603 1388 6 1293
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ean13,
    RIGHTARG = issn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ean13, issn13) OWNER TO postgres;

--
-- TOC entry 2724 (class 2617 OID 5298317)
-- Dependencies: 613 1293 1373 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = isbn,
    RIGHTARG = ean13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (isbn, ean13) OWNER TO postgres;

--
-- TOC entry 2723 (class 2617 OID 5298319)
-- Dependencies: 604 1373 1293 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ean13,
    RIGHTARG = isbn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ean13, isbn) OWNER TO postgres;

--
-- TOC entry 2730 (class 2617 OID 5298321)
-- Dependencies: 1380 619 1293 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ismn,
    RIGHTARG = ean13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ismn, ean13) OWNER TO postgres;

--
-- TOC entry 2727 (class 2617 OID 5298323)
-- Dependencies: 605 1380 1293 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ean13,
    RIGHTARG = ismn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ean13, ismn) OWNER TO postgres;

--
-- TOC entry 2735 (class 2617 OID 5298325)
-- Dependencies: 625 6 1385 1293
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = issn,
    RIGHTARG = ean13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (issn, ean13) OWNER TO postgres;

--
-- TOC entry 2733 (class 2617 OID 5298327)
-- Dependencies: 6 1385 606 1293
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ean13,
    RIGHTARG = issn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ean13, issn) OWNER TO postgres;

--
-- TOC entry 2739 (class 2617 OID 5298329)
-- Dependencies: 6 1592 1293 627
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = upc,
    RIGHTARG = ean13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (upc, ean13) OWNER TO postgres;

--
-- TOC entry 2737 (class 2617 OID 5298331)
-- Dependencies: 1293 1592 607 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ean13,
    RIGHTARG = upc,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ean13, upc) OWNER TO postgres;

--
-- TOC entry 2742 (class 2617 OID 5298334)
-- Dependencies: 1376 6 608 1376
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = isbn13,
    RIGHTARG = isbn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 2731 (class 2617 OID 5298335)
-- Dependencies: 1376 6 1373 612
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = isbn,
    RIGHTARG = isbn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 2721 (class 2617 OID 5298337)
-- Dependencies: 609 6 1376 1373
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = isbn13,
    RIGHTARG = isbn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 2744 (class 2617 OID 5298340)
-- Dependencies: 1373 1373 6 611
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = isbn,
    RIGHTARG = isbn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (isbn, isbn) OWNER TO postgres;

--
-- TOC entry 2747 (class 2617 OID 5298342)
-- Dependencies: 1383 6 1383 614
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ismn13,
    RIGHTARG = ismn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 2753 (class 2617 OID 5298343)
-- Dependencies: 618 6 1383 1380
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ismn,
    RIGHTARG = ismn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 2750 (class 2617 OID 5298345)
-- Dependencies: 6 615 1380 1383
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ismn13,
    RIGHTARG = ismn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 2725 (class 2617 OID 5298348)
-- Dependencies: 617 6 1380 1380
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = ismn,
    RIGHTARG = ismn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ismn, ismn) OWNER TO postgres;

--
-- TOC entry 2751 (class 2617 OID 5298350)
-- Dependencies: 6 1388 1388 620
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = issn13,
    RIGHTARG = issn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (issn13, issn13) OWNER TO postgres;

--
-- TOC entry 2760 (class 2617 OID 5298351)
-- Dependencies: 1385 624 1388 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = issn,
    RIGHTARG = issn13,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (issn, issn13) OWNER TO postgres;

--
-- TOC entry 2758 (class 2617 OID 5298353)
-- Dependencies: 6 1388 1385 621
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = issn13,
    RIGHTARG = issn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (issn13, issn) OWNER TO postgres;

--
-- TOC entry 2756 (class 2617 OID 5298356)
-- Dependencies: 1385 623 1385 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = issn,
    RIGHTARG = issn,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (issn, issn) OWNER TO postgres;

--
-- TOC entry 2763 (class 2617 OID 5298358)
-- Dependencies: 6 626 1592 1592
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = isnne,
    LEFTARG = upc,
    RIGHTARG = upc,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (upc, upc) OWNER TO postgres;

--
-- TOC entry 2764 (class 2617 OID 5298360)
-- Dependencies: 1410 666 1410 6
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = ltree_ne,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2766 (class 2617 OID 5298362)
-- Dependencies: 1494 6 725 1494
-- Name: <>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <> (
    PROCEDURE = seg_different,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = <>,
    NEGATOR = =,
    RESTRICT = neqsel,
    JOIN = neqjoinsel
);


ALTER OPERATOR public.<> (seg, seg) OWNER TO postgres;

--
-- TOC entry 2767 (class 2617 OID 5298364)
-- Dependencies: 1249 6 165 1249
-- Name: <@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <@ (
    PROCEDURE = cube_contained,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = @>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.<@ (cube, cube) OWNER TO postgres;

--
-- TOC entry 2769 (class 2617 OID 5298366)
-- Dependencies: 1348 428 1348 6
-- Name: <@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <@ (
    PROCEDURE = hs_contained,
    LEFTARG = hstore,
    RIGHTARG = hstore,
    COMMUTATOR = @>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.<@ (hstore, hstore) OWNER TO postgres;

--
-- TOC entry 2771 (class 2617 OID 5298368)
-- Dependencies: 6 76
-- Name: <@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <@ (
    PROCEDURE = _int_contained,
    LEFTARG = integer[],
    RIGHTARG = integer[],
    COMMUTATOR = @>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.<@ (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2774 (class 2617 OID 5298370)
-- Dependencies: 673 6 1410 1410 669
-- Name: <@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <@ (
    PROCEDURE = ltree_risparent,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = @>,
    RESTRICT = ltreeparentsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.<@ (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2776 (class 2617 OID 5298372)
-- Dependencies: 95 1410 1412 6
-- Name: <@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <@ (
    PROCEDURE = _ltree_r_isparent,
    LEFTARG = ltree,
    RIGHTARG = ltree[],
    COMMUTATOR = @>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.<@ (ltree, ltree[]) OWNER TO postgres;

--
-- TOC entry 2777 (class 2617 OID 5298374)
-- Dependencies: 97 6 1412 1410
-- Name: <@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <@ (
    PROCEDURE = _ltree_risparent,
    LEFTARG = ltree[],
    RIGHTARG = ltree,
    COMMUTATOR = @>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.<@ (ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 2778 (class 2617 OID 5298376)
-- Dependencies: 723 6 1494 1494
-- Name: <@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <@ (
    PROCEDURE = seg_contained,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = @>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.<@ (seg, seg) OWNER TO postgres;

--
-- TOC entry 2780 (class 2617 OID 5298377)
-- Dependencies: 383 6
-- Name: <@>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR <@> (
    PROCEDURE = geo_distance,
    LEFTARG = point,
    RIGHTARG = point,
    COMMUTATOR = <@>
);


ALTER OPERATOR public.<@> (point, point) OWNER TO postgres;

--
-- TOC entry 2666 (class 2617 OID 5298299)
-- Dependencies: 6 242 1235
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = eq,
    LEFTARG = chkpass,
    RIGHTARG = text,
    NEGATOR = <>
);


ALTER OPERATOR public.= (chkpass, text) OWNER TO postgres;

--
-- TOC entry 2706 (class 2617 OID 5298301)
-- Dependencies: 1249 6 1249 168
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = cube_eq,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (cube, cube) OWNER TO postgres;

--
-- TOC entry 2709 (class 2617 OID 5298303)
-- Dependencies: 6 1293 1293 460
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ean13,
    RIGHTARG = ean13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ean13, ean13) OWNER TO postgres;

--
-- TOC entry 2718 (class 2617 OID 5298306)
-- Dependencies: 461 1376 1293 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ean13,
    RIGHTARG = isbn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 2708 (class 2617 OID 5298308)
-- Dependencies: 470 1293 1376 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = isbn13,
    RIGHTARG = ean13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 2716 (class 2617 OID 5298310)
-- Dependencies: 1383 1293 6 462
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ean13,
    RIGHTARG = ismn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 2712 (class 2617 OID 5298312)
-- Dependencies: 6 1383 1293 476
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ismn13,
    RIGHTARG = ean13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 2782 (class 2617 OID 5298314)
-- Dependencies: 463 1388 1293 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ean13,
    RIGHTARG = issn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ean13, issn13) OWNER TO postgres;

--
-- TOC entry 2720 (class 2617 OID 5298316)
-- Dependencies: 1293 482 6 1388
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = issn13,
    RIGHTARG = ean13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (issn13, ean13) OWNER TO postgres;

--
-- TOC entry 2773 (class 2617 OID 5298318)
-- Dependencies: 464 1373 1293 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ean13,
    RIGHTARG = isbn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ean13, isbn) OWNER TO postgres;

--
-- TOC entry 2722 (class 2617 OID 5298320)
-- Dependencies: 6 1373 1293 473
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = isbn,
    RIGHTARG = ean13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (isbn, ean13) OWNER TO postgres;

--
-- TOC entry 2729 (class 2617 OID 5298322)
-- Dependencies: 1293 6 465 1380
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ean13,
    RIGHTARG = ismn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ean13, ismn) OWNER TO postgres;

--
-- TOC entry 2726 (class 2617 OID 5298324)
-- Dependencies: 479 1293 1380 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ismn,
    RIGHTARG = ean13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ismn, ean13) OWNER TO postgres;

--
-- TOC entry 2734 (class 2617 OID 5298326)
-- Dependencies: 6 1293 1385 466
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ean13,
    RIGHTARG = issn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ean13, issn) OWNER TO postgres;

--
-- TOC entry 2732 (class 2617 OID 5298328)
-- Dependencies: 1293 1385 6 485
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = issn,
    RIGHTARG = ean13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (issn, ean13) OWNER TO postgres;

--
-- TOC entry 2738 (class 2617 OID 5298330)
-- Dependencies: 467 1592 1293 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ean13,
    RIGHTARG = upc,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ean13, upc) OWNER TO postgres;

--
-- TOC entry 2736 (class 2617 OID 5298332)
-- Dependencies: 1293 487 1592 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = upc,
    RIGHTARG = ean13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (upc, ean13) OWNER TO postgres;

--
-- TOC entry 2741 (class 2617 OID 5298333)
-- Dependencies: 468 6 1376 1376
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = isbn13,
    RIGHTARG = isbn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 2743 (class 2617 OID 5298336)
-- Dependencies: 469 6 1376 1373
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = isbn13,
    RIGHTARG = isbn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 2728 (class 2617 OID 5298338)
-- Dependencies: 472 1376 6 1373
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = isbn,
    RIGHTARG = isbn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 2740 (class 2617 OID 5298339)
-- Dependencies: 1373 471 1373 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = isbn,
    RIGHTARG = isbn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (isbn, isbn) OWNER TO postgres;

--
-- TOC entry 2746 (class 2617 OID 5298341)
-- Dependencies: 474 1383 6 1383
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ismn13,
    RIGHTARG = ismn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 2752 (class 2617 OID 5298344)
-- Dependencies: 475 6 1383 1380
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ismn13,
    RIGHTARG = ismn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 2749 (class 2617 OID 5298346)
-- Dependencies: 478 1383 1380 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ismn,
    RIGHTARG = ismn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 2755 (class 2617 OID 5298347)
-- Dependencies: 477 6 1380 1380
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = ismn,
    RIGHTARG = ismn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ismn, ismn) OWNER TO postgres;

--
-- TOC entry 2748 (class 2617 OID 5298349)
-- Dependencies: 6 1388 1388 480
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = issn13,
    RIGHTARG = issn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (issn13, issn13) OWNER TO postgres;

--
-- TOC entry 2759 (class 2617 OID 5298352)
-- Dependencies: 481 6 1388 1385
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = issn13,
    RIGHTARG = issn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (issn13, issn) OWNER TO postgres;

--
-- TOC entry 2757 (class 2617 OID 5298354)
-- Dependencies: 1385 6 484 1388
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = issn,
    RIGHTARG = issn13,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (issn, issn13) OWNER TO postgres;

--
-- TOC entry 2754 (class 2617 OID 5298355)
-- Dependencies: 1385 1385 483 6
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = issn,
    RIGHTARG = issn,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (issn, issn) OWNER TO postgres;

--
-- TOC entry 2762 (class 2617 OID 5298357)
-- Dependencies: 6 486 1592 1592
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = isneq,
    LEFTARG = upc,
    RIGHTARG = upc,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    HASHES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (upc, upc) OWNER TO postgres;

--
-- TOC entry 2761 (class 2617 OID 5298359)
-- Dependencies: 660 6 1410 1410
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = ltree_eq,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2745 (class 2617 OID 5298361)
-- Dependencies: 1494 6 737 1494
-- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR = (
    PROCEDURE = seg_same,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = =,
    NEGATOR = <>,
    MERGES,
    RESTRICT = eqsel,
    JOIN = eqjoinsel
);


ALTER OPERATOR public.= (seg, seg) OWNER TO postgres;

--
-- TOC entry 2783 (class 2617 OID 5298378)
-- Dependencies: 766 6 1348
-- Name: =>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR => (
    PROCEDURE = tconvert,
    LEFTARG = text,
    RIGHTARG = text
);


ALTER OPERATOR public.=> (text, text) OWNER TO postgres;

--
-- TOC entry 2719 (class 2617 OID 5298173)
-- Dependencies: 6 170 1249 1249
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = cube_gt,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (cube, cube) OWNER TO postgres;

--
-- TOC entry 2582 (class 2617 OID 5298176)
-- Dependencies: 516 1293 1293 6
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ean13,
    RIGHTARG = ean13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ean13, ean13) OWNER TO postgres;

--
-- TOC entry 2588 (class 2617 OID 5298179)
-- Dependencies: 1376 526 6 1293
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = isbn13,
    RIGHTARG = ean13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 2585 (class 2617 OID 5298182)
-- Dependencies: 1293 517 6 1376
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ean13,
    RIGHTARG = isbn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 2594 (class 2617 OID 5298185)
-- Dependencies: 1383 532 6 1293
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ismn13,
    RIGHTARG = ean13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 2568 (class 2617 OID 5298188)
-- Dependencies: 518 6 1293 1383
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ean13,
    RIGHTARG = ismn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 2600 (class 2617 OID 5298191)
-- Dependencies: 538 1388 1293 6
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = issn13,
    RIGHTARG = ean13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (issn13, ean13) OWNER TO postgres;

--
-- TOC entry 2591 (class 2617 OID 5298194)
-- Dependencies: 1293 519 1388 6
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ean13,
    RIGHTARG = issn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ean13, issn13) OWNER TO postgres;

--
-- TOC entry 2606 (class 2617 OID 5298197)
-- Dependencies: 529 6 1373 1293
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = isbn,
    RIGHTARG = ean13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (isbn, ean13) OWNER TO postgres;

--
-- TOC entry 2597 (class 2617 OID 5298200)
-- Dependencies: 6 1293 520 1373
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ean13,
    RIGHTARG = isbn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ean13, isbn) OWNER TO postgres;

--
-- TOC entry 2608 (class 2617 OID 5298203)
-- Dependencies: 535 6 1293 1380
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ismn,
    RIGHTARG = ean13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ismn, ean13) OWNER TO postgres;

--
-- TOC entry 2602 (class 2617 OID 5298206)
-- Dependencies: 1380 6 1293 521
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ean13,
    RIGHTARG = ismn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ean13, ismn) OWNER TO postgres;

--
-- TOC entry 2616 (class 2617 OID 5298209)
-- Dependencies: 6 1385 1293 541
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = issn,
    RIGHTARG = ean13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (issn, ean13) OWNER TO postgres;

--
-- TOC entry 2662 (class 2617 OID 5298212)
-- Dependencies: 522 1385 1293 6
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ean13,
    RIGHTARG = issn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ean13, issn) OWNER TO postgres;

--
-- TOC entry 2622 (class 2617 OID 5298215)
-- Dependencies: 543 6 1592 1293
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = upc,
    RIGHTARG = ean13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (upc, ean13) OWNER TO postgres;

--
-- TOC entry 2613 (class 2617 OID 5298218)
-- Dependencies: 1592 523 6 1293
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ean13,
    RIGHTARG = upc,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ean13, upc) OWNER TO postgres;

--
-- TOC entry 2619 (class 2617 OID 5298221)
-- Dependencies: 6 524 1376 1376
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = isbn13,
    RIGHTARG = isbn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 2631 (class 2617 OID 5298224)
-- Dependencies: 1376 528 6 1373
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = isbn,
    RIGHTARG = isbn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 2625 (class 2617 OID 5298227)
-- Dependencies: 525 1376 6 1373
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = isbn13,
    RIGHTARG = isbn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 2628 (class 2617 OID 5298230)
-- Dependencies: 527 6 1373 1373
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = isbn,
    RIGHTARG = isbn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (isbn, isbn) OWNER TO postgres;

--
-- TOC entry 2634 (class 2617 OID 5298233)
-- Dependencies: 1383 6 530 1383
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ismn13,
    RIGHTARG = ismn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 2643 (class 2617 OID 5298236)
-- Dependencies: 1383 6 1380 534
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ismn,
    RIGHTARG = ismn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 2637 (class 2617 OID 5298239)
-- Dependencies: 531 6 1383 1380
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ismn13,
    RIGHTARG = ismn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 2640 (class 2617 OID 5298242)
-- Dependencies: 533 1380 1380 6
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = ismn,
    RIGHTARG = ismn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (ismn, ismn) OWNER TO postgres;

--
-- TOC entry 2646 (class 2617 OID 5298245)
-- Dependencies: 1388 536 1388 6
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = issn13,
    RIGHTARG = issn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (issn13, issn13) OWNER TO postgres;

--
-- TOC entry 2655 (class 2617 OID 5298248)
-- Dependencies: 6 540 1388 1385
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = issn,
    RIGHTARG = issn13,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (issn, issn13) OWNER TO postgres;

--
-- TOC entry 2649 (class 2617 OID 5298251)
-- Dependencies: 6 1388 1385 537
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = issn13,
    RIGHTARG = issn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (issn13, issn) OWNER TO postgres;

--
-- TOC entry 2652 (class 2617 OID 5298254)
-- Dependencies: 1385 1385 6 539
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = issn,
    RIGHTARG = issn,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (issn, issn) OWNER TO postgres;

--
-- TOC entry 2658 (class 2617 OID 5298257)
-- Dependencies: 1592 542 1592 6
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = isngt,
    LEFTARG = upc,
    RIGHTARG = upc,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (upc, upc) OWNER TO postgres;

--
-- TOC entry 2660 (class 2617 OID 5298260)
-- Dependencies: 662 1410 1410 6
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = ltree_gt,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.> (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2703 (class 2617 OID 5298263)
-- Dependencies: 1494 727 6 1494
-- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR > (
    PROCEDURE = seg_gt,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = <,
    NEGATOR = <=,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.> (seg, seg) OWNER TO postgres;

--
-- TOC entry 2610 (class 2617 OID 5298174)
-- Dependencies: 6 1249 1249 169
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = cube_ge,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (cube, cube) OWNER TO postgres;

--
-- TOC entry 2581 (class 2617 OID 5298177)
-- Dependencies: 6 488 1293 1293
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ean13,
    RIGHTARG = ean13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ean13, ean13) OWNER TO postgres;

--
-- TOC entry 2587 (class 2617 OID 5298180)
-- Dependencies: 1293 489 1376 6
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ean13,
    RIGHTARG = isbn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ean13, isbn13) OWNER TO postgres;

--
-- TOC entry 2584 (class 2617 OID 5298183)
-- Dependencies: 6 498 1293 1376
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = isbn13,
    RIGHTARG = ean13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (isbn13, ean13) OWNER TO postgres;

--
-- TOC entry 2593 (class 2617 OID 5298186)
-- Dependencies: 6 1293 1383 490
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ean13,
    RIGHTARG = ismn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ean13, ismn13) OWNER TO postgres;

--
-- TOC entry 2566 (class 2617 OID 5298189)
-- Dependencies: 6 1383 1293 504
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ismn13,
    RIGHTARG = ean13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ismn13, ean13) OWNER TO postgres;

--
-- TOC entry 2599 (class 2617 OID 5298192)
-- Dependencies: 6 491 1388 1293
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ean13,
    RIGHTARG = issn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ean13, issn13) OWNER TO postgres;

--
-- TOC entry 2590 (class 2617 OID 5298195)
-- Dependencies: 6 1293 510 1388
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = issn13,
    RIGHTARG = ean13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (issn13, ean13) OWNER TO postgres;

--
-- TOC entry 2605 (class 2617 OID 5298198)
-- Dependencies: 6 1293 1373 492
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ean13,
    RIGHTARG = isbn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ean13, isbn) OWNER TO postgres;

--
-- TOC entry 2596 (class 2617 OID 5298201)
-- Dependencies: 1293 6 1373 501
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = isbn,
    RIGHTARG = ean13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (isbn, ean13) OWNER TO postgres;

--
-- TOC entry 2603 (class 2617 OID 5298204)
-- Dependencies: 493 6 1293 1380
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ean13,
    RIGHTARG = ismn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ean13, ismn) OWNER TO postgres;

--
-- TOC entry 2664 (class 2617 OID 5298207)
-- Dependencies: 1380 6 507 1293
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ismn,
    RIGHTARG = ean13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ismn, ean13) OWNER TO postgres;

--
-- TOC entry 2615 (class 2617 OID 5298210)
-- Dependencies: 1385 6 1293 494
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ean13,
    RIGHTARG = issn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ean13, issn) OWNER TO postgres;

--
-- TOC entry 2665 (class 2617 OID 5298213)
-- Dependencies: 513 6 1385 1293
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = issn,
    RIGHTARG = ean13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (issn, ean13) OWNER TO postgres;

--
-- TOC entry 2621 (class 2617 OID 5298216)
-- Dependencies: 1592 495 6 1293
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ean13,
    RIGHTARG = upc,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ean13, upc) OWNER TO postgres;

--
-- TOC entry 2612 (class 2617 OID 5298219)
-- Dependencies: 6 515 1293 1592
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = upc,
    RIGHTARG = ean13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (upc, ean13) OWNER TO postgres;

--
-- TOC entry 2618 (class 2617 OID 5298222)
-- Dependencies: 1376 1376 6 496
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = isbn13,
    RIGHTARG = isbn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (isbn13, isbn13) OWNER TO postgres;

--
-- TOC entry 2630 (class 2617 OID 5298225)
-- Dependencies: 1373 6 1376 497
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = isbn13,
    RIGHTARG = isbn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (isbn13, isbn) OWNER TO postgres;

--
-- TOC entry 2624 (class 2617 OID 5298228)
-- Dependencies: 1373 6 500 1376
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = isbn,
    RIGHTARG = isbn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (isbn, isbn13) OWNER TO postgres;

--
-- TOC entry 2627 (class 2617 OID 5298231)
-- Dependencies: 499 1373 1373 6
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = isbn,
    RIGHTARG = isbn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (isbn, isbn) OWNER TO postgres;

--
-- TOC entry 2633 (class 2617 OID 5298234)
-- Dependencies: 1383 6 502 1383
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ismn13,
    RIGHTARG = ismn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ismn13, ismn13) OWNER TO postgres;

--
-- TOC entry 2642 (class 2617 OID 5298237)
-- Dependencies: 503 6 1383 1380
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ismn13,
    RIGHTARG = ismn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ismn13, ismn) OWNER TO postgres;

--
-- TOC entry 2636 (class 2617 OID 5298240)
-- Dependencies: 506 6 1380 1383
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ismn,
    RIGHTARG = ismn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ismn, ismn13) OWNER TO postgres;

--
-- TOC entry 2639 (class 2617 OID 5298243)
-- Dependencies: 6 1380 1380 505
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = ismn,
    RIGHTARG = ismn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (ismn, ismn) OWNER TO postgres;

--
-- TOC entry 2645 (class 2617 OID 5298246)
-- Dependencies: 508 1388 6 1388
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = issn13,
    RIGHTARG = issn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (issn13, issn13) OWNER TO postgres;

--
-- TOC entry 2654 (class 2617 OID 5298249)
-- Dependencies: 6 509 1385 1388
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = issn13,
    RIGHTARG = issn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (issn13, issn) OWNER TO postgres;

--
-- TOC entry 2648 (class 2617 OID 5298252)
-- Dependencies: 512 6 1385 1388
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = issn,
    RIGHTARG = issn13,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (issn, issn13) OWNER TO postgres;

--
-- TOC entry 2651 (class 2617 OID 5298255)
-- Dependencies: 1385 6 1385 511
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = issn,
    RIGHTARG = issn,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (issn, issn) OWNER TO postgres;

--
-- TOC entry 2657 (class 2617 OID 5298258)
-- Dependencies: 6 514 1592 1592
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = isnge,
    LEFTARG = upc,
    RIGHTARG = upc,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (upc, upc) OWNER TO postgres;

--
-- TOC entry 2700 (class 2617 OID 5298261)
-- Dependencies: 661 1410 6 1410
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = ltree_ge,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.>= (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2702 (class 2617 OID 5298264)
-- Dependencies: 1494 726 6 1494
-- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >= (
    PROCEDURE = seg_ge,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = <=,
    NEGATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);


ALTER OPERATOR public.>= (seg, seg) OWNER TO postgres;

--
-- TOC entry 2669 (class 2617 OID 5298266)
-- Dependencies: 1494 736 6 1494
-- Name: >>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR >> (
    PROCEDURE = seg_right,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = <<,
    RESTRICT = positionsel,
    JOIN = positionjoinsel
);


ALTER OPERATOR public.>> (seg, seg) OWNER TO postgres;

--
-- TOC entry 2784 (class 2617 OID 5298379)
-- Dependencies: 243 6 1348
-- Name: ?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ? (
    PROCEDURE = exist,
    LEFTARG = hstore,
    RIGHTARG = text,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.? (hstore, text) OWNER TO postgres;

--
-- TOC entry 2786 (class 2617 OID 5298380)
-- Dependencies: 649 1410 6 1409
-- Name: ?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ? (
    PROCEDURE = lt_q_regex,
    LEFTARG = ltree,
    RIGHTARG = lquery[],
    COMMUTATOR = ?,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.? (ltree, lquery[]) OWNER TO postgres;

--
-- TOC entry 2785 (class 2617 OID 5298381)
-- Dependencies: 1409 1410 650 6
-- Name: ?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ? (
    PROCEDURE = lt_q_rregex,
    LEFTARG = lquery[],
    RIGHTARG = ltree,
    COMMUTATOR = ?,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.? (lquery[], ltree) OWNER TO postgres;

--
-- TOC entry 2790 (class 2617 OID 5298382)
-- Dependencies: 1409 6 83 1412
-- Name: ?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ? (
    PROCEDURE = _lt_q_regex,
    LEFTARG = ltree[],
    RIGHTARG = lquery[],
    COMMUTATOR = ?,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.? (ltree[], lquery[]) OWNER TO postgres;

--
-- TOC entry 2788 (class 2617 OID 5298383)
-- Dependencies: 6 1409 1412 84
-- Name: ?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ? (
    PROCEDURE = _lt_q_rregex,
    LEFTARG = lquery[],
    RIGHTARG = ltree[],
    COMMUTATOR = ?,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.? (lquery[], ltree[]) OWNER TO postgres;

--
-- TOC entry 2791 (class 2617 OID 5298384)
-- Dependencies: 1410 1412 6 91 1410
-- Name: ?<@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ?<@ (
    PROCEDURE = _ltree_extract_risparent,
    LEFTARG = ltree[],
    RIGHTARG = ltree
);


ALTER OPERATOR public.?<@ (ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 2792 (class 2617 OID 5298385)
-- Dependencies: 6 1412 1416 1410 101
-- Name: ?@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ?@ (
    PROCEDURE = _ltxtq_extract_exec,
    LEFTARG = ltree[],
    RIGHTARG = ltxtquery
);


ALTER OPERATOR public.?@ (ltree[], ltxtquery) OWNER TO postgres;

--
-- TOC entry 2793 (class 2617 OID 5298386)
-- Dependencies: 6 1412 1410 90 1410
-- Name: ?@>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ?@> (
    PROCEDURE = _ltree_extract_isparent,
    LEFTARG = ltree[],
    RIGHTARG = ltree
);


ALTER OPERATOR public.?@> (ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 2794 (class 2617 OID 5298387)
-- Dependencies: 6 1407 1410 85 1412
-- Name: ?~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ?~ (
    PROCEDURE = _ltq_extract_regex,
    LEFTARG = ltree[],
    RIGHTARG = lquery
);


ALTER OPERATOR public.?~ (ltree[], lquery) OWNER TO postgres;

--
-- TOC entry 2796 (class 2617 OID 5298389)
-- Dependencies: 6 166 1249 1249
-- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @ (
    PROCEDURE = cube_contains,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = ~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@ (cube, cube) OWNER TO postgres;

--
-- TOC entry 2798 (class 2617 OID 5298391)
-- Dependencies: 1348 429 1348 6
-- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @ (
    PROCEDURE = hs_contains,
    LEFTARG = hstore,
    RIGHTARG = hstore,
    COMMUTATOR = ~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@ (hstore, hstore) OWNER TO postgres;

--
-- TOC entry 2781 (class 2617 OID 5298393)
-- Dependencies: 77 6
-- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @ (
    PROCEDURE = _int_contains,
    LEFTARG = integer[],
    RIGHTARG = integer[],
    COMMUTATOR = ~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@ (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2800 (class 2617 OID 5298394)
-- Dependencies: 1416 6 1410 674
-- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @ (
    PROCEDURE = ltxtq_exec,
    LEFTARG = ltree,
    RIGHTARG = ltxtquery,
    COMMUTATOR = @,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@ (ltree, ltxtquery) OWNER TO postgres;

--
-- TOC entry 2789 (class 2617 OID 5298395)
-- Dependencies: 1410 6 675 1416
-- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @ (
    PROCEDURE = ltxtq_rexec,
    LEFTARG = ltxtquery,
    RIGHTARG = ltree,
    COMMUTATOR = @,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@ (ltxtquery, ltree) OWNER TO postgres;

--
-- TOC entry 2802 (class 2617 OID 5298396)
-- Dependencies: 1412 1416 100 6
-- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @ (
    PROCEDURE = _ltxtq_exec,
    LEFTARG = ltree[],
    RIGHTARG = ltxtquery,
    COMMUTATOR = @,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@ (ltree[], ltxtquery) OWNER TO postgres;

--
-- TOC entry 2801 (class 2617 OID 5298397)
-- Dependencies: 6 1416 1412 102
-- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @ (
    PROCEDURE = _ltxtq_rexec,
    LEFTARG = ltxtquery,
    RIGHTARG = ltree[],
    COMMUTATOR = @,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@ (ltxtquery, ltree[]) OWNER TO postgres;

--
-- TOC entry 2804 (class 2617 OID 5298399)
-- Dependencies: 724 1494 1494 6
-- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @ (
    PROCEDURE = seg_contains,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = ~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@ (seg, seg) OWNER TO postgres;

--
-- TOC entry 2765 (class 2617 OID 5298363)
-- Dependencies: 166 6 1249 1249
-- Name: @>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @> (
    PROCEDURE = cube_contains,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = <@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@> (cube, cube) OWNER TO postgres;

--
-- TOC entry 2768 (class 2617 OID 5298365)
-- Dependencies: 1348 429 1348 6
-- Name: @>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @> (
    PROCEDURE = hs_contains,
    LEFTARG = hstore,
    RIGHTARG = hstore,
    COMMUTATOR = <@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@> (hstore, hstore) OWNER TO postgres;

--
-- TOC entry 2770 (class 2617 OID 5298367)
-- Dependencies: 6 77
-- Name: @>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @> (
    PROCEDURE = _int_contains,
    LEFTARG = integer[],
    RIGHTARG = integer[],
    COMMUTATOR = <@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@> (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2772 (class 2617 OID 5298369)
-- Dependencies: 1410 6 1410 663 673
-- Name: @>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @> (
    PROCEDURE = ltree_isparent,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = <@,
    RESTRICT = ltreeparentsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@> (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2805 (class 2617 OID 5298371)
-- Dependencies: 6 92 1410 1412
-- Name: @>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @> (
    PROCEDURE = _ltree_isparent,
    LEFTARG = ltree[],
    RIGHTARG = ltree,
    COMMUTATOR = <@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@> (ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 2807 (class 2617 OID 5298373)
-- Dependencies: 1412 96 1410 6
-- Name: @>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @> (
    PROCEDURE = _ltree_r_risparent,
    LEFTARG = ltree,
    RIGHTARG = ltree[],
    COMMUTATOR = <@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@> (ltree, ltree[]) OWNER TO postgres;

--
-- TOC entry 2808 (class 2617 OID 5298375)
-- Dependencies: 1494 1494 6 724
-- Name: @>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @> (
    PROCEDURE = seg_contains,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = <@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@> (seg, seg) OWNER TO postgres;

--
-- TOC entry 2775 (class 2617 OID 5298401)
-- Dependencies: 6 1467 111
-- Name: @@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR @@ (
    PROCEDURE = boolop,
    LEFTARG = integer[],
    RIGHTARG = query_int,
    COMMUTATOR = ~~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.@@ (integer[], query_int) OWNER TO postgres;

--
-- TOC entry 2799 (class 2617 OID 5298403)
-- Dependencies: 1410 1410 669 6
-- Name: ^<@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^<@ (
    PROCEDURE = ltree_risparent,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = ^@>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^<@ (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2806 (class 2617 OID 5298405)
-- Dependencies: 1410 95 6 1412
-- Name: ^<@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^<@ (
    PROCEDURE = _ltree_r_isparent,
    LEFTARG = ltree,
    RIGHTARG = ltree[],
    COMMUTATOR = ^@>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^<@ (ltree, ltree[]) OWNER TO postgres;

--
-- TOC entry 2810 (class 2617 OID 5298407)
-- Dependencies: 97 6 1410 1412
-- Name: ^<@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^<@ (
    PROCEDURE = _ltree_risparent,
    LEFTARG = ltree[],
    RIGHTARG = ltree,
    COMMUTATOR = ^@>,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^<@ (ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 2814 (class 2617 OID 5298408)
-- Dependencies: 1410 649 1409 6
-- Name: ^?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^? (
    PROCEDURE = lt_q_regex,
    LEFTARG = ltree,
    RIGHTARG = lquery[],
    COMMUTATOR = ^?,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^? (ltree, lquery[]) OWNER TO postgres;

--
-- TOC entry 2812 (class 2617 OID 5298409)
-- Dependencies: 6 1409 1410 650
-- Name: ^?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^? (
    PROCEDURE = lt_q_rregex,
    LEFTARG = lquery[],
    RIGHTARG = ltree,
    COMMUTATOR = ^?,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^? (lquery[], ltree) OWNER TO postgres;

--
-- TOC entry 2815 (class 2617 OID 5298410)
-- Dependencies: 1409 6 1412 83
-- Name: ^?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^? (
    PROCEDURE = _lt_q_regex,
    LEFTARG = ltree[],
    RIGHTARG = lquery[],
    COMMUTATOR = ^?,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^? (ltree[], lquery[]) OWNER TO postgres;

--
-- TOC entry 2813 (class 2617 OID 5298411)
-- Dependencies: 1412 84 6 1409
-- Name: ^?; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^? (
    PROCEDURE = _lt_q_rregex,
    LEFTARG = lquery[],
    RIGHTARG = ltree[],
    COMMUTATOR = ^?,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^? (lquery[], ltree[]) OWNER TO postgres;

--
-- TOC entry 2811 (class 2617 OID 5298412)
-- Dependencies: 1416 674 1410 6
-- Name: ^@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^@ (
    PROCEDURE = ltxtq_exec,
    LEFTARG = ltree,
    RIGHTARG = ltxtquery,
    COMMUTATOR = ^@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^@ (ltree, ltxtquery) OWNER TO postgres;

--
-- TOC entry 2816 (class 2617 OID 5298413)
-- Dependencies: 675 1416 6 1410
-- Name: ^@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^@ (
    PROCEDURE = ltxtq_rexec,
    LEFTARG = ltxtquery,
    RIGHTARG = ltree,
    COMMUTATOR = ^@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^@ (ltxtquery, ltree) OWNER TO postgres;

--
-- TOC entry 2821 (class 2617 OID 5298414)
-- Dependencies: 1416 6 100 1412
-- Name: ^@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^@ (
    PROCEDURE = _ltxtq_exec,
    LEFTARG = ltree[],
    RIGHTARG = ltxtquery,
    COMMUTATOR = ^@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^@ (ltree[], ltxtquery) OWNER TO postgres;

--
-- TOC entry 2819 (class 2617 OID 5298415)
-- Dependencies: 1412 6 102 1416
-- Name: ^@; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^@ (
    PROCEDURE = _ltxtq_rexec,
    LEFTARG = ltxtquery,
    RIGHTARG = ltree[],
    COMMUTATOR = ^@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^@ (ltxtquery, ltree[]) OWNER TO postgres;

--
-- TOC entry 2818 (class 2617 OID 5298402)
-- Dependencies: 1410 663 1410 6
-- Name: ^@>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^@> (
    PROCEDURE = ltree_isparent,
    LEFTARG = ltree,
    RIGHTARG = ltree,
    COMMUTATOR = ^<@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^@> (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2822 (class 2617 OID 5298404)
-- Dependencies: 92 6 1410 1412
-- Name: ^@>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^@> (
    PROCEDURE = _ltree_isparent,
    LEFTARG = ltree[],
    RIGHTARG = ltree,
    COMMUTATOR = ^<@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^@> (ltree[], ltree) OWNER TO postgres;

--
-- TOC entry 2787 (class 2617 OID 5298406)
-- Dependencies: 1412 6 1410 96
-- Name: ^@>; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^@> (
    PROCEDURE = _ltree_r_risparent,
    LEFTARG = ltree,
    RIGHTARG = ltree[],
    COMMUTATOR = ^<@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^@> (ltree, ltree[]) OWNER TO postgres;

--
-- TOC entry 2824 (class 2617 OID 5298416)
-- Dependencies: 651 1410 1407 6
-- Name: ^~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^~ (
    PROCEDURE = ltq_regex,
    LEFTARG = ltree,
    RIGHTARG = lquery,
    COMMUTATOR = ^~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^~ (ltree, lquery) OWNER TO postgres;

--
-- TOC entry 2820 (class 2617 OID 5298417)
-- Dependencies: 1407 6 652 1410
-- Name: ^~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^~ (
    PROCEDURE = ltq_rregex,
    LEFTARG = lquery,
    RIGHTARG = ltree,
    COMMUTATOR = ^~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^~ (lquery, ltree) OWNER TO postgres;

--
-- TOC entry 2817 (class 2617 OID 5298418)
-- Dependencies: 6 86 1412 1407
-- Name: ^~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^~ (
    PROCEDURE = _ltq_regex,
    LEFTARG = ltree[],
    RIGHTARG = lquery,
    COMMUTATOR = ^~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^~ (ltree[], lquery) OWNER TO postgres;

--
-- TOC entry 2823 (class 2617 OID 5298419)
-- Dependencies: 87 1412 6 1407
-- Name: ^~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ^~ (
    PROCEDURE = _ltq_rregex,
    LEFTARG = lquery,
    RIGHTARG = ltree[],
    COMMUTATOR = ^~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.^~ (lquery, ltree[]) OWNER TO postgres;

--
-- TOC entry 2825 (class 2617 OID 5298420)
-- Dependencies: 6 443
-- Name: |; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR | (
    PROCEDURE = intset_union_elem,
    LEFTARG = integer[],
    RIGHTARG = integer
);


ALTER OPERATOR public.| (integer[], integer) OWNER TO postgres;

--
-- TOC entry 2827 (class 2617 OID 5298421)
-- Dependencies: 82 6
-- Name: |; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR | (
    PROCEDURE = _int_union,
    LEFTARG = integer[],
    RIGHTARG = integer[],
    COMMUTATOR = |
);


ALTER OPERATOR public.| (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2826 (class 2617 OID 5298422)
-- Dependencies: 1348 427 6 1348 1348
-- Name: ||; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR || (
    PROCEDURE = hs_concat,
    LEFTARG = hstore,
    RIGHTARG = hstore
);


ALTER OPERATOR public.|| (hstore, hstore) OWNER TO postgres;

--
-- TOC entry 2828 (class 2617 OID 5298423)
-- Dependencies: 1410 654 6 1410 1410
-- Name: ||; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR || (
    PROCEDURE = ltree_addltree,
    LEFTARG = ltree,
    RIGHTARG = ltree
);


ALTER OPERATOR public.|| (ltree, ltree) OWNER TO postgres;

--
-- TOC entry 2829 (class 2617 OID 5298424)
-- Dependencies: 1410 1410 655 6
-- Name: ||; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR || (
    PROCEDURE = ltree_addtext,
    LEFTARG = ltree,
    RIGHTARG = text
);


ALTER OPERATOR public.|| (ltree, text) OWNER TO postgres;

--
-- TOC entry 2830 (class 2617 OID 5298425)
-- Dependencies: 6 1410 1410 671
-- Name: ||; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR || (
    PROCEDURE = ltree_textadd,
    LEFTARG = text,
    RIGHTARG = ltree
);


ALTER OPERATOR public.|| (text, ltree) OWNER TO postgres;

--
-- TOC entry 2795 (class 2617 OID 5298388)
-- Dependencies: 1249 165 1249 6
-- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~ (
    PROCEDURE = cube_contained,
    LEFTARG = cube,
    RIGHTARG = cube,
    COMMUTATOR = @,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~ (cube, cube) OWNER TO postgres;

--
-- TOC entry 2797 (class 2617 OID 5298390)
-- Dependencies: 428 6 1348 1348
-- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~ (
    PROCEDURE = hs_contained,
    LEFTARG = hstore,
    RIGHTARG = hstore,
    COMMUTATOR = @,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~ (hstore, hstore) OWNER TO postgres;

--
-- TOC entry 2779 (class 2617 OID 5298392)
-- Dependencies: 76 6
-- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~ (
    PROCEDURE = _int_contained,
    LEFTARG = integer[],
    RIGHTARG = integer[],
    COMMUTATOR = @,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~ (integer[], integer[]) OWNER TO postgres;

--
-- TOC entry 2803 (class 2617 OID 5298398)
-- Dependencies: 6 1494 1494 723
-- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~ (
    PROCEDURE = seg_contained,
    LEFTARG = seg,
    RIGHTARG = seg,
    COMMUTATOR = @,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~ (seg, seg) OWNER TO postgres;

--
-- TOC entry 2832 (class 2617 OID 5298426)
-- Dependencies: 6 1407 651 1410
-- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~ (
    PROCEDURE = ltq_regex,
    LEFTARG = ltree,
    RIGHTARG = lquery,
    COMMUTATOR = ~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~ (ltree, lquery) OWNER TO postgres;

--
-- TOC entry 2831 (class 2617 OID 5298427)
-- Dependencies: 1407 652 1410 6
-- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~ (
    PROCEDURE = ltq_rregex,
    LEFTARG = lquery,
    RIGHTARG = ltree,
    COMMUTATOR = ~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~ (lquery, ltree) OWNER TO postgres;

--
-- TOC entry 2834 (class 2617 OID 5298428)
-- Dependencies: 1407 86 6 1412
-- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~ (
    PROCEDURE = _ltq_regex,
    LEFTARG = ltree[],
    RIGHTARG = lquery,
    COMMUTATOR = ~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~ (ltree[], lquery) OWNER TO postgres;

--
-- TOC entry 2833 (class 2617 OID 5298429)
-- Dependencies: 6 87 1412 1407
-- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~ (
    PROCEDURE = _ltq_rregex,
    LEFTARG = lquery,
    RIGHTARG = ltree[],
    COMMUTATOR = ~,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~ (lquery, ltree[]) OWNER TO postgres;

--
-- TOC entry 2809 (class 2617 OID 5298400)
-- Dependencies: 1467 719 6
-- Name: ~~; Type: OPERATOR; Schema: public; Owner: postgres
--

CREATE OPERATOR ~~ (
    PROCEDURE = rboolop,
    LEFTARG = query_int,
    RIGHTARG = integer[],
    COMMUTATOR = @@,
    RESTRICT = contsel,
    JOIN = contjoinsel
);


ALTER OPERATOR public.~~ (query_int, integer[]) OWNER TO postgres;

--
-- TOC entry 3106 (class 2753 OID 5298430)
-- Dependencies: 6
-- Name: cube_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY cube_ops USING btree;


ALTER OPERATOR FAMILY public.cube_ops USING btree OWNER TO ccdbd_dev;

--
-- TOC entry 2947 (class 2616 OID 5298431)
-- Dependencies: 1249 3106 6
-- Name: cube_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS cube_ops
    DEFAULT FOR TYPE cube USING btree AS
    OPERATOR 1 <(cube,cube) ,
    OPERATOR 2 <=(cube,cube) ,
    OPERATOR 3 =(cube,cube) ,
    OPERATOR 4 >=(cube,cube) ,
    OPERATOR 5 >(cube,cube) ,
    FUNCTION 1 cube_cmp(cube,cube);


ALTER OPERATOR CLASS public.cube_ops USING btree OWNER TO postgres;

--
-- TOC entry 3107 (class 2753 OID 5298438)
-- Dependencies: 6
-- Name: isn_ops; Type: OPERATOR FAMILY; Schema: public; Owner: postgres
--

CREATE OPERATOR FAMILY isn_ops USING btree;
ALTER OPERATOR FAMILY isn_ops USING btree ADD
    OPERATOR 1 <(ismn,ean13) ,
    OPERATOR 1 <(ismn13,ismn) ,
    OPERATOR 1 <(ismn13,ean13) ,
    OPERATOR 1 <(isbn,isbn13) ,
    OPERATOR 1 <(isbn,ean13) ,
    OPERATOR 1 <(isbn13,isbn) ,
    OPERATOR 1 <(isbn13,ean13) ,
    OPERATOR 1 <(ean13,ismn13) ,
    OPERATOR 1 <(ean13,issn13) ,
    OPERATOR 1 <(ean13,isbn) ,
    OPERATOR 1 <(ean13,ismn) ,
    OPERATOR 1 <(ean13,issn) ,
    OPERATOR 1 <(ean13,isbn13) ,
    OPERATOR 1 <(ean13,upc) ,
    OPERATOR 1 <(upc,ean13) ,
    OPERATOR 1 <(issn,issn13) ,
    OPERATOR 1 <(issn,ean13) ,
    OPERATOR 1 <(issn13,issn) ,
    OPERATOR 1 <(issn13,ean13) ,
    OPERATOR 1 <(ismn,ismn13) ,
    OPERATOR 2 <=(ean13,issn) ,
    OPERATOR 2 <=(ean13,isbn13) ,
    OPERATOR 2 <=(ean13,ismn13) ,
    OPERATOR 2 <=(ean13,issn13) ,
    OPERATOR 2 <=(ean13,isbn) ,
    OPERATOR 2 <=(ean13,ismn) ,
    OPERATOR 2 <=(ean13,upc) ,
    OPERATOR 2 <=(isbn13,ean13) ,
    OPERATOR 2 <=(isbn13,isbn) ,
    OPERATOR 2 <=(isbn,ean13) ,
    OPERATOR 2 <=(isbn,isbn13) ,
    OPERATOR 2 <=(ismn13,ean13) ,
    OPERATOR 2 <=(ismn13,ismn) ,
    OPERATOR 2 <=(ismn,ean13) ,
    OPERATOR 2 <=(ismn,ismn13) ,
    OPERATOR 2 <=(issn13,ean13) ,
    OPERATOR 2 <=(issn13,issn) ,
    OPERATOR 2 <=(issn,ean13) ,
    OPERATOR 2 <=(issn,issn13) ,
    OPERATOR 2 <=(upc,ean13) ,
    OPERATOR 3 =(ean13,issn13) ,
    OPERATOR 3 =(issn,ean13) ,
    OPERATOR 3 =(issn,issn13) ,
    OPERATOR 3 =(isbn,ean13) ,
    OPERATOR 3 =(isbn,isbn13) ,
    OPERATOR 3 =(ismn13,ean13) ,
    OPERATOR 3 =(ismn13,ismn) ,
    OPERATOR 3 =(ean13,upc) ,
    OPERATOR 3 =(ean13,issn) ,
    OPERATOR 3 =(ismn,ean13) ,
    OPERATOR 3 =(ismn,ismn13) ,
    OPERATOR 3 =(ean13,ismn) ,
    OPERATOR 3 =(ean13,isbn) ,
    OPERATOR 3 =(ean13,isbn13) ,
    OPERATOR 3 =(issn13,ean13) ,
    OPERATOR 3 =(issn13,issn) ,
    OPERATOR 3 =(isbn13,isbn) ,
    OPERATOR 3 =(ean13,ismn13) ,
    OPERATOR 3 =(upc,ean13) ,
    OPERATOR 3 =(isbn13,ean13) ,
    OPERATOR 4 >=(ean13,ismn) ,
    OPERATOR 4 >=(ismn13,ean13) ,
    OPERATOR 4 >=(ismn13,ismn) ,
    OPERATOR 4 >=(ean13,upc) ,
    OPERATOR 4 >=(ismn,ean13) ,
    OPERATOR 4 >=(ismn,ismn13) ,
    OPERATOR 4 >=(ean13,issn) ,
    OPERATOR 4 >=(isbn13,ean13) ,
    OPERATOR 4 >=(isbn13,isbn) ,
    OPERATOR 4 >=(ean13,isbn) ,
    OPERATOR 4 >=(ean13,issn13) ,
    OPERATOR 4 >=(issn13,ean13) ,
    OPERATOR 4 >=(issn13,issn) ,
    OPERATOR 4 >=(isbn,ean13) ,
    OPERATOR 4 >=(isbn,isbn13) ,
    OPERATOR 4 >=(ean13,ismn13) ,
    OPERATOR 4 >=(ean13,isbn13) ,
    OPERATOR 4 >=(issn,ean13) ,
    OPERATOR 4 >=(issn,issn13) ,
    OPERATOR 4 >=(upc,ean13) ,
    OPERATOR 5 >(issn13,issn) ,
    OPERATOR 5 >(isbn,ean13) ,
    OPERATOR 5 >(isbn,isbn13) ,
    OPERATOR 5 >(ismn13,ean13) ,
    OPERATOR 5 >(ismn13,ismn) ,
    OPERATOR 5 >(isbn13,ean13) ,
    OPERATOR 5 >(ean13,isbn13) ,
    OPERATOR 5 >(issn,ean13) ,
    OPERATOR 5 >(issn,issn13) ,
    OPERATOR 5 >(ean13,ismn13) ,
    OPERATOR 5 >(ean13,issn13) ,
    OPERATOR 5 >(isbn13,isbn) ,
    OPERATOR 5 >(issn13,ean13) ,
    OPERATOR 5 >(ismn,ean13) ,
    OPERATOR 5 >(ismn,ismn13) ,
    OPERATOR 5 >(ean13,isbn) ,
    OPERATOR 5 >(ean13,ismn) ,
    OPERATOR 5 >(ean13,issn) ,
    OPERATOR 5 >(upc,ean13) ,
    OPERATOR 5 >(ean13,upc) ,
    FUNCTION 1 (ean13, isbn13) btean13cmp(ean13,isbn13) ,
    FUNCTION 1 (ean13, ismn13) btean13cmp(ean13,ismn13) ,
    FUNCTION 1 (ean13, issn13) btean13cmp(ean13,issn13) ,
    FUNCTION 1 (ean13, isbn) btean13cmp(ean13,isbn) ,
    FUNCTION 1 (ean13, ismn) btean13cmp(ean13,ismn) ,
    FUNCTION 1 (ean13, issn) btean13cmp(ean13,issn) ,
    FUNCTION 1 (ean13, upc) btean13cmp(ean13,upc) ,
    FUNCTION 1 (isbn13, ean13) btisbn13cmp(isbn13,ean13) ,
    FUNCTION 1 (isbn13, isbn) btisbn13cmp(isbn13,isbn) ,
    FUNCTION 1 (isbn, ean13) btisbncmp(isbn,ean13) ,
    FUNCTION 1 (isbn, isbn13) btisbncmp(isbn,isbn13) ,
    FUNCTION 1 (ismn13, ean13) btismn13cmp(ismn13,ean13) ,
    FUNCTION 1 (ismn13, ismn) btismn13cmp(ismn13,ismn) ,
    FUNCTION 1 (ismn, ean13) btismncmp(ismn,ean13) ,
    FUNCTION 1 (ismn, ismn13) btismncmp(ismn,ismn13) ,
    FUNCTION 1 (issn13, ean13) btissn13cmp(issn13,ean13) ,
    FUNCTION 1 (issn13, issn) btissn13cmp(issn13,issn) ,
    FUNCTION 1 (issn, ean13) btissncmp(issn,ean13) ,
    FUNCTION 1 (issn, issn13) btissncmp(issn,issn13) ,
    FUNCTION 1 (upc, ean13) btupccmp(upc,ean13);


ALTER OPERATOR FAMILY public.isn_ops USING btree OWNER TO postgres;

--
-- TOC entry 2948 (class 2616 OID 5298559)
-- Dependencies: 3107 1293 6
-- Name: ean13_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS ean13_ops
    DEFAULT FOR TYPE ean13 USING btree FAMILY isn_ops AS
    OPERATOR 1 <(ean13,ean13) ,
    OPERATOR 2 <=(ean13,ean13) ,
    OPERATOR 3 =(ean13,ean13) ,
    OPERATOR 4 >=(ean13,ean13) ,
    OPERATOR 5 >(ean13,ean13) ,
    FUNCTION 1 btean13cmp(ean13,ean13);


ALTER OPERATOR CLASS public.ean13_ops USING btree OWNER TO postgres;

--
-- TOC entry 3108 (class 2753 OID 5298566)
-- Dependencies: 6
-- Name: isn_ops; Type: OPERATOR FAMILY; Schema: public; Owner: postgres
--

CREATE OPERATOR FAMILY isn_ops USING hash;
ALTER OPERATOR FAMILY isn_ops USING hash ADD
    OPERATOR 1 =(ean13,isbn13) ,
    OPERATOR 1 =(ean13,ismn13) ,
    OPERATOR 1 =(ean13,issn13) ,
    OPERATOR 1 =(ean13,isbn) ,
    OPERATOR 1 =(ean13,ismn) ,
    OPERATOR 1 =(ean13,issn) ,
    OPERATOR 1 =(ean13,upc) ,
    OPERATOR 1 =(isbn13,ean13) ,
    OPERATOR 1 =(isbn13,isbn) ,
    OPERATOR 1 =(isbn,ean13) ,
    OPERATOR 1 =(isbn,isbn13) ,
    OPERATOR 1 =(ismn13,ean13) ,
    OPERATOR 1 =(ismn13,ismn) ,
    OPERATOR 1 =(ismn,ean13) ,
    OPERATOR 1 =(ismn,ismn13) ,
    OPERATOR 1 =(issn13,ean13) ,
    OPERATOR 1 =(issn13,issn) ,
    OPERATOR 1 =(issn,ean13) ,
    OPERATOR 1 =(issn,issn13) ,
    OPERATOR 1 =(upc,ean13);


ALTER OPERATOR FAMILY public.isn_ops USING hash OWNER TO postgres;

--
-- TOC entry 2949 (class 2616 OID 5298587)
-- Dependencies: 1293 6 3108
-- Name: ean13_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS ean13_ops
    DEFAULT FOR TYPE ean13 USING hash FAMILY isn_ops AS
    OPERATOR 1 =(ean13,ean13) ,
    FUNCTION 1 hashean13(ean13);


ALTER OPERATOR CLASS public.ean13_ops USING hash OWNER TO postgres;

--
-- TOC entry 3109 (class 2753 OID 5298590)
-- Dependencies: 6
-- Name: gin__int_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gin__int_ops USING gin;


ALTER OPERATOR FAMILY public.gin__int_ops USING gin OWNER TO ccdbd_dev;

--
-- TOC entry 2950 (class 2616 OID 5298591)
-- Dependencies: 6 3109
-- Name: gin__int_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gin__int_ops
    FOR TYPE integer[] USING gin AS
    STORAGE integer ,
    OPERATOR 3 &&(integer[],integer[]) ,
    OPERATOR 6 =(anyarray,anyarray) RECHECK ,
    OPERATOR 7 @>(integer[],integer[]) ,
    OPERATOR 8 <@(integer[],integer[]) RECHECK ,
    OPERATOR 13 @(integer[],integer[]) ,
    OPERATOR 14 ~(integer[],integer[]) RECHECK ,
    OPERATOR 20 @@(integer[],query_int) ,
    FUNCTION 1 btint4cmp(integer,integer) ,
    FUNCTION 2 ginarrayextract(anyarray,internal) ,
    FUNCTION 3 ginint4_queryextract(internal,internal,smallint) ,
    FUNCTION 4 ginint4_consistent(internal,smallint,internal);


ALTER OPERATOR CLASS public.gin__int_ops USING gin OWNER TO postgres;

--
-- TOC entry 3110 (class 2753 OID 5298603)
-- Dependencies: 6
-- Name: gin_hstore_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gin_hstore_ops USING gin;


ALTER OPERATOR FAMILY public.gin_hstore_ops USING gin OWNER TO ccdbd_dev;

--
-- TOC entry 2951 (class 2616 OID 5298604)
-- Dependencies: 6 1348 3110
-- Name: gin_hstore_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gin_hstore_ops
    DEFAULT FOR TYPE hstore USING gin AS
    STORAGE text ,
    OPERATOR 7 @>(hstore,hstore) RECHECK ,
    OPERATOR 9 ?(hstore,text) ,
    FUNCTION 1 bttextcmp(text,text) ,
    FUNCTION 2 gin_extract_hstore(internal,internal) ,
    FUNCTION 3 gin_extract_hstore_query(internal,internal,smallint) ,
    FUNCTION 4 gin_consistent_hstore(internal,smallint,internal);


ALTER OPERATOR CLASS public.gin_hstore_ops USING gin OWNER TO postgres;

--
-- TOC entry 3111 (class 2753 OID 5298611)
-- Dependencies: 6
-- Name: gin_trgm_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gin_trgm_ops USING gin;


ALTER OPERATOR FAMILY public.gin_trgm_ops USING gin OWNER TO ccdbd_dev;

--
-- TOC entry 2952 (class 2616 OID 5298612)
-- Dependencies: 6 3111
-- Name: gin_trgm_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gin_trgm_ops
    FOR TYPE text USING gin AS
    STORAGE integer ,
    OPERATOR 1 %(text,text) RECHECK ,
    FUNCTION 1 btint4cmp(integer,integer) ,
    FUNCTION 2 gin_extract_trgm(text,internal) ,
    FUNCTION 3 gin_extract_trgm(text,internal,internal) ,
    FUNCTION 4 gin_trgm_consistent(internal,internal,text);


ALTER OPERATOR CLASS public.gin_trgm_ops USING gin OWNER TO postgres;

--
-- TOC entry 3112 (class 2753 OID 5298618)
-- Dependencies: 6
-- Name: gist__int_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist__int_ops USING gist;


ALTER OPERATOR FAMILY public.gist__int_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2953 (class 2616 OID 5298619)
-- Dependencies: 3112 6
-- Name: gist__int_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist__int_ops
    DEFAULT FOR TYPE integer[] USING gist AS
    OPERATOR 3 &&(integer[],integer[]) ,
    OPERATOR 6 =(anyarray,anyarray) RECHECK ,
    OPERATOR 7 @>(integer[],integer[]) ,
    OPERATOR 8 <@(integer[],integer[]) ,
    OPERATOR 13 @(integer[],integer[]) ,
    OPERATOR 14 ~(integer[],integer[]) ,
    OPERATOR 20 @@(integer[],query_int) ,
    FUNCTION 1 g_int_consistent(internal,integer[],integer) ,
    FUNCTION 2 g_int_union(internal,internal) ,
    FUNCTION 3 g_int_compress(internal) ,
    FUNCTION 4 g_int_decompress(internal) ,
    FUNCTION 5 g_int_penalty(internal,internal,internal) ,
    FUNCTION 6 g_int_picksplit(internal,internal) ,
    FUNCTION 7 g_int_same(integer[],integer[],internal);


ALTER OPERATOR CLASS public.gist__int_ops USING gist OWNER TO postgres;

--
-- TOC entry 3113 (class 2753 OID 5298634)
-- Dependencies: 6
-- Name: gist__intbig_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist__intbig_ops USING gist;


ALTER OPERATOR FAMILY public.gist__intbig_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2954 (class 2616 OID 5298635)
-- Dependencies: 6 3113 1370
-- Name: gist__intbig_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist__intbig_ops
    FOR TYPE integer[] USING gist AS
    STORAGE intbig_gkey ,
    OPERATOR 3 &&(integer[],integer[]) RECHECK ,
    OPERATOR 6 =(anyarray,anyarray) RECHECK ,
    OPERATOR 7 @>(integer[],integer[]) RECHECK ,
    OPERATOR 8 <@(integer[],integer[]) RECHECK ,
    OPERATOR 13 @(integer[],integer[]) RECHECK ,
    OPERATOR 14 ~(integer[],integer[]) RECHECK ,
    OPERATOR 20 @@(integer[],query_int) RECHECK ,
    FUNCTION 1 g_intbig_consistent(internal,internal,integer) ,
    FUNCTION 2 g_intbig_union(internal,internal) ,
    FUNCTION 3 g_intbig_compress(internal) ,
    FUNCTION 4 g_intbig_decompress(internal) ,
    FUNCTION 5 g_intbig_penalty(internal,internal,internal) ,
    FUNCTION 6 g_intbig_picksplit(internal,internal) ,
    FUNCTION 7 g_intbig_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist__intbig_ops USING gist OWNER TO postgres;

--
-- TOC entry 3114 (class 2753 OID 5298650)
-- Dependencies: 6
-- Name: gist__ltree_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist__ltree_ops USING gist;


ALTER OPERATOR FAMILY public.gist__ltree_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2955 (class 2616 OID 5298651)
-- Dependencies: 3114 6 1413 1412
-- Name: gist__ltree_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist__ltree_ops
    DEFAULT FOR TYPE ltree[] USING gist AS
    STORAGE ltree_gist ,
    OPERATOR 10 <@(ltree[],ltree) RECHECK ,
    OPERATOR 11 @>(ltree,ltree[]) RECHECK ,
    OPERATOR 12 ~(ltree[],lquery) RECHECK ,
    OPERATOR 13 ~(lquery,ltree[]) RECHECK ,
    OPERATOR 14 @(ltree[],ltxtquery) RECHECK ,
    OPERATOR 15 @(ltxtquery,ltree[]) RECHECK ,
    OPERATOR 16 ?(ltree[],lquery[]) RECHECK ,
    OPERATOR 17 ?(lquery[],ltree[]) RECHECK ,
    FUNCTION 1 _ltree_consistent(internal,internal,smallint) ,
    FUNCTION 2 _ltree_union(internal,internal) ,
    FUNCTION 3 _ltree_compress(internal) ,
    FUNCTION 4 ltree_decompress(internal) ,
    FUNCTION 5 _ltree_penalty(internal,internal,internal) ,
    FUNCTION 6 _ltree_picksplit(internal,internal) ,
    FUNCTION 7 _ltree_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist__ltree_ops USING gist OWNER TO postgres;

--
-- TOC entry 3115 (class 2753 OID 5298667)
-- Dependencies: 6
-- Name: gist_bit_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_bit_ops USING gist;


ALTER OPERATOR FAMILY public.gist_bit_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2956 (class 2616 OID 5298668)
-- Dependencies: 3115 6 1332
-- Name: gist_bit_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_bit_ops
    DEFAULT FOR TYPE bit USING gist AS
    STORAGE gbtreekey_var ,
    OPERATOR 1 <(bit,bit) ,
    OPERATOR 2 <=(bit,bit) ,
    OPERATOR 3 =(bit,bit) ,
    OPERATOR 4 >=(bit,bit) ,
    OPERATOR 5 >(bit,bit) ,
    FUNCTION 1 gbt_bit_consistent(internal,bit,smallint) ,
    FUNCTION 2 gbt_bit_union(bytea,internal) ,
    FUNCTION 3 gbt_bit_compress(internal) ,
    FUNCTION 4 gbt_var_decompress(internal) ,
    FUNCTION 5 gbt_bit_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_bit_picksplit(internal,internal) ,
    FUNCTION 7 gbt_bit_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_bit_ops USING gist OWNER TO postgres;

--
-- TOC entry 3116 (class 2753 OID 5298681)
-- Dependencies: 6
-- Name: gist_bpchar_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_bpchar_ops USING gist;


ALTER OPERATOR FAMILY public.gist_bpchar_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2957 (class 2616 OID 5298682)
-- Dependencies: 3116 6 1332
-- Name: gist_bpchar_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_bpchar_ops
    DEFAULT FOR TYPE character USING gist AS
    STORAGE gbtreekey_var ,
    OPERATOR 1 <(character,character) ,
    OPERATOR 2 <=(character,character) ,
    OPERATOR 3 =(character,character) ,
    OPERATOR 4 >=(character,character) ,
    OPERATOR 5 >(character,character) ,
    FUNCTION 1 gbt_bpchar_consistent(internal,character,smallint) ,
    FUNCTION 2 gbt_text_union(bytea,internal) ,
    FUNCTION 3 gbt_bpchar_compress(internal) ,
    FUNCTION 4 gbt_var_decompress(internal) ,
    FUNCTION 5 gbt_text_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_text_picksplit(internal,internal) ,
    FUNCTION 7 gbt_text_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_bpchar_ops USING gist OWNER TO postgres;

--
-- TOC entry 3117 (class 2753 OID 5298695)
-- Dependencies: 6
-- Name: gist_bytea_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_bytea_ops USING gist;


ALTER OPERATOR FAMILY public.gist_bytea_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2958 (class 2616 OID 5298696)
-- Dependencies: 6 3117 1332
-- Name: gist_bytea_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_bytea_ops
    DEFAULT FOR TYPE bytea USING gist AS
    STORAGE gbtreekey_var ,
    OPERATOR 1 <(bytea,bytea) ,
    OPERATOR 2 <=(bytea,bytea) ,
    OPERATOR 3 =(bytea,bytea) ,
    OPERATOR 4 >=(bytea,bytea) ,
    OPERATOR 5 >(bytea,bytea) ,
    FUNCTION 1 gbt_bytea_consistent(internal,bytea,smallint) ,
    FUNCTION 2 gbt_bytea_union(bytea,internal) ,
    FUNCTION 3 gbt_bytea_compress(internal) ,
    FUNCTION 4 gbt_var_decompress(internal) ,
    FUNCTION 5 gbt_bytea_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_bytea_picksplit(internal,internal) ,
    FUNCTION 7 gbt_bytea_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_bytea_ops USING gist OWNER TO postgres;

--
-- TOC entry 3118 (class 2753 OID 5298709)
-- Dependencies: 6
-- Name: gist_cash_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_cash_ops USING gist;


ALTER OPERATOR FAMILY public.gist_cash_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2959 (class 2616 OID 5298710)
-- Dependencies: 3118 1319 6
-- Name: gist_cash_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_cash_ops
    DEFAULT FOR TYPE money USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(money,money) ,
    OPERATOR 2 <=(money,money) ,
    OPERATOR 3 =(money,money) ,
    OPERATOR 4 >=(money,money) ,
    OPERATOR 5 >(money,money) ,
    FUNCTION 1 gbt_cash_consistent(internal,money,smallint) ,
    FUNCTION 2 gbt_cash_union(bytea,internal) ,
    FUNCTION 3 gbt_cash_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_cash_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_cash_picksplit(internal,internal) ,
    FUNCTION 7 gbt_cash_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_cash_ops USING gist OWNER TO postgres;

--
-- TOC entry 3119 (class 2753 OID 5298723)
-- Dependencies: 6
-- Name: gist_cidr_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_cidr_ops USING gist;


ALTER OPERATOR FAMILY public.gist_cidr_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2960 (class 2616 OID 5298724)
-- Dependencies: 1319 3119 6
-- Name: gist_cidr_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_cidr_ops
    DEFAULT FOR TYPE cidr USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(inet,inet) RECHECK ,
    OPERATOR 2 <=(inet,inet) RECHECK ,
    OPERATOR 3 =(inet,inet) RECHECK ,
    OPERATOR 4 >=(inet,inet) RECHECK ,
    OPERATOR 5 >(inet,inet) RECHECK ,
    FUNCTION 1 gbt_inet_consistent(internal,inet,smallint) ,
    FUNCTION 2 gbt_inet_union(bytea,internal) ,
    FUNCTION 3 gbt_inet_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_inet_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_inet_picksplit(internal,internal) ,
    FUNCTION 7 gbt_inet_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_cidr_ops USING gist OWNER TO postgres;

--
-- TOC entry 3120 (class 2753 OID 5298737)
-- Dependencies: 6
-- Name: gist_cube_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_cube_ops USING gist;


ALTER OPERATOR FAMILY public.gist_cube_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2961 (class 2616 OID 5298738)
-- Dependencies: 3120 6 1249
-- Name: gist_cube_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_cube_ops
    DEFAULT FOR TYPE cube USING gist AS
    OPERATOR 3 &&(cube,cube) ,
    OPERATOR 6 =(cube,cube) ,
    OPERATOR 7 @>(cube,cube) ,
    OPERATOR 8 <@(cube,cube) ,
    OPERATOR 13 @(cube,cube) ,
    OPERATOR 14 ~(cube,cube) ,
    FUNCTION 1 g_cube_consistent(internal,cube,integer) ,
    FUNCTION 2 g_cube_union(internal,internal) ,
    FUNCTION 3 g_cube_compress(internal) ,
    FUNCTION 4 g_cube_decompress(internal) ,
    FUNCTION 5 g_cube_penalty(internal,internal,internal) ,
    FUNCTION 6 g_cube_picksplit(internal,internal) ,
    FUNCTION 7 g_cube_same(cube,cube,internal);


ALTER OPERATOR CLASS public.gist_cube_ops USING gist OWNER TO postgres;

--
-- TOC entry 3121 (class 2753 OID 5298752)
-- Dependencies: 6
-- Name: gist_date_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_date_ops USING gist;


ALTER OPERATOR FAMILY public.gist_date_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2962 (class 2616 OID 5298753)
-- Dependencies: 1329 3121 6
-- Name: gist_date_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_date_ops
    DEFAULT FOR TYPE date USING gist AS
    STORAGE gbtreekey8 ,
    OPERATOR 1 <(date,date) ,
    OPERATOR 2 <=(date,date) ,
    OPERATOR 3 =(date,date) ,
    OPERATOR 4 >=(date,date) ,
    OPERATOR 5 >(date,date) ,
    FUNCTION 1 gbt_date_consistent(internal,date,smallint) ,
    FUNCTION 2 gbt_date_union(bytea,internal) ,
    FUNCTION 3 gbt_date_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_date_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_date_picksplit(internal,internal) ,
    FUNCTION 7 gbt_date_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_date_ops USING gist OWNER TO postgres;

--
-- TOC entry 3122 (class 2753 OID 5298766)
-- Dependencies: 6
-- Name: gist_float4_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_float4_ops USING gist;


ALTER OPERATOR FAMILY public.gist_float4_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2963 (class 2616 OID 5298767)
-- Dependencies: 3122 1329 6
-- Name: gist_float4_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_float4_ops
    DEFAULT FOR TYPE real USING gist AS
    STORAGE gbtreekey8 ,
    OPERATOR 1 <(real,real) ,
    OPERATOR 2 <=(real,real) ,
    OPERATOR 3 =(real,real) ,
    OPERATOR 4 >=(real,real) ,
    OPERATOR 5 >(real,real) ,
    FUNCTION 1 gbt_float4_consistent(internal,real,smallint) ,
    FUNCTION 2 gbt_float4_union(bytea,internal) ,
    FUNCTION 3 gbt_float4_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_float4_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_float4_picksplit(internal,internal) ,
    FUNCTION 7 gbt_float4_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_float4_ops USING gist OWNER TO postgres;

--
-- TOC entry 3123 (class 2753 OID 5298780)
-- Dependencies: 6
-- Name: gist_float8_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_float8_ops USING gist;


ALTER OPERATOR FAMILY public.gist_float8_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2964 (class 2616 OID 5298781)
-- Dependencies: 3123 1319 6
-- Name: gist_float8_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_float8_ops
    DEFAULT FOR TYPE double precision USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(double precision,double precision) ,
    OPERATOR 2 <=(double precision,double precision) ,
    OPERATOR 3 =(double precision,double precision) ,
    OPERATOR 4 >=(double precision,double precision) ,
    OPERATOR 5 >(double precision,double precision) ,
    FUNCTION 1 gbt_float8_consistent(internal,double precision,smallint) ,
    FUNCTION 2 gbt_float8_union(bytea,internal) ,
    FUNCTION 3 gbt_float8_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_float8_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_float8_picksplit(internal,internal) ,
    FUNCTION 7 gbt_float8_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_float8_ops USING gist OWNER TO postgres;

--
-- TOC entry 3124 (class 2753 OID 5298794)
-- Dependencies: 6
-- Name: gist_hstore_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_hstore_ops USING gist;


ALTER OPERATOR FAMILY public.gist_hstore_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2965 (class 2616 OID 5298795)
-- Dependencies: 6 3124 1348 1338
-- Name: gist_hstore_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_hstore_ops
    DEFAULT FOR TYPE hstore USING gist AS
    STORAGE ghstore ,
    OPERATOR 7 @>(hstore,hstore) RECHECK ,
    OPERATOR 9 ?(hstore,text) RECHECK ,
    OPERATOR 13 @(hstore,hstore) RECHECK ,
    FUNCTION 1 ghstore_consistent(internal,internal,integer) ,
    FUNCTION 2 ghstore_union(internal,internal) ,
    FUNCTION 3 ghstore_compress(internal) ,
    FUNCTION 4 ghstore_decompress(internal) ,
    FUNCTION 5 ghstore_penalty(internal,internal,internal) ,
    FUNCTION 6 ghstore_picksplit(internal,internal) ,
    FUNCTION 7 ghstore_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_hstore_ops USING gist OWNER TO postgres;

--
-- TOC entry 3125 (class 2753 OID 5298806)
-- Dependencies: 6
-- Name: gist_inet_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_inet_ops USING gist;


ALTER OPERATOR FAMILY public.gist_inet_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2966 (class 2616 OID 5298807)
-- Dependencies: 3125 6 1319
-- Name: gist_inet_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_inet_ops
    DEFAULT FOR TYPE inet USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(inet,inet) RECHECK ,
    OPERATOR 2 <=(inet,inet) RECHECK ,
    OPERATOR 3 =(inet,inet) RECHECK ,
    OPERATOR 4 >=(inet,inet) RECHECK ,
    OPERATOR 5 >(inet,inet) RECHECK ,
    FUNCTION 1 gbt_inet_consistent(internal,inet,smallint) ,
    FUNCTION 2 gbt_inet_union(bytea,internal) ,
    FUNCTION 3 gbt_inet_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_inet_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_inet_picksplit(internal,internal) ,
    FUNCTION 7 gbt_inet_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_inet_ops USING gist OWNER TO postgres;

--
-- TOC entry 3126 (class 2753 OID 5298820)
-- Dependencies: 6
-- Name: gist_int2_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_int2_ops USING gist;


ALTER OPERATOR FAMILY public.gist_int2_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2967 (class 2616 OID 5298821)
-- Dependencies: 6 3126 1325
-- Name: gist_int2_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_int2_ops
    DEFAULT FOR TYPE smallint USING gist AS
    STORAGE gbtreekey4 ,
    OPERATOR 1 <(smallint,smallint) ,
    OPERATOR 2 <=(smallint,smallint) ,
    OPERATOR 3 =(smallint,smallint) ,
    OPERATOR 4 >=(smallint,smallint) ,
    OPERATOR 5 >(smallint,smallint) ,
    FUNCTION 1 gbt_int2_consistent(internal,smallint,smallint) ,
    FUNCTION 2 gbt_int2_union(bytea,internal) ,
    FUNCTION 3 gbt_int2_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_int2_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_int2_picksplit(internal,internal) ,
    FUNCTION 7 gbt_int2_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_int2_ops USING gist OWNER TO postgres;

--
-- TOC entry 3127 (class 2753 OID 5298834)
-- Dependencies: 6
-- Name: gist_int4_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_int4_ops USING gist;


ALTER OPERATOR FAMILY public.gist_int4_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2968 (class 2616 OID 5298835)
-- Dependencies: 6 3127 1329
-- Name: gist_int4_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_int4_ops
    DEFAULT FOR TYPE integer USING gist AS
    STORAGE gbtreekey8 ,
    OPERATOR 1 <(integer,integer) ,
    OPERATOR 2 <=(integer,integer) ,
    OPERATOR 3 =(integer,integer) ,
    OPERATOR 4 >=(integer,integer) ,
    OPERATOR 5 >(integer,integer) ,
    FUNCTION 1 gbt_int4_consistent(internal,integer,smallint) ,
    FUNCTION 2 gbt_int4_union(bytea,internal) ,
    FUNCTION 3 gbt_int4_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_int4_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_int4_picksplit(internal,internal) ,
    FUNCTION 7 gbt_int4_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_int4_ops USING gist OWNER TO postgres;

--
-- TOC entry 3128 (class 2753 OID 5298848)
-- Dependencies: 6
-- Name: gist_int8_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_int8_ops USING gist;


ALTER OPERATOR FAMILY public.gist_int8_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2969 (class 2616 OID 5298849)
-- Dependencies: 3128 1319 6
-- Name: gist_int8_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_int8_ops
    DEFAULT FOR TYPE bigint USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(bigint,bigint) ,
    OPERATOR 2 <=(bigint,bigint) ,
    OPERATOR 3 =(bigint,bigint) ,
    OPERATOR 4 >=(bigint,bigint) ,
    OPERATOR 5 >(bigint,bigint) ,
    FUNCTION 1 gbt_int8_consistent(internal,bigint,smallint) ,
    FUNCTION 2 gbt_int8_union(bytea,internal) ,
    FUNCTION 3 gbt_int8_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_int8_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_int8_picksplit(internal,internal) ,
    FUNCTION 7 gbt_int8_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_int8_ops USING gist OWNER TO postgres;

--
-- TOC entry 3129 (class 2753 OID 5298862)
-- Dependencies: 6
-- Name: gist_interval_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_interval_ops USING gist;


ALTER OPERATOR FAMILY public.gist_interval_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2970 (class 2616 OID 5298863)
-- Dependencies: 3129 6 1322
-- Name: gist_interval_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_interval_ops
    DEFAULT FOR TYPE interval USING gist AS
    STORAGE gbtreekey32 ,
    OPERATOR 1 <(interval,interval) ,
    OPERATOR 2 <=(interval,interval) ,
    OPERATOR 3 =(interval,interval) ,
    OPERATOR 4 >=(interval,interval) ,
    OPERATOR 5 >(interval,interval) ,
    FUNCTION 1 gbt_intv_consistent(internal,interval,smallint) ,
    FUNCTION 2 gbt_intv_union(bytea,internal) ,
    FUNCTION 3 gbt_intv_compress(internal) ,
    FUNCTION 4 gbt_intv_decompress(internal) ,
    FUNCTION 5 gbt_intv_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_intv_picksplit(internal,internal) ,
    FUNCTION 7 gbt_intv_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_interval_ops USING gist OWNER TO postgres;

--
-- TOC entry 3130 (class 2753 OID 5298876)
-- Dependencies: 6
-- Name: gist_ltree_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_ltree_ops USING gist;


ALTER OPERATOR FAMILY public.gist_ltree_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2971 (class 2616 OID 5298877)
-- Dependencies: 1410 1413 6 3130
-- Name: gist_ltree_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_ltree_ops
    DEFAULT FOR TYPE ltree USING gist AS
    STORAGE ltree_gist ,
    OPERATOR 1 <(ltree,ltree) ,
    OPERATOR 2 <=(ltree,ltree) ,
    OPERATOR 3 =(ltree,ltree) ,
    OPERATOR 4 >=(ltree,ltree) ,
    OPERATOR 5 >(ltree,ltree) ,
    OPERATOR 10 @>(ltree,ltree) ,
    OPERATOR 11 <@(ltree,ltree) ,
    OPERATOR 12 ~(ltree,lquery) ,
    OPERATOR 13 ~(lquery,ltree) ,
    OPERATOR 14 @(ltree,ltxtquery) ,
    OPERATOR 15 @(ltxtquery,ltree) ,
    OPERATOR 16 ?(ltree,lquery[]) ,
    OPERATOR 17 ?(lquery[],ltree) ,
    FUNCTION 1 ltree_consistent(internal,internal,smallint) ,
    FUNCTION 2 ltree_union(internal,internal) ,
    FUNCTION 3 ltree_compress(internal) ,
    FUNCTION 4 ltree_decompress(internal) ,
    FUNCTION 5 ltree_penalty(internal,internal,internal) ,
    FUNCTION 6 ltree_picksplit(internal,internal) ,
    FUNCTION 7 ltree_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_ltree_ops USING gist OWNER TO postgres;

--
-- TOC entry 3131 (class 2753 OID 5298898)
-- Dependencies: 6
-- Name: gist_macaddr_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_macaddr_ops USING gist;


ALTER OPERATOR FAMILY public.gist_macaddr_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2972 (class 2616 OID 5298899)
-- Dependencies: 3131 1319 6
-- Name: gist_macaddr_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_macaddr_ops
    DEFAULT FOR TYPE macaddr USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(macaddr,macaddr) ,
    OPERATOR 2 <=(macaddr,macaddr) ,
    OPERATOR 3 =(macaddr,macaddr) ,
    OPERATOR 4 >=(macaddr,macaddr) ,
    OPERATOR 5 >(macaddr,macaddr) ,
    FUNCTION 1 gbt_macad_consistent(internal,macaddr,smallint) ,
    FUNCTION 2 gbt_macad_union(bytea,internal) ,
    FUNCTION 3 gbt_macad_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_macad_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_macad_picksplit(internal,internal) ,
    FUNCTION 7 gbt_macad_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_macaddr_ops USING gist OWNER TO postgres;

--
-- TOC entry 3132 (class 2753 OID 5298912)
-- Dependencies: 6
-- Name: gist_numeric_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_numeric_ops USING gist;


ALTER OPERATOR FAMILY public.gist_numeric_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2973 (class 2616 OID 5298913)
-- Dependencies: 6 1332 3132
-- Name: gist_numeric_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_numeric_ops
    DEFAULT FOR TYPE numeric USING gist AS
    STORAGE gbtreekey_var ,
    OPERATOR 1 <(numeric,numeric) ,
    OPERATOR 2 <=(numeric,numeric) ,
    OPERATOR 3 =(numeric,numeric) ,
    OPERATOR 4 >=(numeric,numeric) ,
    OPERATOR 5 >(numeric,numeric) ,
    FUNCTION 1 gbt_numeric_consistent(internal,numeric,smallint) ,
    FUNCTION 2 gbt_numeric_union(bytea,internal) ,
    FUNCTION 3 gbt_numeric_compress(internal) ,
    FUNCTION 4 gbt_var_decompress(internal) ,
    FUNCTION 5 gbt_numeric_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_numeric_picksplit(internal,internal) ,
    FUNCTION 7 gbt_numeric_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_numeric_ops USING gist OWNER TO postgres;

--
-- TOC entry 3133 (class 2753 OID 5298926)
-- Dependencies: 6
-- Name: gist_oid_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_oid_ops USING gist;


ALTER OPERATOR FAMILY public.gist_oid_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2974 (class 2616 OID 5298927)
-- Dependencies: 3133 1329 6
-- Name: gist_oid_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_oid_ops
    DEFAULT FOR TYPE oid USING gist AS
    STORAGE gbtreekey8 ,
    OPERATOR 1 <(oid,oid) ,
    OPERATOR 2 <=(oid,oid) ,
    OPERATOR 3 =(oid,oid) ,
    OPERATOR 4 >=(oid,oid) ,
    OPERATOR 5 >(oid,oid) ,
    FUNCTION 1 gbt_oid_consistent(internal,oid,smallint) ,
    FUNCTION 2 gbt_oid_union(bytea,internal) ,
    FUNCTION 3 gbt_oid_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_oid_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_oid_picksplit(internal,internal) ,
    FUNCTION 7 gbt_oid_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_oid_ops USING gist OWNER TO postgres;

--
-- TOC entry 3134 (class 2753 OID 5298940)
-- Dependencies: 6
-- Name: gist_seg_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_seg_ops USING gist;


ALTER OPERATOR FAMILY public.gist_seg_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2975 (class 2616 OID 5298941)
-- Dependencies: 1494 6 3134
-- Name: gist_seg_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_seg_ops
    DEFAULT FOR TYPE seg USING gist AS
    OPERATOR 1 <<(seg,seg) ,
    OPERATOR 2 &<(seg,seg) ,
    OPERATOR 3 &&(seg,seg) ,
    OPERATOR 4 &>(seg,seg) ,
    OPERATOR 5 >>(seg,seg) ,
    OPERATOR 6 =(seg,seg) ,
    OPERATOR 7 @>(seg,seg) ,
    OPERATOR 8 <@(seg,seg) ,
    OPERATOR 13 @(seg,seg) ,
    OPERATOR 14 ~(seg,seg) ,
    FUNCTION 1 gseg_consistent(internal,seg,integer) ,
    FUNCTION 2 gseg_union(internal,internal) ,
    FUNCTION 3 gseg_compress(internal) ,
    FUNCTION 4 gseg_decompress(internal) ,
    FUNCTION 5 gseg_penalty(internal,internal,internal) ,
    FUNCTION 6 gseg_picksplit(internal,internal) ,
    FUNCTION 7 gseg_same(seg,seg,internal);


ALTER OPERATOR CLASS public.gist_seg_ops USING gist OWNER TO postgres;

--
-- TOC entry 3135 (class 2753 OID 5298959)
-- Dependencies: 6
-- Name: gist_text_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_text_ops USING gist;


ALTER OPERATOR FAMILY public.gist_text_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2976 (class 2616 OID 5298960)
-- Dependencies: 3135 1332 6
-- Name: gist_text_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_text_ops
    DEFAULT FOR TYPE text USING gist AS
    STORAGE gbtreekey_var ,
    OPERATOR 1 <(text,text) ,
    OPERATOR 2 <=(text,text) ,
    OPERATOR 3 =(text,text) ,
    OPERATOR 4 >=(text,text) ,
    OPERATOR 5 >(text,text) ,
    FUNCTION 1 gbt_text_consistent(internal,text,smallint) ,
    FUNCTION 2 gbt_text_union(bytea,internal) ,
    FUNCTION 3 gbt_text_compress(internal) ,
    FUNCTION 4 gbt_var_decompress(internal) ,
    FUNCTION 5 gbt_text_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_text_picksplit(internal,internal) ,
    FUNCTION 7 gbt_text_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_text_ops USING gist OWNER TO postgres;

--
-- TOC entry 3136 (class 2753 OID 5298973)
-- Dependencies: 6
-- Name: gist_time_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_time_ops USING gist;


ALTER OPERATOR FAMILY public.gist_time_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2977 (class 2616 OID 5298974)
-- Dependencies: 6 3136 1319
-- Name: gist_time_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_time_ops
    DEFAULT FOR TYPE time without time zone USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(time without time zone,time without time zone) ,
    OPERATOR 2 <=(time without time zone,time without time zone) ,
    OPERATOR 3 =(time without time zone,time without time zone) ,
    OPERATOR 4 >=(time without time zone,time without time zone) ,
    OPERATOR 5 >(time without time zone,time without time zone) ,
    FUNCTION 1 gbt_time_consistent(internal,time without time zone,smallint) ,
    FUNCTION 2 gbt_time_union(bytea,internal) ,
    FUNCTION 3 gbt_time_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_time_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_time_picksplit(internal,internal) ,
    FUNCTION 7 gbt_time_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_time_ops USING gist OWNER TO postgres;

--
-- TOC entry 3137 (class 2753 OID 5298987)
-- Dependencies: 6
-- Name: gist_timestamp_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_timestamp_ops USING gist;


ALTER OPERATOR FAMILY public.gist_timestamp_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2978 (class 2616 OID 5298988)
-- Dependencies: 1319 3137 6
-- Name: gist_timestamp_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_timestamp_ops
    DEFAULT FOR TYPE timestamp without time zone USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(timestamp without time zone,timestamp without time zone) ,
    OPERATOR 2 <=(timestamp without time zone,timestamp without time zone) ,
    OPERATOR 3 =(timestamp without time zone,timestamp without time zone) ,
    OPERATOR 4 >=(timestamp without time zone,timestamp without time zone) ,
    OPERATOR 5 >(timestamp without time zone,timestamp without time zone) ,
    FUNCTION 1 gbt_ts_consistent(internal,timestamp without time zone,smallint) ,
    FUNCTION 2 gbt_ts_union(bytea,internal) ,
    FUNCTION 3 gbt_ts_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_ts_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_ts_picksplit(internal,internal) ,
    FUNCTION 7 gbt_ts_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_timestamp_ops USING gist OWNER TO postgres;

--
-- TOC entry 3138 (class 2753 OID 5299001)
-- Dependencies: 6
-- Name: gist_timestamptz_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_timestamptz_ops USING gist;


ALTER OPERATOR FAMILY public.gist_timestamptz_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2979 (class 2616 OID 5299002)
-- Dependencies: 1319 3138 6
-- Name: gist_timestamptz_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_timestamptz_ops
    DEFAULT FOR TYPE timestamp with time zone USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(timestamp with time zone,timestamp with time zone) ,
    OPERATOR 2 <=(timestamp with time zone,timestamp with time zone) ,
    OPERATOR 3 =(timestamp with time zone,timestamp with time zone) ,
    OPERATOR 4 >=(timestamp with time zone,timestamp with time zone) ,
    OPERATOR 5 >(timestamp with time zone,timestamp with time zone) ,
    FUNCTION 1 gbt_tstz_consistent(internal,timestamp with time zone,smallint) ,
    FUNCTION 2 gbt_ts_union(bytea,internal) ,
    FUNCTION 3 gbt_tstz_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_ts_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_ts_picksplit(internal,internal) ,
    FUNCTION 7 gbt_ts_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_timestamptz_ops USING gist OWNER TO postgres;

--
-- TOC entry 3139 (class 2753 OID 5299015)
-- Dependencies: 6
-- Name: gist_timetz_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_timetz_ops USING gist;


ALTER OPERATOR FAMILY public.gist_timetz_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2980 (class 2616 OID 5299016)
-- Dependencies: 6 3139 1319
-- Name: gist_timetz_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_timetz_ops
    DEFAULT FOR TYPE time with time zone USING gist AS
    STORAGE gbtreekey16 ,
    OPERATOR 1 <(time with time zone,time with time zone) RECHECK ,
    OPERATOR 2 <=(time with time zone,time with time zone) RECHECK ,
    OPERATOR 3 =(time with time zone,time with time zone) RECHECK ,
    OPERATOR 4 >=(time with time zone,time with time zone) RECHECK ,
    OPERATOR 5 >(time with time zone,time with time zone) RECHECK ,
    FUNCTION 1 gbt_timetz_consistent(internal,time with time zone,smallint) ,
    FUNCTION 2 gbt_time_union(bytea,internal) ,
    FUNCTION 3 gbt_timetz_compress(internal) ,
    FUNCTION 4 gbt_decompress(internal) ,
    FUNCTION 5 gbt_time_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_time_picksplit(internal,internal) ,
    FUNCTION 7 gbt_time_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_timetz_ops USING gist OWNER TO postgres;

--
-- TOC entry 3140 (class 2753 OID 5299029)
-- Dependencies: 6
-- Name: gist_trgm_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_trgm_ops USING gist;


ALTER OPERATOR FAMILY public.gist_trgm_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2981 (class 2616 OID 5299030)
-- Dependencies: 3140 1345 6
-- Name: gist_trgm_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_trgm_ops
    FOR TYPE text USING gist AS
    STORAGE gtrgm ,
    OPERATOR 1 %(text,text) ,
    FUNCTION 1 gtrgm_consistent(gtrgm,internal,integer) ,
    FUNCTION 2 gtrgm_union(bytea,internal) ,
    FUNCTION 3 gtrgm_compress(internal) ,
    FUNCTION 4 gtrgm_decompress(internal) ,
    FUNCTION 5 gtrgm_penalty(internal,internal,internal) ,
    FUNCTION 6 gtrgm_picksplit(internal,internal) ,
    FUNCTION 7 gtrgm_same(gtrgm,gtrgm,internal);


ALTER OPERATOR CLASS public.gist_trgm_ops USING gist OWNER TO postgres;

--
-- TOC entry 3141 (class 2753 OID 5299039)
-- Dependencies: 6
-- Name: gist_vbit_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY gist_vbit_ops USING gist;


ALTER OPERATOR FAMILY public.gist_vbit_ops USING gist OWNER TO ccdbd_dev;

--
-- TOC entry 2982 (class 2616 OID 5299040)
-- Dependencies: 6 3141 1332
-- Name: gist_vbit_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS gist_vbit_ops
    DEFAULT FOR TYPE bit varying USING gist AS
    STORAGE gbtreekey_var ,
    OPERATOR 1 <(bit varying,bit varying) ,
    OPERATOR 2 <=(bit varying,bit varying) ,
    OPERATOR 3 =(bit varying,bit varying) ,
    OPERATOR 4 >=(bit varying,bit varying) ,
    OPERATOR 5 >(bit varying,bit varying) ,
    FUNCTION 1 gbt_bit_consistent(internal,bit,smallint) ,
    FUNCTION 2 gbt_bit_union(bytea,internal) ,
    FUNCTION 3 gbt_bit_compress(internal) ,
    FUNCTION 4 gbt_var_decompress(internal) ,
    FUNCTION 5 gbt_bit_penalty(internal,internal,internal) ,
    FUNCTION 6 gbt_bit_picksplit(internal,internal) ,
    FUNCTION 7 gbt_bit_same(internal,internal,internal);


ALTER OPERATOR CLASS public.gist_vbit_ops USING gist OWNER TO postgres;

--
-- TOC entry 2983 (class 2616 OID 5299053)
-- Dependencies: 6 3107 1376
-- Name: isbn13_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS isbn13_ops
    DEFAULT FOR TYPE isbn13 USING btree FAMILY isn_ops AS
    OPERATOR 1 <(isbn13,isbn13) ,
    OPERATOR 2 <=(isbn13,isbn13) ,
    OPERATOR 3 =(isbn13,isbn13) ,
    OPERATOR 4 >=(isbn13,isbn13) ,
    OPERATOR 5 >(isbn13,isbn13) ,
    FUNCTION 1 btisbn13cmp(isbn13,isbn13);


ALTER OPERATOR CLASS public.isbn13_ops USING btree OWNER TO postgres;

--
-- TOC entry 2984 (class 2616 OID 5299060)
-- Dependencies: 6 3108 1376
-- Name: isbn13_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS isbn13_ops
    DEFAULT FOR TYPE isbn13 USING hash FAMILY isn_ops AS
    OPERATOR 1 =(isbn13,isbn13) ,
    FUNCTION 1 hashisbn13(isbn13);


ALTER OPERATOR CLASS public.isbn13_ops USING hash OWNER TO postgres;

--
-- TOC entry 2985 (class 2616 OID 5299063)
-- Dependencies: 6 3107 1373
-- Name: isbn_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS isbn_ops
    DEFAULT FOR TYPE isbn USING btree FAMILY isn_ops AS
    OPERATOR 1 <(isbn,isbn) ,
    OPERATOR 2 <=(isbn,isbn) ,
    OPERATOR 3 =(isbn,isbn) ,
    OPERATOR 4 >=(isbn,isbn) ,
    OPERATOR 5 >(isbn,isbn) ,
    FUNCTION 1 btisbncmp(isbn,isbn);


ALTER OPERATOR CLASS public.isbn_ops USING btree OWNER TO postgres;

--
-- TOC entry 2986 (class 2616 OID 5299070)
-- Dependencies: 6 3108 1373
-- Name: isbn_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS isbn_ops
    DEFAULT FOR TYPE isbn USING hash FAMILY isn_ops AS
    OPERATOR 1 =(isbn,isbn) ,
    FUNCTION 1 hashisbn(isbn);


ALTER OPERATOR CLASS public.isbn_ops USING hash OWNER TO postgres;

--
-- TOC entry 2987 (class 2616 OID 5299073)
-- Dependencies: 6 3107 1383
-- Name: ismn13_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS ismn13_ops
    DEFAULT FOR TYPE ismn13 USING btree FAMILY isn_ops AS
    OPERATOR 1 <(ismn13,ismn13) ,
    OPERATOR 2 <=(ismn13,ismn13) ,
    OPERATOR 3 =(ismn13,ismn13) ,
    OPERATOR 4 >=(ismn13,ismn13) ,
    OPERATOR 5 >(ismn13,ismn13) ,
    FUNCTION 1 btismn13cmp(ismn13,ismn13);


ALTER OPERATOR CLASS public.ismn13_ops USING btree OWNER TO postgres;

--
-- TOC entry 2988 (class 2616 OID 5299080)
-- Dependencies: 6 3108 1383
-- Name: ismn13_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS ismn13_ops
    DEFAULT FOR TYPE ismn13 USING hash FAMILY isn_ops AS
    OPERATOR 1 =(ismn13,ismn13) ,
    FUNCTION 1 hashismn13(ismn13);


ALTER OPERATOR CLASS public.ismn13_ops USING hash OWNER TO postgres;

--
-- TOC entry 2989 (class 2616 OID 5299083)
-- Dependencies: 6 3107 1380
-- Name: ismn_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS ismn_ops
    DEFAULT FOR TYPE ismn USING btree FAMILY isn_ops AS
    OPERATOR 1 <(ismn,ismn) ,
    OPERATOR 2 <=(ismn,ismn) ,
    OPERATOR 3 =(ismn,ismn) ,
    OPERATOR 4 >=(ismn,ismn) ,
    OPERATOR 5 >(ismn,ismn) ,
    FUNCTION 1 btismncmp(ismn,ismn);


ALTER OPERATOR CLASS public.ismn_ops USING btree OWNER TO postgres;

--
-- TOC entry 2990 (class 2616 OID 5299090)
-- Dependencies: 1380 3108 6
-- Name: ismn_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS ismn_ops
    DEFAULT FOR TYPE ismn USING hash FAMILY isn_ops AS
    OPERATOR 1 =(ismn,ismn) ,
    FUNCTION 1 hashismn(ismn);


ALTER OPERATOR CLASS public.ismn_ops USING hash OWNER TO postgres;

--
-- TOC entry 2991 (class 2616 OID 5299093)
-- Dependencies: 1388 6 3107
-- Name: issn13_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS issn13_ops
    DEFAULT FOR TYPE issn13 USING btree FAMILY isn_ops AS
    OPERATOR 1 <(issn13,issn13) ,
    OPERATOR 2 <=(issn13,issn13) ,
    OPERATOR 3 =(issn13,issn13) ,
    OPERATOR 4 >=(issn13,issn13) ,
    OPERATOR 5 >(issn13,issn13) ,
    FUNCTION 1 btissn13cmp(issn13,issn13);


ALTER OPERATOR CLASS public.issn13_ops USING btree OWNER TO postgres;

--
-- TOC entry 2992 (class 2616 OID 5299100)
-- Dependencies: 3108 6 1388
-- Name: issn13_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS issn13_ops
    DEFAULT FOR TYPE issn13 USING hash FAMILY isn_ops AS
    OPERATOR 1 =(issn13,issn13) ,
    FUNCTION 1 hashissn13(issn13);


ALTER OPERATOR CLASS public.issn13_ops USING hash OWNER TO postgres;

--
-- TOC entry 2993 (class 2616 OID 5299103)
-- Dependencies: 1385 3107 6
-- Name: issn_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS issn_ops
    DEFAULT FOR TYPE issn USING btree FAMILY isn_ops AS
    OPERATOR 1 <(issn,issn) ,
    OPERATOR 2 <=(issn,issn) ,
    OPERATOR 3 =(issn,issn) ,
    OPERATOR 4 >=(issn,issn) ,
    OPERATOR 5 >(issn,issn) ,
    FUNCTION 1 btissncmp(issn,issn);


ALTER OPERATOR CLASS public.issn_ops USING btree OWNER TO postgres;

--
-- TOC entry 2994 (class 2616 OID 5299110)
-- Dependencies: 3108 6 1385
-- Name: issn_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS issn_ops
    DEFAULT FOR TYPE issn USING hash FAMILY isn_ops AS
    OPERATOR 1 =(issn,issn) ,
    FUNCTION 1 hashissn(issn);


ALTER OPERATOR CLASS public.issn_ops USING hash OWNER TO postgres;

--
-- TOC entry 3142 (class 2753 OID 5299113)
-- Dependencies: 6
-- Name: ltree_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY ltree_ops USING btree;


ALTER OPERATOR FAMILY public.ltree_ops USING btree OWNER TO ccdbd_dev;

--
-- TOC entry 2995 (class 2616 OID 5299114)
-- Dependencies: 1410 3142 6
-- Name: ltree_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS ltree_ops
    DEFAULT FOR TYPE ltree USING btree AS
    OPERATOR 1 <(ltree,ltree) ,
    OPERATOR 2 <=(ltree,ltree) ,
    OPERATOR 3 =(ltree,ltree) ,
    OPERATOR 4 >=(ltree,ltree) ,
    OPERATOR 5 >(ltree,ltree) ,
    FUNCTION 1 ltree_cmp(ltree,ltree);


ALTER OPERATOR CLASS public.ltree_ops USING btree OWNER TO postgres;

--
-- TOC entry 3143 (class 2753 OID 5299121)
-- Dependencies: 6
-- Name: seg_ops; Type: OPERATOR FAMILY; Schema: public; Owner: ccdbd_dev
--

CREATE OPERATOR FAMILY seg_ops USING btree;


ALTER OPERATOR FAMILY public.seg_ops USING btree OWNER TO ccdbd_dev;

--
-- TOC entry 2996 (class 2616 OID 5299122)
-- Dependencies: 3143 6 1494
-- Name: seg_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS seg_ops
    DEFAULT FOR TYPE seg USING btree AS
    OPERATOR 1 <(seg,seg) ,
    OPERATOR 2 <=(seg,seg) ,
    OPERATOR 3 =(seg,seg) ,
    OPERATOR 4 >=(seg,seg) ,
    OPERATOR 5 >(seg,seg) ,
    FUNCTION 1 seg_cmp(seg,seg);


ALTER OPERATOR CLASS public.seg_ops USING btree OWNER TO postgres;

--
-- TOC entry 2997 (class 2616 OID 5299129)
-- Dependencies: 6 1592 3107
-- Name: upc_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS upc_ops
    DEFAULT FOR TYPE upc USING btree FAMILY isn_ops AS
    OPERATOR 1 <(upc,upc) ,
    OPERATOR 2 <=(upc,upc) ,
    OPERATOR 3 =(upc,upc) ,
    OPERATOR 4 >=(upc,upc) ,
    OPERATOR 5 >(upc,upc) ,
    FUNCTION 1 btupccmp(upc,upc);


ALTER OPERATOR CLASS public.upc_ops USING btree OWNER TO postgres;

--
-- TOC entry 2998 (class 2616 OID 5299136)
-- Dependencies: 1592 3108 6
-- Name: upc_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
--

CREATE OPERATOR CLASS upc_ops
    DEFAULT FOR TYPE upc USING hash FAMILY isn_ops AS
    OPERATOR 1 =(upc,upc) ,
    FUNCTION 1 hashupc(upc);


ALTER OPERATOR CLASS public.upc_ops USING hash OWNER TO postgres;

SET search_path = pg_catalog;

--
-- TOC entry 3974 (class 2605 OID 5299139)
-- Dependencies: 452 1373 452 1293
-- Name: CAST (public.ean13 AS public.isbn); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ean13 AS public.isbn) WITH FUNCTION public.isbn(public.ean13);


--
-- TOC entry 3975 (class 2605 OID 5299140)
-- Dependencies: 453 1293 453 1376
-- Name: CAST (public.ean13 AS public.isbn13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ean13 AS public.isbn13) WITH FUNCTION public.isbn13(public.ean13);


--
-- TOC entry 3976 (class 2605 OID 5299141)
-- Dependencies: 456 1293 456 1380
-- Name: CAST (public.ean13 AS public.ismn); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ean13 AS public.ismn) WITH FUNCTION public.ismn(public.ean13);


--
-- TOC entry 3977 (class 2605 OID 5299142)
-- Dependencies: 457 457 1293 1383
-- Name: CAST (public.ean13 AS public.ismn13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ean13 AS public.ismn13) WITH FUNCTION public.ismn13(public.ean13);


--
-- TOC entry 3978 (class 2605 OID 5299143)
-- Dependencies: 628 1385 1293 628
-- Name: CAST (public.ean13 AS public.issn); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ean13 AS public.issn) WITH FUNCTION public.issn(public.ean13);


--
-- TOC entry 3979 (class 2605 OID 5299144)
-- Dependencies: 629 1388 1293 629
-- Name: CAST (public.ean13 AS public.issn13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ean13 AS public.issn13) WITH FUNCTION public.issn13(public.ean13);


--
-- TOC entry 3980 (class 2605 OID 5299145)
-- Dependencies: 772 1293 772 1592
-- Name: CAST (public.ean13 AS public.upc); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ean13 AS public.upc) WITH FUNCTION public.upc(public.ean13);


--
-- TOC entry 3981 (class 2605 OID 5299146)
-- Dependencies: 1373 1293
-- Name: CAST (public.isbn AS public.ean13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.isbn AS public.ean13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3982 (class 2605 OID 5299147)
-- Dependencies: 1376 1373
-- Name: CAST (public.isbn AS public.isbn13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.isbn AS public.isbn13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3983 (class 2605 OID 5299148)
-- Dependencies: 1293 1376
-- Name: CAST (public.isbn13 AS public.ean13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.isbn13 AS public.ean13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3984 (class 2605 OID 5299149)
-- Dependencies: 1373 1376
-- Name: CAST (public.isbn13 AS public.isbn); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.isbn13 AS public.isbn) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3985 (class 2605 OID 5299150)
-- Dependencies: 1380 1293
-- Name: CAST (public.ismn AS public.ean13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ismn AS public.ean13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3986 (class 2605 OID 5299151)
-- Dependencies: 1383 1380
-- Name: CAST (public.ismn AS public.ismn13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ismn AS public.ismn13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3987 (class 2605 OID 5299152)
-- Dependencies: 1293 1383
-- Name: CAST (public.ismn13 AS public.ean13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ismn13 AS public.ean13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3988 (class 2605 OID 5299153)
-- Dependencies: 1380 1383
-- Name: CAST (public.ismn13 AS public.ismn); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.ismn13 AS public.ismn) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3989 (class 2605 OID 5299154)
-- Dependencies: 1293 1385
-- Name: CAST (public.issn AS public.ean13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.issn AS public.ean13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3990 (class 2605 OID 5299155)
-- Dependencies: 1385 1388
-- Name: CAST (public.issn AS public.issn13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.issn AS public.issn13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3991 (class 2605 OID 5299156)
-- Dependencies: 1293 1388
-- Name: CAST (public.issn13 AS public.ean13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.issn13 AS public.ean13) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3992 (class 2605 OID 5299157)
-- Dependencies: 1385 1388
-- Name: CAST (public.issn13 AS public.issn); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.issn13 AS public.issn) WITHOUT FUNCTION AS ASSIGNMENT;


--
-- TOC entry 3993 (class 2605 OID 5299158)
-- Dependencies: 1592 1293
-- Name: CAST (public.upc AS public.ean13); Type: CAST; Schema: pg_catalog; Owner: 
--

CREATE CAST (public.upc AS public.ean13) WITHOUT FUNCTION AS ASSIGNMENT;


SET search_path = public, pg_catalog;

--
-- TOC entry 3615 (class 1259 OID 5299159)
-- Dependencies: 6
-- Name: instrument_sequence; Type: SEQUENCE; Schema: public; Owner: ccdbd_dev
--

CREATE SEQUENCE instrument_sequence
    INCREMENT BY 1
    NO MAXVALUE
    MINVALUE 20000
    CACHE 1;


ALTER TABLE public.instrument_sequence OWNER TO ccdbd_dev;

--
-- TOC entry 3616 (class 1259 OID 5299161)
-- Dependencies: 6
-- Name: project_sequence; Type: SEQUENCE; Schema: public; Owner: ccdbd_dev
--

CREATE SEQUENCE project_sequence
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.project_sequence OWNER TO ccdbd_dev;

--
-- TOC entry 3665 (class 1259 OID 27352712)
-- Dependencies: 6
-- Name: resource_stat_seq; Type: SEQUENCE; Schema: public; Owner: ccdbd_dev
--

CREATE SEQUENCE resource_stat_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.resource_stat_seq OWNER TO ccdbd_dev;

--
-- TOC entry 4214 (class 2606 OID 5299164)
-- Dependencies: 3397 3397
-- Name: anatomical_cell_junctions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_cell_junctions
    ADD CONSTRAINT anatomical_cell_junctions_pkey PRIMARY KEY (cell_junction_id);


--
-- TOC entry 4216 (class 2606 OID 5299166)
-- Dependencies: 3398 3398
-- Name: anatomical_details_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_details
    ADD CONSTRAINT anatomical_details_pkey PRIMARY KEY (anatomical_details_id);


--
-- TOC entry 4218 (class 2606 OID 5299168)
-- Dependencies: 3399 3399
-- Name: anatomical_organ_junctions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_organ_junctions
    ADD CONSTRAINT anatomical_organ_junctions_pkey PRIMARY KEY (organ_junction_id);


--
-- TOC entry 4220 (class 2606 OID 5299170)
-- Dependencies: 3400 3400
-- Name: anatomical_region_inst_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_region_inst
    ADD CONSTRAINT anatomical_region_inst_pkey PRIMARY KEY (region_inst_id);


--
-- TOC entry 4222 (class 2606 OID 5299172)
-- Dependencies: 3401 3401
-- Name: anatomical_region_junctions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_region_junctions
    ADD CONSTRAINT anatomical_region_junctions_pkey PRIMARY KEY (region_junction_id);


--
-- TOC entry 4224 (class 2606 OID 5299174)
-- Dependencies: 3402 3402
-- Name: anatomical_region_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_region_types
    ADD CONSTRAINT anatomical_region_types_pkey PRIMARY KEY (anatomical_region_id);


--
-- TOC entry 4226 (class 2606 OID 5299176)
-- Dependencies: 3403 3403
-- Name: anatomical_structure_junctions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_structure_junctions
    ADD CONSTRAINT anatomical_structure_junctions_pkey PRIMARY KEY (structure_junction_id);


--
-- TOC entry 4228 (class 2606 OID 5299178)
-- Dependencies: 3404 3404
-- Name: anatomical_subcellular_junctions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_subcellular_junctions
    ADD CONSTRAINT anatomical_subcellular_junctions_pkey PRIMARY KEY (subcellular_junction_id);


--
-- TOC entry 4230 (class 2606 OID 5299180)
-- Dependencies: 3405 3405
-- Name: anatomical_system_junctions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY anatomical_system_junctions
    ADD CONSTRAINT anatomical_system_junctions_pkey PRIMARY KEY (system_junction_id);


--
-- TOC entry 4232 (class 2606 OID 5299182)
-- Dependencies: 3406 3406
-- Name: angles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY angles
    ADD CONSTRAINT angles_pkey PRIMARY KEY (angle_id);


--
-- TOC entry 4236 (class 2606 OID 5299184)
-- Dependencies: 3408 3408
-- Name: animal_junction_pool_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY animal_pool_junction
    ADD CONSTRAINT animal_junction_pool_pk PRIMARY KEY (animal_junction_pool_id);


--
-- TOC entry 4234 (class 2606 OID 5299186)
-- Dependencies: 3407 3407
-- Name: animal_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY animal
    ADD CONSTRAINT animal_pkey PRIMARY KEY (animal_id);


--
-- TOC entry 4238 (class 2606 OID 5299188)
-- Dependencies: 3409 3409
-- Name: animal_set_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY animal_set
    ADD CONSTRAINT animal_set_pk PRIMARY KEY (animal_set_id);


--
-- TOC entry 4240 (class 2606 OID 5299190)
-- Dependencies: 3410 3410
-- Name: animation_sets_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY animation_sets
    ADD CONSTRAINT animation_sets_pkey PRIMARY KEY (animation_set_id);


--
-- TOC entry 4242 (class 2606 OID 5299192)
-- Dependencies: 3411 3411
-- Name: animations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY animations
    ADD CONSTRAINT animations_pkey PRIMARY KEY (animation_id);


--
-- TOC entry 4244 (class 2606 OID 5299194)
-- Dependencies: 3412 3412
-- Name: annotation_xml_set_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY annotation_xml_set
    ADD CONSTRAINT annotation_xml_set_pk PRIMARY KEY (annotation_xml_set_id);


--
-- TOC entry 4246 (class 2606 OID 5299196)
-- Dependencies: 3413 3413
-- Name: antibodies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY antibodies
    ADD CONSTRAINT antibodies_pkey PRIMARY KEY (antibody_id);


--
-- TOC entry 4618 (class 2606 OID 5301661)
-- Dependencies: 3622 3622
-- Name: area_unit_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY area_measurement
    ADD CONSTRAINT area_unit_pk PRIMARY KEY (area_unit);


--
-- TOC entry 4248 (class 2606 OID 5299198)
-- Dependencies: 3414 3414
-- Name: atlas_coordinate_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY atlas_coordinate_point
    ADD CONSTRAINT atlas_coordinate_pk PRIMARY KEY (coordinate_id);


--
-- TOC entry 4250 (class 2606 OID 5299200)
-- Dependencies: 3415 3415
-- Name: atlas_plate_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY atlas_plate
    ADD CONSTRAINT atlas_plate_pk PRIMARY KEY (atlas_id);


--
-- TOC entry 4262 (class 2606 OID 5299202)
-- Dependencies: 3420 3420
-- Name: bit_measurement_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY bit_measurement
    ADD CONSTRAINT bit_measurement_pkey PRIMARY KEY (bit_id);


--
-- TOC entry 4266 (class 2606 OID 5299204)
-- Dependencies: 3423 3423
-- Name: ccdb_allowed_keyword_table_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_allowed_keyword_table
    ADD CONSTRAINT ccdb_allowed_keyword_table_pk PRIMARY KEY (table_name);


--
-- TOC entry 4643 (class 2606 OID 5417461)
-- Dependencies: 3643 3643
-- Name: ccdb_curator_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_curator
    ADD CONSTRAINT ccdb_curator_pk PRIMARY KEY (ccdb_curator_screenname);


--
-- TOC entry 4268 (class 2606 OID 5299206)
-- Dependencies: 3424 3424
-- Name: ccdb_data_mapping_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_data_mapping
    ADD CONSTRAINT ccdb_data_mapping_pk PRIMARY KEY (ccdb_data_mapping_id);


--
-- TOC entry 4270 (class 2606 OID 5299208)
-- Dependencies: 3425 3425
-- Name: ccdb_data_permission_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_data_permission
    ADD CONSTRAINT ccdb_data_permission_pk PRIMARY KEY (ccdb_data_permission_id);


--
-- TOC entry 4290 (class 2606 OID 5299210)
-- Dependencies: 3438 3438
-- Name: ccdb_file_path_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_file
    ADD CONSTRAINT ccdb_file_path_pk PRIMARY KEY (ccdb_file_id);


--
-- TOC entry 4624 (class 2606 OID 5417315)
-- Dependencies: 3633 3633
-- Name: ccdb_general_session_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_general_session
    ADD CONSTRAINT ccdb_general_session_pk PRIMARY KEY (ccdb_general_session_id);


--
-- TOC entry 4354 (class 2606 OID 5299212)
-- Dependencies: 3476 3476
-- Name: cell_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY cell_instances
    ADD CONSTRAINT cell_instances_pkey PRIMARY KEY (cell_inst_id);


--
-- TOC entry 4294 (class 2606 OID 5299214)
-- Dependencies: 3440 3440
-- Name: cell_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY cell_types
    ADD CONSTRAINT cell_types_pkey PRIMARY KEY (cell_type_id);


--
-- TOC entry 4340 (class 2606 OID 5299216)
-- Dependencies: 3463 3463
-- Name: celluar_fraction_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY cellular_fraction
    ADD CONSTRAINT celluar_fraction_pkey PRIMARY KEY (cellular_fraction_id);


--
-- TOC entry 4356 (class 2606 OID 5299218)
-- Dependencies: 3477 3477
-- Name: cellularfraction_type_junction_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY cellularfraction_type_junction
    ADD CONSTRAINT cellularfraction_type_junction_pk PRIMARY KEY (cellularfraction_type_junction_id);


--
-- TOC entry 4358 (class 2606 OID 5299220)
-- Dependencies: 3478 3478
-- Name: channel_protocol_step_association_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY channel_protocol_step_association
    ADD CONSTRAINT channel_protocol_step_association_pkey PRIMARY KEY (association_id);


--
-- TOC entry 4360 (class 2606 OID 5299222)
-- Dependencies: 3479 3479
-- Name: confocal_images_done_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY confocal_images_done
    ADD CONSTRAINT confocal_images_done_pkey PRIMARY KEY (confocal_image_id);


--
-- TOC entry 4364 (class 2606 OID 5299224)
-- Dependencies: 3481 3481
-- Name: contour_components_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY contour_components
    ADD CONSTRAINT contour_components_pkey PRIMARY KEY (contour_id);


--
-- TOC entry 4344 (class 2606 OID 5299226)
-- Dependencies: 3466 3466
-- Name: cultured_cell_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY cultured_cell
    ADD CONSTRAINT cultured_cell_pkey PRIMARY KEY (cultured_cell_id);


--
-- TOC entry 4370 (class 2606 OID 5299228)
-- Dependencies: 3484 3484
-- Name: culturedcell_celltype_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY culturedcell_celltype_junction
    ADD CONSTRAINT culturedcell_celltype_pk PRIMARY KEY (culturedcell_celltype_id);


--
-- TOC entry 4272 (class 2606 OID 5299230)
-- Dependencies: 3426 3426
-- Name: data_purpose_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_data_purpose
    ADD CONSTRAINT data_purpose_pk PRIMARY KEY (data_purpose_id);


--
-- TOC entry 4274 (class 2606 OID 5299232)
-- Dependencies: 3427 3427
-- Name: data_section_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_data_section
    ADD CONSTRAINT data_section_pk PRIMARY KEY (data_section_id);


--
-- TOC entry 4376 (class 2606 OID 5299234)
-- Dependencies: 3487 3487
-- Name: dawg_status_type_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY dawg_status_type
    ADD CONSTRAINT dawg_status_type_pk PRIMARY KEY (dawg_status_type_id);


--
-- TOC entry 4378 (class 2606 OID 5299236)
-- Dependencies: 3490 3490
-- Name: dehydration_steps_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY dehydration_steps
    ADD CONSTRAINT dehydration_steps_pkey PRIMARY KEY (dehydration_step_id);


--
-- TOC entry 4398 (class 2606 OID 5299238)
-- Dependencies: 3503 3503
-- Name: embedding_steps_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY embedding_steps
    ADD CONSTRAINT embedding_steps_pkey PRIMARY KEY (step_id);


--
-- TOC entry 4402 (class 2606 OID 5299240)
-- Dependencies: 3505 3505
-- Name: emproduct_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY emproduct
    ADD CONSTRAINT emproduct_pkey PRIMARY KEY (emproduct_id);


--
-- TOC entry 4404 (class 2606 OID 5299242)
-- Dependencies: 3506 3506
-- Name: epifluorescent_images_done_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY epifluorescent_images_done
    ADD CONSTRAINT epifluorescent_images_done_pkey PRIMARY KEY (epifluorescent_image_id);


--
-- TOC entry 4306 (class 2606 OID 5299244)
-- Dependencies: 3447 3447
-- Name: experiment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY experiment
    ADD CONSTRAINT experiment_pkey PRIMARY KEY (experiment_id);


--
-- TOC entry 4614 (class 2606 OID 5301493)
-- Dependencies: 3621 3621
-- Name: external_api_user_id; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY external_api_user
    ADD CONSTRAINT external_api_user_id PRIMARY KEY (external_api_user_id);


--
-- TOC entry 4412 (class 2606 OID 5299246)
-- Dependencies: 3510 3510
-- Name: fluorescent_images_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY fluorescent_images
    ADD CONSTRAINT fluorescent_images_pkey PRIMARY KEY (fluorescent_images_id);


--
-- TOC entry 4414 (class 2606 OID 5299248)
-- Dependencies: 3512 3512 3512 3512 3512
-- Name: geometry_columns_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY geometry_columns
    ADD CONSTRAINT geometry_columns_pk PRIMARY KEY (f_table_catalog, f_table_schema, f_table_name, f_geometry_column);


--
-- TOC entry 4416 (class 2606 OID 5299250)
-- Dependencies: 3513 3513
-- Name: google_authentication_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY google_authentication
    ADD CONSTRAINT google_authentication_pkey PRIMARY KEY (google_auth_id);


--
-- TOC entry 4418 (class 2606 OID 5299252)
-- Dependencies: 3514 3514
-- Name: google_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY google_users
    ADD CONSTRAINT google_users_pkey PRIMARY KEY (google_user_id);


--
-- TOC entry 4316 (class 2606 OID 5299254)
-- Dependencies: 3452 3452
-- Name: group_of_people_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY group_of_people
    ADD CONSTRAINT group_of_people_pkey PRIMARY KEY (gp_id);


--
-- TOC entry 4318 (class 2606 OID 5299256)
-- Dependencies: 3453 3453
-- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY groups
    ADD CONSTRAINT groups_pkey PRIMARY KEY (group_id);


--
-- TOC entry 4420 (class 2606 OID 5299258)
-- Dependencies: 3515 3515
-- Name: image2d_annotation_xml_set_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY image2d_annotation_xml_set
    ADD CONSTRAINT image2d_annotation_xml_set_pk PRIMARY KEY (image2d_annotation_xml_set_id);


--
-- TOC entry 4422 (class 2606 OID 5299260)
-- Dependencies: 3516 3516
-- Name: image_info_copy_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY image_info_copy
    ADD CONSTRAINT image_info_copy_pkey PRIMARY KEY (image_info_id);


--
-- TOC entry 4254 (class 2606 OID 5299262)
-- Dependencies: 3417 3417
-- Name: image_info_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY image_info
    ADD CONSTRAINT image_info_pkey PRIMARY KEY (image_info_id);


--
-- TOC entry 4278 (class 2606 OID 5299264)
-- Dependencies: 3429 3429
-- Name: image_sets_used_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY image_sets_used
    ADD CONSTRAINT image_sets_used_pkey PRIMARY KEY (id);


--
-- TOC entry 4424 (class 2606 OID 5299266)
-- Dependencies: 3517 3517
-- Name: image_type_id_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY image_types
    ADD CONSTRAINT image_type_id_pk PRIMARY KEY (image_type_id);


--
-- TOC entry 4426 (class 2606 OID 5299268)
-- Dependencies: 3518 3518
-- Name: image_workflow_tester_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY image_workflow_tester
    ADD CONSTRAINT image_workflow_tester_pk PRIMARY KEY (user_name);


--
-- TOC entry 4428 (class 2606 OID 5299270)
-- Dependencies: 3519 3519
-- Name: imaging_product_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY imaging_product_types
    ADD CONSTRAINT imaging_product_types_pkey PRIMARY KEY (imaging_product_type_id);


--
-- TOC entry 4432 (class 2606 OID 5299272)
-- Dependencies: 3521 3521
-- Name: instrument_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY instrument
    ADD CONSTRAINT instrument_pkey PRIMARY KEY (instrument_id);


--
-- TOC entry 4444 (class 2606 OID 5299274)
-- Dependencies: 3527 3527
-- Name: litter_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY litter
    ADD CONSTRAINT litter_pk PRIMARY KEY (litter_id);


--
-- TOC entry 4448 (class 2606 OID 5299276)
-- Dependencies: 3528 3528
-- Name: lm_product_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY lm_product
    ADD CONSTRAINT lm_product_pkey PRIMARY KEY (lmproduct_id);


--
-- TOC entry 4450 (class 2606 OID 5299278)
-- Dependencies: 3529 3529
-- Name: lmproduct_channels_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY lmproduct_channels
    ADD CONSTRAINT lmproduct_channels_pkey PRIMARY KEY (channel_id);


--
-- TOC entry 4454 (class 2606 OID 5299280)
-- Dependencies: 3531 3531
-- Name: map_file_junctions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY map_file_junctions
    ADD CONSTRAINT map_file_junctions_pkey PRIMARY KEY (map_file_junction_id);


--
-- TOC entry 4456 (class 2606 OID 5299282)
-- Dependencies: 3532 3532
-- Name: map_files_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY map_files
    ADD CONSTRAINT map_files_pkey PRIMARY KEY (map_file_id);


--
-- TOC entry 4348 (class 2606 OID 5299284)
-- Dependencies: 3469 3469
-- Name: member_reconstructions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY member_reconstructions
    ADD CONSTRAINT member_reconstructions_pkey PRIMARY KEY (id);


--
-- TOC entry 4458 (class 2606 OID 5299286)
-- Dependencies: 3533 3533
-- Name: microscopy_product_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY microscopy_product_type
    ADD CONSTRAINT microscopy_product_pk PRIMARY KEY (microscopy_product_type_id);


--
-- TOC entry 4258 (class 2606 OID 5299288)
-- Dependencies: 3418 3418
-- Name: microscopy_products_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT microscopy_products_pkey PRIMARY KEY (mpid);


--
-- TOC entry 4434 (class 2606 OID 5299290)
-- Dependencies: 3522 3522
-- Name: microscopy_type_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY instrument_type
    ADD CONSTRAINT microscopy_type_pk PRIMARY KEY (instrument_type_id);


--
-- TOC entry 4464 (class 2606 OID 5299292)
-- Dependencies: 3535 3535
-- Name: multiphoton_images_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY multiphoton_images
    ADD CONSTRAINT multiphoton_images_pkey PRIMARY KEY (multiphoton_image_id);


--
-- TOC entry 4669 (class 2606 OID 27352711)
-- Dependencies: 3664 3664
-- Name: ncmir_resource_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ncmir_resource
    ADD CONSTRAINT ncmir_resource_pk PRIMARY KEY (resource_id);


--
-- TOC entry 4468 (class 2606 OID 5299294)
-- Dependencies: 3537 3537
-- Name: nif_result_cache_id; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY nif_result_cache
    ADD CONSTRAINT nif_result_cache_id PRIMARY KEY (nif_cache_result_id);


--
-- TOC entry 4472 (class 2606 OID 5299296)
-- Dependencies: 3538 3538
-- Name: nucleic_acid_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY nucleic_acid
    ADD CONSTRAINT nucleic_acid_pkey PRIMARY KEY (nucleic_acid_id);


--
-- TOC entry 4474 (class 2606 OID 5299298)
-- Dependencies: 3539 3539
-- Name: organ_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY organ_instances
    ADD CONSTRAINT organ_instances_pkey PRIMARY KEY (organ_inst_id);


--
-- TOC entry 4296 (class 2606 OID 5299300)
-- Dependencies: 3441 3441
-- Name: organ_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY organ_types
    ADD CONSTRAINT organ_types_pkey PRIMARY KEY (organ_type_id);


--
-- TOC entry 4476 (class 2606 OID 5299302)
-- Dependencies: 3540 3540
-- Name: organism_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY organism
    ADD CONSTRAINT organism_pkey PRIMARY KEY (organism_id);


--
-- TOC entry 4478 (class 2606 OID 5299304)
-- Dependencies: 3541 3541
-- Name: param_file_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY param_file_types
    ADD CONSTRAINT param_file_types_pkey PRIMARY KEY (param_file_type_id);


--
-- TOC entry 4480 (class 2606 OID 5299306)
-- Dependencies: 3542 3542
-- Name: param_files_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY param_files
    ADD CONSTRAINT param_files_pkey PRIMARY KEY (param_file_id);


--
-- TOC entry 4308 (class 2606 OID 5299308)
-- Dependencies: 3448 3448
-- Name: person2_unique_portal_id; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY persons_2
    ADD CONSTRAINT person2_unique_portal_id UNIQUE (portal_userid);


--
-- TOC entry 4310 (class 2606 OID 5299310)
-- Dependencies: 3448 3448
-- Name: persons_2_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY persons_2
    ADD CONSTRAINT persons_2_pkey PRIMARY KEY (person_id);


--
-- TOC entry 4334 (class 2606 OID 5299312)
-- Dependencies: 3460 3460
-- Name: physical_specimen_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY subject
    ADD CONSTRAINT physical_specimen_pkey PRIMARY KEY (subject_id);


--
-- TOC entry 4208 (class 2606 OID 5299314)
-- Dependencies: 3394 3394
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY acquisition_channels
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (acquisition_channel_id);


--
-- TOC entry 4210 (class 2606 OID 5299316)
-- Dependencies: 3395 3395
-- Name: pk_algorithm; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY algorithms
    ADD CONSTRAINT pk_algorithm PRIMARY KEY (algorithm_id);


--
-- TOC entry 4212 (class 2606 OID 5299318)
-- Dependencies: 3396 3396
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY alignment_methods
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (alignment_method_id);


--
-- TOC entry 4252 (class 2606 OID 5299320)
-- Dependencies: 3416 3416
-- Name: pk_atlases; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY atlases
    ADD CONSTRAINT pk_atlases PRIMARY KEY (atlas_id);


--
-- TOC entry 4264 (class 2606 OID 5299322)
-- Dependencies: 3422 3422
-- Name: pk_cameras; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY cameras
    ADD CONSTRAINT pk_cameras PRIMARY KEY (camera_id);


--
-- TOC entry 4362 (class 2606 OID 5299324)
-- Dependencies: 3480 3480
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY contextual_help_links
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (id);


--
-- TOC entry 4366 (class 2606 OID 5299326)
-- Dependencies: 3482 3482
-- Name: pk_coverslip; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY coverslips
    ADD CONSTRAINT pk_coverslip PRIMARY KEY (coverslip_id);


--
-- TOC entry 4368 (class 2606 OID 5299328)
-- Dependencies: 3483 3483
-- Name: pk_cropped_recon; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY cropped_reconstructions
    ADD CONSTRAINT pk_cropped_recon PRIMARY KEY (cropped_recon_id);


--
-- TOC entry 4372 (class 2606 OID 5299330)
-- Dependencies: 3485 3485
-- Name: pk_current_density; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY current_density
    ADD CONSTRAINT pk_current_density PRIMARY KEY (current_density_unit);


--
-- TOC entry 4374 (class 2606 OID 5299332)
-- Dependencies: 3486 3486
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY data_input_statuses
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (data_input_status_id);


--
-- TOC entry 4390 (class 2606 OID 5299334)
-- Dependencies: 3497 3497
-- Name: pk_data_status; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY product_status
    ADD CONSTRAINT pk_data_status PRIMARY KEY (product_status_id);


--
-- TOC entry 4380 (class 2606 OID 5299336)
-- Dependencies: 3491 3491
-- Name: pk_detectors; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY detectors
    ADD CONSTRAINT pk_detectors PRIMARY KEY (detector_id);


--
-- TOC entry 4382 (class 2606 OID 5299338)
-- Dependencies: 3492 3492
-- Name: pk_devices; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY devices
    ADD CONSTRAINT pk_devices PRIMARY KEY (device_id);


--
-- TOC entry 4384 (class 2606 OID 5299340)
-- Dependencies: 3493 3493
-- Name: pk_dichroics; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY dichroics
    ADD CONSTRAINT pk_dichroics PRIMARY KEY (dichroics_id);


--
-- TOC entry 4386 (class 2606 OID 5299342)
-- Dependencies: 3494 3494
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY dif_log_product_access
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (product_access_id);


--
-- TOC entry 4392 (class 2606 OID 5299344)
-- Dependencies: 3500 3500
-- Name: pk_digitizing_info; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY digitizing_info
    ADD CONSTRAINT pk_digitizing_info PRIMARY KEY (digitizing_info_id);


--
-- TOC entry 4394 (class 2606 OID 5299346)
-- Dependencies: 3501 3501
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY down_sampled_reconstructions
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (down_sampled_recon_id);


--
-- TOC entry 4396 (class 2606 OID 5299348)
-- Dependencies: 3502 3502
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY embedding_medium
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (embedding_medium_id);


--
-- TOC entry 4400 (class 2606 OID 5299350)
-- Dependencies: 3504 3504
-- Name: pk_emission_filter; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY emission_filters
    ADD CONSTRAINT pk_emission_filter PRIMARY KEY (emission_filter_id);


--
-- TOC entry 4406 (class 2606 OID 5299352)
-- Dependencies: 3507 3507
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY excitation_filters
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (excitation_filter_id);


--
-- TOC entry 4612 (class 2606 OID 5301228)
-- Dependencies: 3620 3620
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY file_format_mappings
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (file_format_mapping_id);


--
-- TOC entry 4610 (class 2606 OID 5301223)
-- Dependencies: 3619 3619
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY file_format_purposes
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (file_format_purpose_id);


--
-- TOC entry 4408 (class 2606 OID 5299354)
-- Dependencies: 3508 3508
-- Name: pk_file_formats; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY file_formats
    ADD CONSTRAINT pk_file_formats PRIMARY KEY (file_format_id);


--
-- TOC entry 4410 (class 2606 OID 5299356)
-- Dependencies: 3509 3509
-- Name: pk_filters; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY filters
    ADD CONSTRAINT pk_filters PRIMARY KEY (filter_id);


--
-- TOC entry 4626 (class 2606 OID 5417323)
-- Dependencies: 3634 3634
-- Name: pk_fluors; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY fluors
    ADD CONSTRAINT pk_fluors PRIMARY KEY (fluor_id);


--
-- TOC entry 4430 (class 2606 OID 5299358)
-- Dependencies: 3520 3520
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY immersion_medium
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (immersion_medium_id);


--
-- TOC entry 4436 (class 2606 OID 5299360)
-- Dependencies: 3523 3523
-- Name: pk_lasers; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY lasers
    ADD CONSTRAINT pk_lasers PRIMARY KEY (laser_id);


--
-- TOC entry 4438 (class 2606 OID 5299362)
-- Dependencies: 3524 3524
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY length_measurement
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (length_unit);


--
-- TOC entry 4440 (class 2606 OID 5299364)
-- Dependencies: 3525 3525
-- Name: pk_lenses; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY lenses
    ADD CONSTRAINT pk_lenses PRIMARY KEY (lens_id);


--
-- TOC entry 4442 (class 2606 OID 5299366)
-- Dependencies: 3526 3526
-- Name: pk_light_sources; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY light_sources
    ADD CONSTRAINT pk_light_sources PRIMARY KEY (light_source_id);


--
-- TOC entry 4628 (class 2606 OID 5417331)
-- Dependencies: 3635 3635
-- Name: pk_lm_channels; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY lm_channels
    ADD CONSTRAINT pk_lm_channels PRIMARY KEY (lm_channel_id);


--
-- TOC entry 4452 (class 2606 OID 5299368)
-- Dependencies: 3530 3530
-- Name: pk_manufacturers; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY manufacturers
    ADD CONSTRAINT pk_manufacturers PRIMARY KEY (manufacturer_id);


--
-- TOC entry 4462 (class 2606 OID 5299370)
-- Dependencies: 3534 3534
-- Name: pk_mounting_medium; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY mounting_medium
    ADD CONSTRAINT pk_mounting_medium PRIMARY KEY (mounting_medium_id);


--
-- TOC entry 4466 (class 2606 OID 5299372)
-- Dependencies: 3536 3536
-- Name: pk_my_favorite; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY my_favorites
    ADD CONSTRAINT pk_my_favorite PRIMARY KEY (my_favorite_id);


--
-- TOC entry 4388 (class 2606 OID 5299374)
-- Dependencies: 3495 3495
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY processed_image_sets
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (id);


--
-- TOC entry 4632 (class 2606 OID 5417380)
-- Dependencies: 3637 3637
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY protein_instances
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (protein_instance_id);


--
-- TOC entry 4630 (class 2606 OID 5417372)
-- Dependencies: 3636 3636
-- Name: pk_protein_type_id; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY protein_types
    ADD CONSTRAINT pk_protein_type_id PRIMARY KEY (protein_type_id);


--
-- TOC entry 4286 (class 2606 OID 5299376)
-- Dependencies: 3434 3434
-- Name: pk_recon_types; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY reconstruction_types
    ADD CONSTRAINT pk_recon_types PRIMARY KEY (recon_type_id);


--
-- TOC entry 4647 (class 2606 OID 20086914)
-- Dependencies: 3648 3648
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sand_data_downloaders
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (sand_downloader_id);


--
-- TOC entry 4649 (class 2606 OID 20086922)
-- Dependencies: 3649 3649
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sand_downloaded_data_files
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (sand_downloaded_data_file_id);


--
-- TOC entry 4508 (class 2606 OID 5299378)
-- Dependencies: 3561 3561
-- Name: pk_scanner; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY scanners
    ADD CONSTRAINT pk_scanner PRIMARY KEY (scanner_id);


--
-- TOC entry 4634 (class 2606 OID 5417395)
-- Dependencies: 3638 3638
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY temp_channel_mappings
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (temp_channel_mapping_id);


--
-- TOC entry 4570 (class 2606 OID 5299380)
-- Dependencies: 3595 3595
-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY temp_uploaded_images
    ADD CONSTRAINT [REDACTED]PRIMARY KEY (id);


--
-- TOC entry 4572 (class 2606 OID 5299382)
-- Dependencies: 3596 3596
-- Name: pk_temperature; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY temperature
    ADD CONSTRAINT pk_temperature PRIMARY KEY (temperature_unit);


--
-- TOC entry 4584 (class 2606 OID 5299384)
-- Dependencies: 3602 3602
-- Name: pk_tissues; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY tissues
    ADD CONSTRAINT pk_tissues PRIMARY KEY (tissue_id);


--
-- TOC entry 4596 (class 2606 OID 5299386)
-- Dependencies: 3609 3609
-- Name: pk_voltages; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY voltages
    ADD CONSTRAINT pk_voltages PRIMARY KEY (voltage_unit);


--
-- TOC entry 4482 (class 2606 OID 5299388)
-- Dependencies: 3547 3547
-- Name: plate_density_unit_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY plate_density_unit
    ADD CONSTRAINT plate_density_unit_pk PRIMARY KEY (plate_density_unit);


--
-- TOC entry 4608 (class 2606 OID 5301074)
-- Dependencies: 3617 3617
-- Name: processingstep_desc_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY processingstep_description
    ADD CONSTRAINT processingstep_desc_pk PRIMARY KEY (processingstep_desc_id);


--
-- TOC entry 4314 (class 2606 OID 5299390)
-- Dependencies: 3449 3449
-- Name: project_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project
    ADD CONSTRAINT project_pkey PRIMARY KEY (project_id);


--
-- TOC entry 4328 (class 2606 OID 5299392)
-- Dependencies: 3458 3458
-- Name: project_to_animal_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY project_to_animal
    ADD CONSTRAINT project_to_animal_pk PRIMARY KEY (project_to_animal_id);


--
-- TOC entry 4346 (class 2606 OID 5299394)
-- Dependencies: 3467 3467
-- Name: project_to_cultured_cell_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY project_to_culturedcell
    ADD CONSTRAINT project_to_cultured_cell_pk PRIMARY KEY (project_to_culturedcell_id);


--
-- TOC entry 4342 (class 2606 OID 5299396)
-- Dependencies: 3464 3464
-- Name: project_to_subcellular_fraction_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY project_to_subcellular_fraction
    ADD CONSTRAINT project_to_subcellular_fraction_pk PRIMARY KEY (project_to_subcellular_fraction_id);


--
-- TOC entry 4484 (class 2606 OID 5299398)
-- Dependencies: 3548 3548
-- Name: project_to_tissue_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY project_to_tissue
    ADD CONSTRAINT project_to_tissue_pk PRIMARY KEY (project_to_tissue_id);


--
-- TOC entry 4622 (class 2606 OID 5417463)
-- Dependencies: 3632 3632 3632
-- Name: project_tree_html_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY project_tree_html
    ADD CONSTRAINT project_tree_html_pk PRIMARY KEY (project_id, host);


--
-- TOC entry 4322 (class 2606 OID 5299400)
-- Dependencies: 3454 3454
-- Name: publication_junction_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY publication_junction
    ADD CONSTRAINT publication_junction_pk PRIMARY KEY (publication_junction_id);


--
-- TOC entry 4324 (class 2606 OID 5299402)
-- Dependencies: 3455 3455
-- Name: publication_set_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY publication_set
    ADD CONSTRAINT publication_set_pkey PRIMARY KEY (publication_set_id);


--
-- TOC entry 4326 (class 2606 OID 5299404)
-- Dependencies: 3456 3456
-- Name: publications_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY publications
    ADD CONSTRAINT publications_pkey PRIMARY KEY (publication_id);


--
-- TOC entry 4486 (class 2606 OID 5299406)
-- Dependencies: 3550 3550
-- Name: raw_image_set_params_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT raw_image_set_params_pkey PRIMARY KEY (id);


--
-- TOC entry 4276 (class 2606 OID 5299408)
-- Dependencies: 3428 3428
-- Name: raw_image_sets_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY image_sets
    ADD CONSTRAINT raw_image_sets_pkey PRIMARY KEY (image_set_id);


--
-- TOC entry 4288 (class 2606 OID 5299410)
-- Dependencies: 3436 3436
-- Name: raw_images_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY raw_images
    ADD CONSTRAINT raw_images_pkey PRIMARY KEY (id);


--
-- TOC entry 4488 (class 2606 OID 5299412)
-- Dependencies: 3551 3551
-- Name: reagent_component_stock_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY reagent_component_stock
    ADD CONSTRAINT reagent_component_stock_pkey PRIMARY KEY (reagent_component_stock_id);


--
-- TOC entry 4490 (class 2606 OID 5299414)
-- Dependencies: 3552 3552
-- Name: reagent_components_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY reagent_components
    ADD CONSTRAINT reagent_components_pkey PRIMARY KEY (reagent_component_id);


--
-- TOC entry 4492 (class 2606 OID 5299416)
-- Dependencies: 3553 3553
-- Name: reagents_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY reagents
    ADD CONSTRAINT reagents_pkey PRIMARY KEY (reagent_id);


--
-- TOC entry 4280 (class 2606 OID 5299418)
-- Dependencies: 3430 3430
-- Name: reconstructions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT reconstructions_pkey PRIMARY KEY (recon_id);


--
-- TOC entry 4494 (class 2606 OID 5299420)
-- Dependencies: 3554 3554
-- Name: resolution_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY resolution
    ADD CONSTRAINT resolution_pkey PRIMARY KEY (resolution_unit);


--
-- TOC entry 4496 (class 2606 OID 5299422)
-- Dependencies: 3555 3555
-- Name: roi_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY roi
    ADD CONSTRAINT roi_pkey PRIMARY KEY (roi_id);


--
-- TOC entry 4498 (class 2606 OID 5299424)
-- Dependencies: 3556 3556
-- Name: roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY roles
    ADD CONSTRAINT roles_pkey PRIMARY KEY (role_id);


--
-- TOC entry 4500 (class 2606 OID 5299426)
-- Dependencies: 3557 3557
-- Name: scan_parameters_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY scan_parameters
    ADD CONSTRAINT scan_parameters_pkey PRIMARY KEY (scan_parameter_pk);


--
-- TOC entry 4502 (class 2606 OID 5299428)
-- Dependencies: 3558 3558
-- Name: scan_products_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY scan_products
    ADD CONSTRAINT scan_products_pkey PRIMARY KEY (scan_product_id);


--
-- TOC entry 4504 (class 2606 OID 5299430)
-- Dependencies: 3559 3559
-- Name: scan_protocol_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY scan_protocol_type
    ADD CONSTRAINT scan_protocol_type_pkey PRIMARY KEY (scan_protocol_type_id);


--
-- TOC entry 4506 (class 2606 OID 5299432)
-- Dependencies: 3560 3560
-- Name: scan_sequence_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY scan_sequence_type
    ADD CONSTRAINT scan_sequence_type_pkey PRIMARY KEY (scan_sequence_type_id);


--
-- TOC entry 4620 (class 2606 OID 5301702)
-- Dependencies: 3623 3623
-- Name: seg_flat_obj_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY segmented_flat_object
    ADD CONSTRAINT seg_flat_obj_pk PRIMARY KEY (seg_flat_object_id);


--
-- TOC entry 4510 (class 2606 OID 5299434)
-- Dependencies: 3562 3562
-- Name: segmentation_intent_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY segmentation_intent
    ADD CONSTRAINT segmentation_intent_pkey PRIMARY KEY (seg_intent_id);


--
-- TOC entry 4282 (class 2606 OID 5299436)
-- Dependencies: 3431 3431
-- Name: segmentation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY segmentation
    ADD CONSTRAINT segmentation_pkey PRIMARY KEY (seg_id);


--
-- TOC entry 4284 (class 2606 OID 5299438)
-- Dependencies: 3432 3432
-- Name: segmentation_sets_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY segmentation_sets
    ADD CONSTRAINT segmentation_sets_pkey PRIMARY KEY (segmentation_set_id);


--
-- TOC entry 4512 (class 2606 OID 5299440)
-- Dependencies: 3563 3563
-- Name: segmentation_transformation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY segmentation_transformation
    ADD CONSTRAINT segmentation_transformation_pkey PRIMARY KEY (seg_transformation_id);


--
-- TOC entry 4514 (class 2606 OID 5299442)
-- Dependencies: 3564 3564
-- Name: segmented_object_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY segmented_object_types
    ADD CONSTRAINT segmented_object_types_pkey PRIMARY KEY (type_id);


--
-- TOC entry 4665 (class 2606 OID 26605482)
-- Dependencies: 3662 3662
-- Name: slash_annotation_type_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY slash_geometry_type
    ADD CONSTRAINT slash_annotation_type_pkey PRIMARY KEY (slash_annotation_type_name);


--
-- TOC entry 4667 (class 2606 OID 26605491)
-- Dependencies: 3663 3663
-- Name: slash_level_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY slash_level
    ADD CONSTRAINT slash_level_pkey PRIMARY KEY (level_id);


--
-- TOC entry 4653 (class 2606 OID 26605407)
-- Dependencies: 3657 3657
-- Name: slash_pic_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY slash_pic
    ADD CONSTRAINT slash_pic_pkey PRIMARY KEY (pic_id);


--
-- TOC entry 4657 (class 2606 OID 26605444)
-- Dependencies: 3659 3659
-- Name: slash_project_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY slash_project
    ADD CONSTRAINT slash_project_pkey PRIMARY KEY (sproject_id);


--
-- TOC entry 4661 (class 2606 OID 26605462)
-- Dependencies: 3660 3660
-- Name: slash_software_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY slash_software
    ADD CONSTRAINT slash_software_pkey PRIMARY KEY (slash_software_id);


--
-- TOC entry 4655 (class 2606 OID 26605432)
-- Dependencies: 3658 3658
-- Name: slash_user_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY slash_user
    ADD CONSTRAINT slash_user_pkey PRIMARY KEY (user_id);


--
-- TOC entry 4516 (class 2606 OID 5299444)
-- Dependencies: 3565 3565
-- Name: smartatlas_workflow_cache_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY smartatlas_workflow_cache
    ADD CONSTRAINT smartatlas_workflow_cache_pk PRIMARY KEY (sa_workflow_cache_id);


--
-- TOC entry 4518 (class 2606 OID 5299446)
-- Dependencies: 3566 3566
-- Name: software_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY software
    ADD CONSTRAINT software_pkey PRIMARY KEY (software_id);


--
-- TOC entry 4645 (class 2606 OID 5517918)
-- Dependencies: 3644 3644
-- Name: softwaredownloadpk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY software_download_stat
    ADD CONSTRAINT softwaredownloadpk PRIMARY KEY (download_id);


--
-- TOC entry 4520 (class 2606 OID 5299448)
-- Dependencies: 3567 3567
-- Name: sp_chemical_fixation_done_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_chemical_fixation
    ADD CONSTRAINT sp_chemical_fixation_done_pkey PRIMARY KEY (chemical_fixation_id);


--
-- TOC entry 4522 (class 2606 OID 5299450)
-- Dependencies: 3568 3568
-- Name: sp_dehydration_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_dehydration
    ADD CONSTRAINT sp_dehydration_pkey PRIMARY KEY (dehydration_id);


--
-- TOC entry 4524 (class 2606 OID 5299452)
-- Dependencies: 3569 3569
-- Name: sp_detection_method_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_detection_method
    ADD CONSTRAINT sp_detection_method_pkey PRIMARY KEY (detection_method_id);


--
-- TOC entry 4526 (class 2606 OID 5299454)
-- Dependencies: 3570 3570
-- Name: sp_embeddings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_embeddings
    ADD CONSTRAINT sp_embeddings_pkey PRIMARY KEY (embedding_id);


--
-- TOC entry 4528 (class 2606 OID 5299456)
-- Dependencies: 3571 3571
-- Name: sp_freezing_fixation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_freezing_fixation
    ADD CONSTRAINT sp_freezing_fixation_pkey PRIMARY KEY (freezing_fixation_id);


--
-- TOC entry 4530 (class 2606 OID 5299458)
-- Dependencies: 3572 3572
-- Name: sp_microtomy_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_microtomy
    ADD CONSTRAINT sp_microtomy_pkey PRIMARY KEY (microtomy_id);


--
-- TOC entry 4532 (class 2606 OID 5299460)
-- Dependencies: 3573 3573
-- Name: sp_molecular_localization_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_molecular_localization
    ADD CONSTRAINT sp_molecular_localization_pkey PRIMARY KEY (molecular_localization_id);


--
-- TOC entry 4534 (class 2606 OID 5299462)
-- Dependencies: 3574 3574
-- Name: sp_molecular_target_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_molecular_target
    ADD CONSTRAINT sp_molecular_target_pkey PRIMARY KEY (molecular_target_id);


--
-- TOC entry 4536 (class 2606 OID 5299464)
-- Dependencies: 3575 3575
-- Name: sp_probe_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_probe
    ADD CONSTRAINT sp_probe_pkey PRIMARY KEY (probe_id);


--
-- TOC entry 4538 (class 2606 OID 5299466)
-- Dependencies: 3576 3576
-- Name: sp_protocol_steps_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_protocol_steps
    ADD CONSTRAINT sp_protocol_steps_pkey PRIMARY KEY (step_id);


--
-- TOC entry 4540 (class 2606 OID 5299468)
-- Dependencies: 3577 3577
-- Name: sp_protocols_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_protocols
    ADD CONSTRAINT sp_protocols_pkey PRIMARY KEY (protocol_id);


--
-- TOC entry 4542 (class 2606 OID 5299470)
-- Dependencies: 3578 3578
-- Name: sp_stain_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sp_stain
    ADD CONSTRAINT sp_stain_pkey PRIMARY KEY (stain_id);


--
-- TOC entry 4544 (class 2606 OID 5299472)
-- Dependencies: 3579 3579
-- Name: spatial_ref_sys_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY spatial_ref_sys
    ADD CONSTRAINT spatial_ref_sys_pkey PRIMARY KEY (srid);


--
-- TOC entry 4330 (class 2606 OID 5299474)
-- Dependencies: 3459 3459
-- Name: species_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY species
    ADD CONSTRAINT species_pkey PRIMARY KEY (species_id);


--
-- TOC entry 4548 (class 2606 OID 5299476)
-- Dependencies: 3582 3582
-- Name: specimen_anatomical_junction_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY specimen_anatomical_junction
    ADD CONSTRAINT specimen_anatomical_junction_pk PRIMARY KEY (specimen_anatomical_junction_id);


--
-- TOC entry 4546 (class 2606 OID 5299478)
-- Dependencies: 3581 3581
-- Name: specimen_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY specimen
    ADD CONSTRAINT specimen_pk PRIMARY KEY (specimen_id);


--
-- TOC entry 4663 (class 2606 OID 26605473)
-- Dependencies: 3661 3661
-- Name: srs_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY slash_srs
    ADD CONSTRAINT srs_pk PRIMARY KEY (srs_name);


--
-- TOC entry 4550 (class 2606 OID 5299480)
-- Dependencies: 3583 3583
-- Name: steps_in_protocol_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY steps_in_protocol
    ADD CONSTRAINT steps_in_protocol_pkey PRIMARY KEY (step_in_protocol_id);


--
-- TOC entry 4298 (class 2606 OID 5299482)
-- Dependencies: 3442 3442
-- Name: strain_pkey; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY strain
    ADD CONSTRAINT strain_pkey PRIMARY KEY (strain_id);


--
-- TOC entry 4552 (class 2606 OID 5299484)
-- Dependencies: 3584 3584
-- Name: structure_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY structure_instances
    ADD CONSTRAINT structure_instances_pkey PRIMARY KEY (structure_inst_id);


--
-- TOC entry 4300 (class 2606 OID 5299486)
-- Dependencies: 3443 3443
-- Name: structure_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY structure_types
    ADD CONSTRAINT structure_types_pkey PRIMARY KEY (structure_id);


--
-- TOC entry 4302 (class 2606 OID 5299488)
-- Dependencies: 3444 3444
-- Name: subcellular_comp_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY subcellular_comp_types
    ADD CONSTRAINT subcellular_comp_types_pkey PRIMARY KEY (subcellular_comp_id);


--
-- TOC entry 4554 (class 2606 OID 5299490)
-- Dependencies: 3585 3585
-- Name: subcellular_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY subcellular_instances
    ADD CONSTRAINT subcellular_instances_pkey PRIMARY KEY (subcellular_inst_id);


--
-- TOC entry 4336 (class 2606 OID 5299492)
-- Dependencies: 3461 3461
-- Name: subject_group_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY subject_group
    ADD CONSTRAINT subject_group_pk PRIMARY KEY (subject_group_id);


--
-- TOC entry 4338 (class 2606 OID 5299494)
-- Dependencies: 3462 3462
-- Name: subject_set_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY subject_set
    ADD CONSTRAINT subject_set_pk PRIMARY KEY (subject_set_id);


--
-- TOC entry 4350 (class 2606 OID 5299496)
-- Dependencies: 3470 3470
-- Name: super_reconstructions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY super_reconstructions
    ADD CONSTRAINT super_reconstructions_pkey PRIMARY KEY (super_recon_id);


--
-- TOC entry 4651 (class 2606 OID 20101178)
-- Dependencies: 3650 3650
-- Name: super_user_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY super_users
    ADD CONSTRAINT super_user_pk PRIMARY KEY (portal_screenname);


--
-- TOC entry 4639 (class 2606 OID 5417443)
-- Dependencies: 3641 3641
-- Name: surface_component_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY surface_component
    ADD CONSTRAINT surface_component_pkey PRIMARY KEY (surface_id);


--
-- TOC entry 4556 (class 2606 OID 5299498)
-- Dependencies: 3586 3586
-- Name: system_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY system_instances
    ADD CONSTRAINT system_instances_pkey PRIMARY KEY (system_inst_id);


--
-- TOC entry 4304 (class 2606 OID 5299500)
-- Dependencies: 3445 3445
-- Name: system_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY system_types
    ADD CONSTRAINT system_types_pkey PRIMARY KEY (system_type_id);


--
-- TOC entry 4564 (class 2606 OID 5299502)
-- Dependencies: 3592 3592
-- Name: tag_category_fk1; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY tag_category
    ADD CONSTRAINT tag_category_fk1 PRIMARY KEY (tag_category_id);


--
-- TOC entry 4558 (class 2606 OID 5299504)
-- Dependencies: 3591 3591
-- Name: tag_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY tag
    ADD CONSTRAINT tag_pk PRIMARY KEY (tag_id);


--
-- TOC entry 4568 (class 2606 OID 5299506)
-- Dependencies: 3593 3593
-- Name: tagged_mp_pk; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY tagged_mp_file
    ADD CONSTRAINT tagged_mp_pk PRIMARY KEY (tagged_mp_id);


--
-- TOC entry 4574 (class 2606 OID 5299508)
-- Dependencies: 3597 3597
-- Name: thickness_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY thickness
    ADD CONSTRAINT thickness_pkey PRIMARY KEY (thickness_unit);


--
-- TOC entry 4576 (class 2606 OID 5299510)
-- Dependencies: 3598 3598
-- Name: time_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY "time"
    ADD CONSTRAINT time_pkey PRIMARY KEY (time_unit);


--
-- TOC entry 4578 (class 2606 OID 5299512)
-- Dependencies: 3599 3599
-- Name: tissue_anatomical_id; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY tissue_anatomical_region_junction
    ADD CONSTRAINT tissue_anatomical_id PRIMARY KEY (tissue_anatomical_id);


--
-- TOC entry 4580 (class 2606 OID 5299514)
-- Dependencies: 3600 3600
-- Name: tissue_section_transformation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tissue_section_transformation
    ADD CONSTRAINT tissue_section_transformation_pkey PRIMARY KEY (tissue_transformation_id);


--
-- TOC entry 4582 (class 2606 OID 5299516)
-- Dependencies: 3601 3601
-- Name: tissue_slice_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tissue_slice
    ADD CONSTRAINT tissue_slice_pkey PRIMARY KEY (tissue_slice_id);


--
-- TOC entry 4586 (class 2606 OID 5299518)
-- Dependencies: 3603 3603
-- Name: transmitted_images_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY transmitted_images
    ADD CONSTRAINT transmitted_images_pkey PRIMARY KEY (transmitted_images_id);


--
-- TOC entry 4588 (class 2606 OID 5299520)
-- Dependencies: 3604 3604
-- Name: treatments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY treatments
    ADD CONSTRAINT treatments_pkey PRIMARY KEY (treatment_id);


--
-- TOC entry 4590 (class 2606 OID 5299522)
-- Dependencies: 3605 3605
-- Name: tree_components_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tree_components
    ADD CONSTRAINT tree_components_pkey PRIMARY KEY (tree_id);


--
-- TOC entry 4592 (class 2606 OID 5299524)
-- Dependencies: 3606 3606
-- Name: tree_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tree_nodes
    ADD CONSTRAINT tree_nodes_pkey PRIMARY KEY (tree_node_id);


--
-- TOC entry 4594 (class 2606 OID 5299526)
-- Dependencies: 3607 3607
-- Name: tree_segments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tree_segments
    ADD CONSTRAINT tree_segments_pkey PRIMARY KEY (tree_segment_id);


--
-- TOC entry 4292 (class 2606 OID 5299528)
-- Dependencies: 3438 3438
-- Name: unique_ccdb_file_path; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_file
    ADD CONSTRAINT unique_ccdb_file_path UNIQUE (file_path);


--
-- TOC entry 4260 (class 2606 OID 5299530)
-- Dependencies: 3418 3418
-- Name: unique_ccdb_id; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT unique_ccdb_id UNIQUE (ccdb_id);


--
-- TOC entry 4616 (class 2606 OID 5301495)
-- Dependencies: 3621 3621
-- Name: unique_external_api_email; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY external_api_user
    ADD CONSTRAINT unique_external_api_email UNIQUE (programmer_email);


--
-- TOC entry 4320 (class 2606 OID 5299532)
-- Dependencies: 3453 3453
-- Name: unique_group_name_index; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY groups
    ADD CONSTRAINT unique_group_name_index UNIQUE (group_name);


--
-- TOC entry 4256 (class 2606 OID 5299534)
-- Dependencies: 3417 3417
-- Name: unique_image_path; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY image_info
    ADD CONSTRAINT unique_image_path UNIQUE (file_path);


--
-- TOC entry 4446 (class 2606 OID 5299536)
-- Dependencies: 3527 3527
-- Name: unique_litter_name; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY litter
    ADD CONSTRAINT unique_litter_name UNIQUE (litter_name);


--
-- TOC entry 4460 (class 2606 OID 5299538)
-- Dependencies: 3533 3533
-- Name: unique_mp_type; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY microscopy_product_type
    ADD CONSTRAINT unique_mp_type UNIQUE (type);


--
-- TOC entry 4560 (class 2606 OID 5299540)
-- Dependencies: 3591 3591
-- Name: unique_onto_uri_tag; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY tag
    ADD CONSTRAINT unique_onto_uri_tag UNIQUE (onto_url);


--
-- TOC entry 4312 (class 2606 OID 5299542)
-- Dependencies: 3448 3448
-- Name: unique_portal_screenname; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY persons_2
    ADD CONSTRAINT unique_portal_screenname UNIQUE (portal_screenname);


--
-- TOC entry 4659 (class 2606 OID 26605447)
-- Dependencies: 3659 3659
-- Name: unique_project_Name; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY slash_project
    ADD CONSTRAINT "unique_project_Name" UNIQUE (project_name);


--
-- TOC entry 4470 (class 2606 OID 5299544)
-- Dependencies: 3537 3537
-- Name: unique_query_url_index; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY nif_result_cache
    ADD CONSTRAINT unique_query_url_index UNIQUE (query_url);


--
-- TOC entry 4332 (class 2606 OID 5299546)
-- Dependencies: 3459 3459
-- Name: unique_species_name_index; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY species
    ADD CONSTRAINT unique_species_name_index UNIQUE (species_name);


--
-- TOC entry 4566 (class 2606 OID 5299548)
-- Dependencies: 3592 3592
-- Name: unique_tag_category; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY tag_category
    ADD CONSTRAINT unique_tag_category UNIQUE (tag_category_name);


--
-- TOC entry 4562 (class 2606 OID 5299550)
-- Dependencies: 3591 3591
-- Name: unique_tag_name; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY tag
    ADD CONSTRAINT unique_tag_name UNIQUE (tag_name);


--
-- TOC entry 4352 (class 2606 OID 5299552)
-- Dependencies: 3475 3475
-- Name: upload_session_id; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY ccdb_upload_session
    ADD CONSTRAINT upload_session_id PRIMARY KEY (upload_session_id);


--
-- TOC entry 4641 (class 2606 OID 5417448)
-- Dependencies: 3642 3642
-- Name: volume_component_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY volume_component
    ADD CONSTRAINT volume_component_pkey PRIMARY KEY (volume_id);


--
-- TOC entry 4598 (class 2606 OID 5299554)
-- Dependencies: 3610 3610
-- Name: volume_measurement_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY volume_measurement
    ADD CONSTRAINT volume_measurement_pkey PRIMARY KEY (volume_unit);


--
-- TOC entry 4637 (class 2606 OID 5417423)
-- Dependencies: 3639 3639
-- Name: w_trigger_project_keywords_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY w_trigger_project_keywords
    ADD CONSTRAINT w_trigger_project_keywords_pk PRIMARY KEY (w_trigger_project_keywords_id);


--
-- TOC entry 4600 (class 2606 OID 5299556)
-- Dependencies: 3611 3611
-- Name: web_simplified_product_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_pkey PRIMARY KEY (web_simplified_product_id);


--
-- TOC entry 4602 (class 2606 OID 5299558)
-- Dependencies: 3612 3612
-- Name: weight_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY weight
    ADD CONSTRAINT weight_pkey PRIMARY KEY (weight_unit);


--
-- TOC entry 4604 (class 2606 OID 5299560)
-- Dependencies: 3613 3613
-- Name: xml_file_id; Type: CONSTRAINT; Schema: public; Owner: ccdbd_dev; Tablespace: 
--

ALTER TABLE ONLY xml_file
    ADD CONSTRAINT xml_file_id PRIMARY KEY (xml_file_id);


--
-- TOC entry 4606 (class 2606 OID 5299562)
-- Dependencies: 3614 3614
-- Name: xml_parsers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY xml_parsers
    ADD CONSTRAINT xml_parsers_pkey PRIMARY KEY (parser_id);


--
-- TOC entry 4635 (class 1259 OID 5417424)
-- Dependencies: 3639
-- Name: pgweb_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pgweb_idx ON w_trigger_project_keywords USING gin (text_search_words);


--
-- TOC entry 4698 (class 2606 OID 5299563)
-- Dependencies: 3415 4249 3414
-- Name: altas_plate_coordinate_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY atlas_coordinate_point
    ADD CONSTRAINT altas_plate_coordinate_fk FOREIGN KEY (atlas_id) REFERENCES atlas_plate(atlas_id);


--
-- TOC entry 4672 (class 2606 OID 5299568)
-- Dependencies: 4215 3398 3397
-- Name: anatomical_cell_junctions_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_cell_junctions
    ADD CONSTRAINT anatomical_cell_junctions_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4673 (class 2606 OID 5299573)
-- Dependencies: 3476 3397 4353
-- Name: anatomical_cell_junctions_cell_inst_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_cell_junctions
    ADD CONSTRAINT anatomical_cell_junctions_cell_inst_id_fkey FOREIGN KEY (cell_inst_id) REFERENCES cell_instances(cell_inst_id);


--
-- TOC entry 4699 (class 2606 OID 5299578)
-- Dependencies: 3414 3398 4215
-- Name: anatomical_details_coordinate_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY atlas_coordinate_point
    ADD CONSTRAINT anatomical_details_coordinate_fk FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4676 (class 2606 OID 5299583)
-- Dependencies: 4215 3398 3399
-- Name: anatomical_organ_junctions_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_organ_junctions
    ADD CONSTRAINT anatomical_organ_junctions_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4677 (class 2606 OID 5299588)
-- Dependencies: 4473 3539 3399
-- Name: anatomical_organ_junctions_organ_inst_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_organ_junctions
    ADD CONSTRAINT anatomical_organ_junctions_organ_inst_id_fkey FOREIGN KEY (organ_inst_id) REFERENCES organ_instances(organ_inst_id);


--
-- TOC entry 4678 (class 2606 OID 5299593)
-- Dependencies: 4223 3402 3400
-- Name: anatomical_region_inst_anatomical_region_types_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_region_inst
    ADD CONSTRAINT anatomical_region_inst_anatomical_region_types_id_fkey FOREIGN KEY (anatomical_region_types_id) REFERENCES anatomical_region_types(anatomical_region_id);


--
-- TOC entry 4679 (class 2606 OID 5299598)
-- Dependencies: 3398 4215 3401
-- Name: anatomical_region_junctions_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_region_junctions
    ADD CONSTRAINT anatomical_region_junctions_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4680 (class 2606 OID 5299603)
-- Dependencies: 3400 4219 3401
-- Name: anatomical_region_junctions_region_inst_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_region_junctions
    ADD CONSTRAINT anatomical_region_junctions_region_inst_id_fkey FOREIGN KEY (region_inst_id) REFERENCES anatomical_region_inst(region_inst_id);


--
-- TOC entry 4681 (class 2606 OID 5299608)
-- Dependencies: 3398 4215 3403
-- Name: anatomical_structure_junctions_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_structure_junctions
    ADD CONSTRAINT anatomical_structure_junctions_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4682 (class 2606 OID 5299613)
-- Dependencies: 4551 3403 3584
-- Name: anatomical_structure_junctions_structure_inst_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_structure_junctions
    ADD CONSTRAINT anatomical_structure_junctions_structure_inst_id_fkey FOREIGN KEY (structure_inst_id) REFERENCES structure_instances(structure_inst_id);


--
-- TOC entry 4683 (class 2606 OID 5299618)
-- Dependencies: 3398 4215 3404
-- Name: anatomical_subcellular_junctions_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_subcellular_junctions
    ADD CONSTRAINT anatomical_subcellular_junctions_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4684 (class 2606 OID 5299623)
-- Dependencies: 3404 3585 4553
-- Name: anatomical_subcellular_junctions_subcellular_inst_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_subcellular_junctions
    ADD CONSTRAINT anatomical_subcellular_junctions_subcellular_inst_id_fkey FOREIGN KEY (subcellular_inst_id) REFERENCES subcellular_instances(subcellular_inst_id);


--
-- TOC entry 4685 (class 2606 OID 5299628)
-- Dependencies: 3405 4215 3398
-- Name: anatomical_system_junctions_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_system_junctions
    ADD CONSTRAINT anatomical_system_junctions_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4686 (class 2606 OID 5299633)
-- Dependencies: 3586 3405 4555
-- Name: anatomical_system_junctions_system_inst_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_system_junctions
    ADD CONSTRAINT anatomical_system_junctions_system_inst_id_fkey FOREIGN KEY (system_inst_id) REFERENCES system_instances(system_inst_id);


--
-- TOC entry 4687 (class 2606 OID 5299638)
-- Dependencies: 4575 3407 3598
-- Name: animal_age_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY animal
    ADD CONSTRAINT animal_age_unit_fkey FOREIGN KEY (age_unit) REFERENCES "time"(time_unit);


--
-- TOC entry 4693 (class 2606 OID 5299643)
-- Dependencies: 3409 4233 3407
-- Name: animal_id_fk2; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY animal_set
    ADD CONSTRAINT animal_id_fk2 FOREIGN KEY (animal_id) REFERENCES animal(animal_id);


--
-- TOC entry 4757 (class 2606 OID 5299648)
-- Dependencies: 3408 3460 4235
-- Name: animal_junction_pool_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subject
    ADD CONSTRAINT animal_junction_pool_fk FOREIGN KEY (animal_pool_junction_id) REFERENCES animal_pool_junction(animal_junction_pool_id);


--
-- TOC entry 4694 (class 2606 OID 5299653)
-- Dependencies: 4235 3409 3408
-- Name: animal_pool_junction_fk2; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY animal_set
    ADD CONSTRAINT animal_pool_junction_fk2 FOREIGN KEY (animal_pool_junction_id) REFERENCES animal_pool_junction(animal_junction_pool_id);


--
-- TOC entry 4754 (class 2606 OID 5299658)
-- Dependencies: 3458 4233 3407
-- Name: animal_project_to_animal_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_to_animal
    ADD CONSTRAINT animal_project_to_animal_fk FOREIGN KEY (animal_id) REFERENCES animal(animal_id);


--
-- TOC entry 4688 (class 2606 OID 5299663)
-- Dependencies: 3604 3407 4587
-- Name: animal_treatments_treatment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY animal
    ADD CONSTRAINT animal_treatments_treatment_id_fkey FOREIGN KEY (treatments_treatment_id) REFERENCES treatments(treatment_id);


--
-- TOC entry 4689 (class 2606 OID 5299668)
-- Dependencies: 3612 4601 3407
-- Name: animal_weight_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY animal
    ADD CONSTRAINT animal_weight_unit_fkey FOREIGN KEY (weight_unit) REFERENCES weight(weight_unit);


--
-- TOC entry 4695 (class 2606 OID 5299673)
-- Dependencies: 3410 4239 3411
-- Name: animations_animation_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY animations
    ADD CONSTRAINT animations_animation_set_id_fkey FOREIGN KEY (animation_set_id) REFERENCES animation_sets(animation_set_id);


--
-- TOC entry 4696 (class 2606 OID 5299678)
-- Dependencies: 4281 3431 3412
-- Name: annotation_segmentation_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY annotation_xml_set
    ADD CONSTRAINT annotation_segmentation_fk FOREIGN KEY (seg_id) REFERENCES segmentation(seg_id);


--
-- TOC entry 4697 (class 2606 OID 5299683)
-- Dependencies: 3412 4603 3613
-- Name: annotation_xml_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY annotation_xml_set
    ADD CONSTRAINT annotation_xml_fk FOREIGN KEY (xml_file_id) REFERENCES xml_file(xml_file_id);


--
-- TOC entry 4923 (class 2606 OID 5301703)
-- Dependencies: 4617 3623 3622
-- Name: area_flat_obj_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY segmented_flat_object
    ADD CONSTRAINT area_flat_obj_fk FOREIGN KEY (surface_area_unit) REFERENCES area_measurement(area_unit);


--
-- TOC entry 4786 (class 2606 OID 5299688)
-- Dependencies: 4353 3476 3484
-- Name: cc_celltype_junction_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY culturedcell_celltype_junction
    ADD CONSTRAINT cc_celltype_junction_fk FOREIGN KEY (cell_inst_id) REFERENCES cell_instances(cell_inst_id);


--
-- TOC entry 4717 (class 2606 OID 5299693)
-- Dependencies: 3426 4273 3427
-- Name: ccdb_data_section_fk1; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_purpose
    ADD CONSTRAINT ccdb_data_section_fk1 FOREIGN KEY (data_section_id) REFERENCES ccdb_data_section(data_section_id);


--
-- TOC entry 4897 (class 2606 OID 5299698)
-- Dependencies: 3593 4289 3438
-- Name: ccdb_file_fk1; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY tagged_mp_file
    ADD CONSTRAINT ccdb_file_fk1 FOREIGN KEY (ccdb_file_id) REFERENCES ccdb_file(ccdb_file_id);


--
-- TOC entry 4777 (class 2606 OID 5299703)
-- Dependencies: 3476 3440 4293
-- Name: cell_instances_cell_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY cell_instances
    ADD CONSTRAINT cell_instances_cell_type_id_fkey FOREIGN KEY (cell_type_id) REFERENCES cell_types(cell_type_id);


--
-- TOC entry 4778 (class 2606 OID 5299708)
-- Dependencies: 3463 4339 3477
-- Name: cellularfraction_type_junction_cellular_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY cellularfraction_type_junction
    ADD CONSTRAINT cellularfraction_type_junction_cellular_fk FOREIGN KEY (cellular_fraction_id) REFERENCES cellular_fraction(cellular_fraction_id);


--
-- TOC entry 4779 (class 2606 OID 5299713)
-- Dependencies: 3477 4553 3585
-- Name: cellularfraction_type_junction_subcelluar_inst_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY cellularfraction_type_junction
    ADD CONSTRAINT cellularfraction_type_junction_subcelluar_inst_fk FOREIGN KEY (subcellular_inist_id) REFERENCES subcellular_instances(subcellular_inst_id);


--
-- TOC entry 4780 (class 2606 OID 5299718)
-- Dependencies: 4537 3478 3576
-- Name: channel_protocol_step_association_sp_protocol_step_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY channel_protocol_step_association
    ADD CONSTRAINT channel_protocol_step_association_sp_protocol_step_id_fkey FOREIGN KEY (sp_protocol_step_id) REFERENCES sp_protocol_steps(step_id);


--
-- TOC entry 4782 (class 2606 OID 5299723)
-- Dependencies: 3479 4411 3510
-- Name: confocal_images_done_fluorescent_images_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY confocal_images_done
    ADD CONSTRAINT confocal_images_done_fluorescent_images_id_fkey FOREIGN KEY (fluorescent_images_id) REFERENCES fluorescent_images(fluorescent_images_id);


--
-- TOC entry 4783 (class 2606 OID 5299728)
-- Dependencies: 3481 4281 3431
-- Name: contour_components_seg_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY contour_components
    ADD CONSTRAINT contour_components_seg_id_fkey FOREIGN KEY (seg_id) REFERENCES segmentation(seg_id);


--
-- TOC entry 4768 (class 2606 OID 5299733)
-- Dependencies: 4317 3453 3466
-- Name: culture_by_grup_fk1; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY cultured_cell
    ADD CONSTRAINT culture_by_grup_fk1 FOREIGN KEY (cultured_by) REFERENCES groups(group_id);


--
-- TOC entry 4787 (class 2606 OID 5299738)
-- Dependencies: 4343 3466 3484
-- Name: cultured_cell_id; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY culturedcell_celltype_junction
    ADD CONSTRAINT cultured_cell_id FOREIGN KEY (cultured_cell_id) REFERENCES cultured_cell(cultured_cell_id);


--
-- TOC entry 4769 (class 2606 OID 5299743)
-- Dependencies: 3466 4293 3440
-- Name: cultured_cell_type; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY cultured_cell
    ADD CONSTRAINT cultured_cell_type FOREIGN KEY (cell_type) REFERENCES cell_types(cell_type_id);


--
-- TOC entry 4771 (class 2606 OID 5299748)
-- Dependencies: 3467 3466 4343
-- Name: culturedcell_project_to_culturedcell_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_to_culturedcell
    ADD CONSTRAINT culturedcell_project_to_culturedcell_fk FOREIGN KEY (cultured_cell_id) REFERENCES cultured_cell(cultured_cell_id);


--
-- TOC entry 4788 (class 2606 OID 5299753)
-- Dependencies: 3490 4521 3568
-- Name: dehydration_steps_dehydration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY dehydration_steps
    ADD CONSTRAINT dehydration_steps_dehydration_id_fkey FOREIGN KEY (dehydration_id) REFERENCES sp_dehydration(dehydration_id);


--
-- TOC entry 4789 (class 2606 OID 5299758)
-- Dependencies: 4575 3490 3598
-- Name: dehydration_steps_time_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY dehydration_steps
    ADD CONSTRAINT dehydration_steps_time_unit_fkey FOREIGN KEY (time_unit) REFERENCES "time"(time_unit);


--
-- TOC entry 4924 (class 2606 OID 5301708)
-- Dependencies: 3524 3623 4437
-- Name: diameter_length_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY segmented_flat_object
    ADD CONSTRAINT diameter_length_fk FOREIGN KEY (diameter_unit) REFERENCES length_measurement(length_unit);


--
-- TOC entry 4807 (class 2606 OID 5299763)
-- Dependencies: 3418 3505 4257
-- Name: em_mproduct; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY emproduct
    ADD CONSTRAINT em_mproduct FOREIGN KEY (mproduct) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4805 (class 2606 OID 5299768)
-- Dependencies: 3570 4525 3503
-- Name: embedding_steps_embedding_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY embedding_steps
    ADD CONSTRAINT embedding_steps_embedding_id_fkey FOREIGN KEY (embedding_id) REFERENCES sp_embeddings(embedding_id);


--
-- TOC entry 4811 (class 2606 OID 5299773)
-- Dependencies: 3506 4411 3510
-- Name: epifluorescent_images_done_fluorescent_images_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY epifluorescent_images_done
    ADD CONSTRAINT epifluorescent_images_done_fluorescent_images_id_fkey FOREIGN KEY (fluorescent_images_id) REFERENCES fluorescent_images(fluorescent_images_id);


--
-- TOC entry 4745 (class 2606 OID 5299778)
-- Dependencies: 4317 3453 3447
-- Name: experiment_experimenters_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY experiment
    ADD CONSTRAINT experiment_experimenters_fkey FOREIGN KEY (experimenters) REFERENCES groups(group_id);


--
-- TOC entry 4746 (class 2606 OID 5299783)
-- Dependencies: 3449 4313 3447
-- Name: experiment_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY experiment
    ADD CONSTRAINT experiment_project_id_fkey FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4670 (class 2606 OID 5299788)
-- Dependencies: 3505 4401 3394
-- Name: fk_acquisition_channel_em_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY acquisition_channels
    ADD CONSTRAINT fk_acquisition_channel_em_id FOREIGN KEY (emproduct_id) REFERENCES emproduct(emproduct_id);


--
-- TOC entry 4671 (class 2606 OID 5299793)
-- Dependencies: 4447 3528 3394
-- Name: fk_acquisition_channel_lmproduct_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY acquisition_channels
    ADD CONSTRAINT fk_acquisition_channel_lmproduct_id FOREIGN KEY (lmproduct_id) REFERENCES lm_product(lmproduct_id);


--
-- TOC entry 4674 (class 2606 OID 5299798)
-- Dependencies: 3416 4251 3398
-- Name: fk_anatomicaldetails_atlas_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_details
    ADD CONSTRAINT fk_anatomicaldetails_atlas_id FOREIGN KEY (atlas_id) REFERENCES atlases(atlas_id);


--
-- TOC entry 4675 (class 2606 OID 5299803)
-- Dependencies: 3398 3602 4583
-- Name: fk_anatomicaldetails_tissue_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY anatomical_details
    ADD CONSTRAINT fk_anatomicaldetails_tissue_id FOREIGN KEY (tissue_id) REFERENCES tissues(tissue_id);


--
-- TOC entry 4781 (class 2606 OID 5299808)
-- Dependencies: 4207 3394 3478
-- Name: fk_channel_protocol_step_acquisition_channel; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY channel_protocol_step_association
    ADD CONSTRAINT fk_channel_protocol_step_acquisition_channel FOREIGN KEY (acquisition_channel_id) REFERENCES acquisition_channels(acquisition_channel_id);


--
-- TOC entry 4861 (class 2606 OID 5299813)
-- Dependencies: 4571 3567 3596
-- Name: fk_chemfix_temperature; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_chemical_fixation
    ADD CONSTRAINT fk_chemfix_temperature FOREIGN KEY (temperature_unit) REFERENCES temperature(temperature_unit);


--
-- TOC entry 4784 (class 2606 OID 5299818)
-- Dependencies: 3482 3597 4573
-- Name: fk_coverslip_thickness; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY coverslips
    ADD CONSTRAINT fk_coverslip_thickness FOREIGN KEY (thickness_unit) REFERENCES thickness(thickness_unit);


--
-- TOC entry 4785 (class 2606 OID 5299823)
-- Dependencies: 3430 4279 3483
-- Name: fk_cropped_recon_recon_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY cropped_reconstructions
    ADD CONSTRAINT fk_cropped_recon_recon_id FOREIGN KEY (recon_id) REFERENCES reconstructions(recon_id);


--
-- TOC entry 4799 (class 2606 OID 5299828)
-- Dependencies: 3418 3497 4257
-- Name: fk_data_status-mproduct_id; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY product_status
    ADD CONSTRAINT "fk_data_status-mproduct_id" FOREIGN KEY (product_id) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4800 (class 2606 OID 5299833)
-- Dependencies: 3497 4313 3449
-- Name: fk_data_status-project_id; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY product_status
    ADD CONSTRAINT "fk_data_status-project_id" FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4790 (class 2606 OID 5299838)
-- Dependencies: 3491 4451 3530
-- Name: fk_detector_manufacturer; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY detectors
    ADD CONSTRAINT fk_detector_manufacturer FOREIGN KEY (manufacturer_id) REFERENCES manufacturers(manufacturer_id);


--
-- TOC entry 4791 (class 2606 OID 5299843)
-- Dependencies: 4595 3609 3491
-- Name: fk_detector_voltage_unit; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY detectors
    ADD CONSTRAINT fk_detector_voltage_unit FOREIGN KEY (voltage_unit) REFERENCES voltages(voltage_unit);


--
-- TOC entry 4792 (class 2606 OID 5299848)
-- Dependencies: 3422 4263 3492
-- Name: fk_device_camera; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY devices
    ADD CONSTRAINT fk_device_camera FOREIGN KEY (camera) REFERENCES cameras(camera_id);


--
-- TOC entry 4793 (class 2606 OID 5299853)
-- Dependencies: 3561 3492 4507
-- Name: fk_device_scanner; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY devices
    ADD CONSTRAINT fk_device_scanner FOREIGN KEY (scanner) REFERENCES scanners(scanner_id);


--
-- TOC entry 4795 (class 2606 OID 5299858)
-- Dependencies: 3509 3493 4409
-- Name: fk_dichroics_filter; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY dichroics
    ADD CONSTRAINT fk_dichroics_filter FOREIGN KEY (filter_id) REFERENCES filters(filter_id);


--
-- TOC entry 4796 (class 2606 OID 5299863)
-- Dependencies: 3497 4389 3494
-- Name: fk_dif_log_prod_access-product_status_id; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY dif_log_product_access
    ADD CONSTRAINT "fk_dif_log_prod_access-product_status_id" FOREIGN KEY (product_status_id) REFERENCES product_status(product_status_id);


--
-- TOC entry 4802 (class 2606 OID 5299868)
-- Dependencies: 3500 3492 4381
-- Name: fk_digitizinginfo_devices; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY digitizing_info
    ADD CONSTRAINT fk_digitizinginfo_devices FOREIGN KEY (digitizing_platform) REFERENCES devices(device_id);


--
-- TOC entry 4803 (class 2606 OID 5299873)
-- Dependencies: 3500 3448 4309
-- Name: fk_digitizinginfo_person; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY digitizing_info
    ADD CONSTRAINT fk_digitizinginfo_person FOREIGN KEY (digitized_by) REFERENCES persons_2(person_id);


--
-- TOC entry 4804 (class 2606 OID 5299878)
-- Dependencies: 3501 3430 4279
-- Name: fk_downsampled_recon_recon_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY down_sampled_reconstructions
    ADD CONSTRAINT fk_downsampled_recon_recon_id FOREIGN KEY (recon_id) REFERENCES reconstructions(recon_id);


--
-- TOC entry 4808 (class 2606 OID 5299883)
-- Dependencies: 3505 3609 4595
-- Name: fk_em_accelerating_voltage_unit; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY emproduct
    ADD CONSTRAINT fk_em_accelerating_voltage_unit FOREIGN KEY (accelerating_voltage_unit) REFERENCES voltages(voltage_unit);


--
-- TOC entry 4809 (class 2606 OID 5299888)
-- Dependencies: 3505 3502 4395
-- Name: fk_em_embeddingmedium; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY emproduct
    ADD CONSTRAINT fk_em_embeddingmedium FOREIGN KEY (embedding_medium) REFERENCES embedding_medium(embedding_medium_id);


--
-- TOC entry 4810 (class 2606 OID 5299893)
-- Dependencies: 3524 3505 4437
-- Name: fk_em_spot_size; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY emproduct
    ADD CONSTRAINT fk_em_spot_size FOREIGN KEY (spot_size_unit) REFERENCES length_measurement(length_unit);


--
-- TOC entry 4806 (class 2606 OID 5299898)
-- Dependencies: 4409 3504 3509
-- Name: fk_emission_filters_filter_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY emission_filters
    ADD CONSTRAINT fk_emission_filters_filter_id FOREIGN KEY (filter_id) REFERENCES filters(filter_id);


--
-- TOC entry 4841 (class 2606 OID 5299903)
-- Dependencies: 3598 4575 3550
-- Name: fk_end_time_unit; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT fk_end_time_unit FOREIGN KEY (end_time_unit) REFERENCES "time"(time_unit);


--
-- TOC entry 4812 (class 2606 OID 5299908)
-- Dependencies: 4409 3507 3509
-- Name: fk_excitation_filter_filter_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY excitation_filters
    ADD CONSTRAINT fk_excitation_filter_filter_id FOREIGN KEY (filter_id) REFERENCES filters(filter_id);


--
-- TOC entry 4921 (class 2606 OID 5301229)
-- Dependencies: 4407 3508 3620
-- Name: fk_file_format_mapping_format_id; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY file_format_mappings
    ADD CONSTRAINT fk_file_format_mapping_format_id FOREIGN KEY (file_format_id) REFERENCES file_formats(file_format_id);


--
-- TOC entry 4922 (class 2606 OID 5301234)
-- Dependencies: 4609 3620 3619
-- Name: fk_file_format_mapping_purpose; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY file_format_mappings
    ADD CONSTRAINT fk_file_format_mapping_purpose FOREIGN KEY (purpose_id) REFERENCES file_format_purposes(file_format_purpose_id);


--
-- TOC entry 4813 (class 2606 OID 5299913)
-- Dependencies: 3530 3509 4451
-- Name: fk_filter_manufacturer_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY filters
    ADD CONSTRAINT fk_filter_manufacturer_id FOREIGN KEY (manufacturer_id) REFERENCES manufacturers(manufacturer_id);


--
-- TOC entry 4842 (class 2606 OID 5299918)
-- Dependencies: 3598 3550 4575
-- Name: fk_frame_interval_unit; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT fk_frame_interval_unit FOREIGN KEY (frame_interval_unit) REFERENCES "time"(time_unit);


--
-- TOC entry 4722 (class 2606 OID 5299923)
-- Dependencies: 4275 3428 3429
-- Name: fk_image_sets_used_image_set_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY image_sets_used
    ADD CONSTRAINT fk_image_sets_used_image_set_id FOREIGN KEY (image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4718 (class 2606 OID 5299928)
-- Dependencies: 4391 3428 3500
-- Name: fk_imageset_digitizinginfo; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY image_sets
    ADD CONSTRAINT fk_imageset_digitizinginfo FOREIGN KEY (digitizing_info) REFERENCES digitizing_info(digitizing_info_id);


--
-- TOC entry 4719 (class 2606 OID 5299933)
-- Dependencies: 4407 3428 3508
-- Name: fk_imageset_fileformat; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY image_sets
    ADD CONSTRAINT fk_imageset_fileformat FOREIGN KEY (data_file_format) REFERENCES file_formats(file_format_id);


--
-- TOC entry 4819 (class 2606 OID 5299938)
-- Dependencies: 3523 4437 3524
-- Name: fk_laser_wave_length; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lasers
    ADD CONSTRAINT fk_laser_wave_length FOREIGN KEY (wave_length_unit) REFERENCES length_measurement(length_unit);


--
-- TOC entry 4820 (class 2606 OID 5299943)
-- Dependencies: 3523 4441 3526
-- Name: fk_light_source_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lasers
    ADD CONSTRAINT fk_light_source_id FOREIGN KEY (light_source) REFERENCES light_sources(light_source_id);


--
-- TOC entry 4822 (class 2606 OID 5299948)
-- Dependencies: 3530 3526 4451
-- Name: fk_light_source_manufacturer; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY light_sources
    ADD CONSTRAINT fk_light_source_manufacturer FOREIGN KEY (manufacturer_id) REFERENCES manufacturers(manufacturer_id);


--
-- TOC entry 4930 (class 2606 OID 5417332)
-- Dependencies: 3394 3635 4207
-- Name: fk_lm_channel_acquisition_channel; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_channels
    ADD CONSTRAINT fk_lm_channel_acquisition_channel FOREIGN KEY (acquisition_channel) REFERENCES acquisition_channels(acquisition_channel_id);


--
-- TOC entry 4931 (class 2606 OID 5417337)
-- Dependencies: 4441 3526 3635
-- Name: fk_lm_channel_aux_light_source; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_channels
    ADD CONSTRAINT fk_lm_channel_aux_light_source FOREIGN KEY (aux_light_source) REFERENCES light_sources(light_source_id);


--
-- TOC entry 4932 (class 2606 OID 5417342)
-- Dependencies: 3491 4379 3635
-- Name: fk_lm_channel_detector; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_channels
    ADD CONSTRAINT fk_lm_channel_detector FOREIGN KEY (detector) REFERENCES detectors(detector_id);


--
-- TOC entry 4933 (class 2606 OID 5417347)
-- Dependencies: 3509 4409 3635
-- Name: fk_lm_channel_filter; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_channels
    ADD CONSTRAINT fk_lm_channel_filter FOREIGN KEY (filter) REFERENCES filters(filter_id);


--
-- TOC entry 4934 (class 2606 OID 5417352)
-- Dependencies: 3635 4441 3526
-- Name: fk_lm_channel_light_source; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_channels
    ADD CONSTRAINT fk_lm_channel_light_source FOREIGN KEY (light_source) REFERENCES light_sources(light_source_id);


--
-- TOC entry 4823 (class 2606 OID 5299953)
-- Dependencies: 3482 4365 3528
-- Name: fk_lm_coverslip; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_product
    ADD CONSTRAINT fk_lm_coverslip FOREIGN KEY (coverslips) REFERENCES coverslips(coverslip_id);


--
-- TOC entry 4824 (class 2606 OID 5299958)
-- Dependencies: 3520 4429 3528
-- Name: fk_lm_immersionmedium; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_product
    ADD CONSTRAINT fk_lm_immersionmedium FOREIGN KEY (immersion_medium) REFERENCES immersion_medium(immersion_medium_id);


--
-- TOC entry 4825 (class 2606 OID 5299963)
-- Dependencies: 4439 3528 3525
-- Name: fk_lm_lens; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_product
    ADD CONSTRAINT fk_lm_lens FOREIGN KEY (lens) REFERENCES lenses(lens_id);


--
-- TOC entry 4826 (class 2606 OID 5299968)
-- Dependencies: 3528 3534 4461
-- Name: fk_lm_mountingmedium; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_product
    ADD CONSTRAINT fk_lm_mountingmedium FOREIGN KEY (mounting_medium) REFERENCES mounting_medium(mounting_medium_id);


--
-- TOC entry 4870 (class 2606 OID 5299973)
-- Dependencies: 3572 3596 4571
-- Name: fk_microtomy_temperature; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_microtomy
    ADD CONSTRAINT fk_microtomy_temperature FOREIGN KEY (temperature_unit) REFERENCES temperature(temperature_unit);


--
-- TOC entry 4833 (class 2606 OID 5299978)
-- Dependencies: 3536 3418 4257
-- Name: fk_my_favorite_mpid; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY my_favorites
    ADD CONSTRAINT fk_my_favorite_mpid FOREIGN KEY (mpid) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4797 (class 2606 OID 5299983)
-- Dependencies: 3495 3428 4275
-- Name: fk_processedimage_source_image_set; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY processed_image_sets
    ADD CONSTRAINT fk_processedimage_source_image_set FOREIGN KEY (source_image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4798 (class 2606 OID 5299988)
-- Dependencies: 3495 3428 4275
-- Name: fk_processedimageset_result_image_set; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY processed_image_sets
    ADD CONSTRAINT fk_processedimageset_result_image_set FOREIGN KEY (result_image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4801 (class 2606 OID 5299993)
-- Dependencies: 3497 3486 4373
-- Name: fk_product_status-data_input_statuses; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY product_status
    ADD CONSTRAINT "fk_product_status-data_input_statuses" FOREIGN KEY (status_id) REFERENCES data_input_statuses(data_input_status_id);


--
-- TOC entry 4935 (class 2606 OID 5417381)
-- Dependencies: 4629 3636 3637
-- Name: fk_protein_inst_type_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY protein_instances
    ADD CONSTRAINT fk_protein_inst_type_id FOREIGN KEY (protein_type_id) REFERENCES protein_types(protein_type_id);


--
-- TOC entry 4821 (class 2606 OID 5299998)
-- Dependencies: 3523 3526 4441
-- Name: fk_pump_light_source_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lasers
    ADD CONSTRAINT fk_pump_light_source_id FOREIGN KEY (pump_light_source) REFERENCES light_sources(light_source_id);


--
-- TOC entry 4721 (class 2606 OID 5517929)
-- Dependencies: 3428 3524 4437
-- Name: fk_raw_images_res_unit_len; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY image_sets
    ADD CONSTRAINT fk_raw_images_res_unit_len FOREIGN KEY (resolution_unit) REFERENCES length_measurement(length_unit);


--
-- TOC entry 4843 (class 2606 OID 5300003)
-- Dependencies: 3550 3519 4427
-- Name: fk_raw_img_set_params_imaging_product_type_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT fk_raw_img_set_params_imaging_product_type_id FOREIGN KEY (imaging_product_type_id) REFERENCES imaging_product_types(imaging_product_type_id);


--
-- TOC entry 4724 (class 2606 OID 5300008)
-- Dependencies: 3430 3395 4209
-- Name: fk_recon_algorithm_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT fk_recon_algorithm_id FOREIGN KEY (recon_algorithm) REFERENCES algorithms(algorithm_id);


--
-- TOC entry 4725 (class 2606 OID 5300013)
-- Dependencies: 4211 3396 3430
-- Name: fk_recon_alignment_method; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT fk_recon_alignment_method FOREIGN KEY (alignment_method) REFERENCES alignment_methods(alignment_method_id);


--
-- TOC entry 4726 (class 2606 OID 5300018)
-- Dependencies: 3430 3566 4517
-- Name: fk_recon_alignment_program; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT fk_recon_alignment_program FOREIGN KEY (alignment_program) REFERENCES software(software_id);


--
-- TOC entry 4727 (class 2606 OID 5300023)
-- Dependencies: 4517 3430 3566
-- Name: fk_recon_decon_software; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT fk_recon_decon_software FOREIGN KEY (decon_software) REFERENCES software(software_id);


--
-- TOC entry 4728 (class 2606 OID 5300028)
-- Dependencies: 3508 3430 4407
-- Name: fk_recon_file_format; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT fk_recon_file_format FOREIGN KEY (recon_file_format) REFERENCES file_formats(file_format_id);


--
-- TOC entry 4729 (class 2606 OID 5300033)
-- Dependencies: 3434 3430 4285
-- Name: fk_reconstructions_recontype_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT fk_reconstructions_recontype_id FOREIGN KEY (recon_type) REFERENCES reconstruction_types(recon_type_id);


--
-- TOC entry 4939 (class 2606 OID 20086923)
-- Dependencies: 3649 4257 3418
-- Name: fk_sand_data_downloaded_mpid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sand_downloaded_data_files
    ADD CONSTRAINT fk_sand_data_downloaded_mpid FOREIGN KEY (mpid) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4940 (class 2606 OID 20086928)
-- Dependencies: 4646 3648 3649
-- Name: fk_sand_data_downloader_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sand_downloaded_data_files
    ADD CONSTRAINT fk_sand_data_downloader_id FOREIGN KEY (sand_downloader_id) REFERENCES sand_data_downloaders(sand_downloader_id);


--
-- TOC entry 4941 (class 2606 OID 20086933)
-- Dependencies: 3426 3649 4271
-- Name: fk_sand_data_file_downloaded_purpose_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sand_downloaded_data_files
    ADD CONSTRAINT fk_sand_data_file_downloaded_purpose_id FOREIGN KEY (file_purpose) REFERENCES ccdb_data_purpose(data_purpose_id);


--
-- TOC entry 4733 (class 2606 OID 5300038)
-- Dependencies: 3395 3431 4209
-- Name: fk_seg_algorithm; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation
    ADD CONSTRAINT fk_seg_algorithm FOREIGN KEY (seg_algorithm) REFERENCES algorithms(algorithm_id);


--
-- TOC entry 4928 (class 2606 OID 5517934)
-- Dependencies: 3524 4437 3623
-- Name: fk_seg_flat_obj_lebeling_intensity; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY segmented_flat_object
    ADD CONSTRAINT fk_seg_flat_obj_lebeling_intensity FOREIGN KEY (labeling_intensity_unit) REFERENCES length_measurement(length_unit);


--
-- TOC entry 4739 (class 2606 OID 5300043)
-- Dependencies: 3428 3432 4275
-- Name: fk_seg_set_image_set_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation_sets
    ADD CONSTRAINT fk_seg_set_image_set_id FOREIGN KEY (image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4734 (class 2606 OID 5300048)
-- Dependencies: 3448 3431 4309
-- Name: fk_segmentation_segperson_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation
    ADD CONSTRAINT fk_segmentation_segperson_id FOREIGN KEY (seg_person_name) REFERENCES persons_2(person_id);


--
-- TOC entry 4874 (class 2606 OID 20086945)
-- Dependencies: 3637 4631 3574
-- Name: fk_sp_molecular_target_protein_instance; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_molecular_target
    ADD CONSTRAINT fk_sp_molecular_target_protein_instance FOREIGN KEY (protein_instance) REFERENCES protein_instances(protein_instance_id);


--
-- TOC entry 4885 (class 2606 OID 5300053)
-- Dependencies: 3596 3578 4571
-- Name: fk_stain_temperature; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_stain
    ADD CONSTRAINT fk_stain_temperature FOREIGN KEY (temperature_unit) REFERENCES temperature(temperature_unit);


--
-- TOC entry 4844 (class 2606 OID 5300058)
-- Dependencies: 3598 3550 4575
-- Name: fk_start_time_unit; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT fk_start_time_unit FOREIGN KEY (start_time_unit) REFERENCES "time"(time_unit);


--
-- TOC entry 4845 (class 2606 OID 5300063)
-- Dependencies: 4575 3550 3598
-- Name: fk_stimulation_interval_unit; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT fk_stimulation_interval_unit FOREIGN KEY (stimulation_interval_unit) REFERENCES "time"(time_unit);


--
-- TOC entry 4936 (class 2606 OID 5417396)
-- Dependencies: 4207 3638 3394
-- Name: fk_temp_c_mappings_acquisition_c_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY temp_channel_mappings
    ADD CONSTRAINT fk_temp_c_mappings_acquisition_c_id FOREIGN KEY (acquisition_channel_id) REFERENCES acquisition_channels(acquisition_channel_id);


--
-- TOC entry 4937 (class 2606 OID 5417401)
-- Dependencies: 3638 4531 3573
-- Name: fk_temp_c_mappings_mol_loc_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY temp_channel_mappings
    ADD CONSTRAINT fk_temp_c_mappings_mol_loc_id FOREIGN KEY (molecular_localization_id) REFERENCES sp_molecular_localization(molecular_localization_id);


--
-- TOC entry 4732 (class 2606 OID 5517924)
-- Dependencies: 3524 3430 4437
-- Name: fk_voxel_scale_unit_len; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT fk_voxel_scale_unit_len FOREIGN KEY (voxel_scale_unit) REFERENCES length_measurement(length_unit);


--
-- TOC entry 4846 (class 2606 OID 5300068)
-- Dependencies: 3550 3597 4573
-- Name: fk_z_resolution_unit; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT fk_z_resolution_unit FOREIGN KEY (z_resolution_unit) REFERENCES thickness(thickness_unit);


--
-- TOC entry 4847 (class 2606 OID 5300073)
-- Dependencies: 4573 3550 3597
-- Name: fk_z_step_unit; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT fk_z_step_unit FOREIGN KEY (z_step_unit) REFERENCES thickness(thickness_unit);


--
-- TOC entry 4814 (class 2606 OID 5300078)
-- Dependencies: 3529 3510 4449
-- Name: fluorescent_images_channel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY fluorescent_images
    ADD CONSTRAINT fluorescent_images_channel_id_fkey FOREIGN KEY (channel_id) REFERENCES lmproduct_channels(channel_id);


--
-- TOC entry 4815 (class 2606 OID 5300083)
-- Dependencies: 3514 3513 4417
-- Name: google_authentication_google_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY google_authentication
    ADD CONSTRAINT google_authentication_google_user_id_fkey FOREIGN KEY (google_user_id) REFERENCES google_users(google_user_id);


--
-- TOC entry 4750 (class 2606 OID 5300088)
-- Dependencies: 3453 3452 4317
-- Name: group_of_people_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY group_of_people
    ADD CONSTRAINT group_of_people_group_id_fkey FOREIGN KEY (group_id) REFERENCES groups(group_id);


--
-- TOC entry 4751 (class 2606 OID 5300093)
-- Dependencies: 3448 3452 4309
-- Name: group_of_people_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY group_of_people
    ADD CONSTRAINT group_of_people_person_id_fkey FOREIGN KEY (person_id) REFERENCES persons_2(person_id);


--
-- TOC entry 4713 (class 2606 OID 5300098)
-- Dependencies: 3453 3425 4317
-- Name: group_permission; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_permission
    ADD CONSTRAINT group_permission FOREIGN KEY (group_id) REFERENCES groups(group_id);


--
-- TOC entry 4816 (class 2606 OID 5300103)
-- Dependencies: 3417 3515 4253
-- Name: image_info_fk2; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY image2d_annotation_xml_set
    ADD CONSTRAINT image_info_fk2 FOREIGN KEY (image_info_id) REFERENCES image_info(image_info_id);


--
-- TOC entry 4723 (class 2606 OID 5300108)
-- Dependencies: 3430 3429 4279
-- Name: image_sets_used_recon_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY image_sets_used
    ADD CONSTRAINT image_sets_used_recon_id_fkey FOREIGN KEY (recon_id) REFERENCES reconstructions(recon_id);


--
-- TOC entry 4714 (class 2606 OID 5300113)
-- Dependencies: 3448 3425 4309
-- Name: individual_permission; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_permission
    ADD CONSTRAINT individual_permission FOREIGN KEY (person_id) REFERENCES persons_2(person_id);


--
-- TOC entry 4818 (class 2606 OID 5300118)
-- Dependencies: 3521 3522 4433
-- Name: instrument_type_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY instrument
    ADD CONSTRAINT instrument_type_fk FOREIGN KEY (instrument_type_id) REFERENCES instrument_type(instrument_type_id);


--
-- TOC entry 4889 (class 2606 OID 5300123)
-- Dependencies: 3582 3400 4219
-- Name: junction_region_inst_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY specimen_anatomical_junction
    ADD CONSTRAINT junction_region_inst_fk FOREIGN KEY (region_inst_id) REFERENCES anatomical_region_inst(region_inst_id);


--
-- TOC entry 4890 (class 2606 OID 5300128)
-- Dependencies: 4545 3582 3581
-- Name: junction_specimen_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY specimen_anatomical_junction
    ADD CONSTRAINT junction_specimen_fk FOREIGN KEY (specimen_id) REFERENCES specimen(specimen_id);


--
-- TOC entry 4925 (class 2606 OID 5301713)
-- Dependencies: 3524 4437 3623
-- Name: length_seg_flat_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY segmented_flat_object
    ADD CONSTRAINT length_seg_flat_fk FOREIGN KEY (length_unit) REFERENCES length_measurement(length_unit);


--
-- TOC entry 4690 (class 2606 OID 5300133)
-- Dependencies: 3527 3407 4443
-- Name: litter_animal_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY animal
    ADD CONSTRAINT litter_animal_fk FOREIGN KEY (litter_id) REFERENCES litter(litter_id);


--
-- TOC entry 4827 (class 2606 OID 5300138)
-- Dependencies: 3418 3528 4257
-- Name: lm_product_microscopy_products_mpid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lm_product
    ADD CONSTRAINT lm_product_microscopy_products_mpid_fkey FOREIGN KEY (mproduct) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4828 (class 2606 OID 5300143)
-- Dependencies: 3528 3529 4447
-- Name: lmproduct_channels_lmproduct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lmproduct_channels
    ADD CONSTRAINT lmproduct_channels_lmproduct_id_fkey FOREIGN KEY (lmproduct_id) REFERENCES lm_product(lmproduct_id);


--
-- TOC entry 4794 (class 2606 OID 5300148)
-- Dependencies: 3530 3492 4451
-- Name: manufacturer; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY devices
    ADD CONSTRAINT manufacturer FOREIGN KEY (manufacturer) REFERENCES manufacturers(manufacturer_id);


--
-- TOC entry 4691 (class 2606 OID 5300153)
-- Dependencies: 3530 3407 4451
-- Name: manufacturer_animal_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY animal
    ADD CONSTRAINT manufacturer_animal_fk FOREIGN KEY (manufacturer_id) REFERENCES manufacturers(manufacturer_id);


--
-- TOC entry 4829 (class 2606 OID 5300158)
-- Dependencies: 3532 3531 4455
-- Name: map_file_junctions_map_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY map_file_junctions
    ADD CONSTRAINT map_file_junctions_map_file_id_fkey FOREIGN KEY (map_file_id) REFERENCES map_files(map_file_id);


--
-- TOC entry 4830 (class 2606 OID 5300163)
-- Dependencies: 3418 3531 4257
-- Name: map_file_junctions_mpid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY map_file_junctions
    ADD CONSTRAINT map_file_junctions_mpid_fkey FOREIGN KEY (mpid) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4831 (class 2606 OID 5300168)
-- Dependencies: 4253 3532 3417
-- Name: map_files_image_info_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY map_files
    ADD CONSTRAINT map_files_image_info_id_fkey FOREIGN KEY (image_info_id) REFERENCES image_info(image_info_id);


--
-- TOC entry 4708 (class 2606 OID 5300173)
-- Dependencies: 3424 3418 4257
-- Name: mapping_mpid_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_mapping
    ADD CONSTRAINT mapping_mpid_fk FOREIGN KEY (mpid) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4709 (class 2606 OID 5300178)
-- Dependencies: 4271 3424 3426
-- Name: mapping_purpose_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_mapping
    ADD CONSTRAINT mapping_purpose_fk FOREIGN KEY (purpose_id) REFERENCES ccdb_data_purpose(data_purpose_id);


--
-- TOC entry 4710 (class 2606 OID 5300183)
-- Dependencies: 3430 3424 4279
-- Name: mapping_reconstruction_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_mapping
    ADD CONSTRAINT mapping_reconstruction_fk FOREIGN KEY (recon_id) REFERENCES reconstructions(recon_id);


--
-- TOC entry 4711 (class 2606 OID 5300188)
-- Dependencies: 3431 3424 4281
-- Name: mapping_segmenation_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_mapping
    ADD CONSTRAINT mapping_segmenation_fk FOREIGN KEY (seg_id) REFERENCES segmentation(seg_id);


--
-- TOC entry 4773 (class 2606 OID 5300193)
-- Dependencies: 3430 3469 4279
-- Name: member_reconstructions_recon_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY member_reconstructions
    ADD CONSTRAINT member_reconstructions_recon_id_fkey FOREIGN KEY (recon_id) REFERENCES reconstructions(recon_id);


--
-- TOC entry 4715 (class 2606 OID 5300198)
-- Dependencies: 3418 3425 4257
-- Name: microscopy_permission; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_permission
    ADD CONSTRAINT microscopy_permission FOREIGN KEY (microscopy_product_id) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4776 (class 2606 OID 5300203)
-- Dependencies: 3418 3475 4257
-- Name: microscopy_product_session; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_upload_session
    ADD CONSTRAINT microscopy_product_session FOREIGN KEY (mpid) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4700 (class 2606 OID 5300208)
-- Dependencies: 3398 3418 4215
-- Name: microscopy_products_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT microscopy_products_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4701 (class 2606 OID 5300213)
-- Dependencies: 3447 3418 4305
-- Name: microscopy_products_experiment_experiment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT microscopy_products_experiment_experiment_id_fkey FOREIGN KEY (experiment_experiment_id) REFERENCES experiment(experiment_id);


--
-- TOC entry 4702 (class 2606 OID 5300218)
-- Dependencies: 3418 4431 3521
-- Name: microscopy_products_instrument_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT microscopy_products_instrument_id_fkey FOREIGN KEY (instrument_id) REFERENCES instrument(instrument_id);


--
-- TOC entry 4703 (class 2606 OID 5300223)
-- Dependencies: 3418 3554 4493
-- Name: microscopy_products_x_resolution_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT microscopy_products_x_resolution_unit_fkey FOREIGN KEY (x_resolution_unit) REFERENCES resolution(resolution_unit);


--
-- TOC entry 4704 (class 2606 OID 5300228)
-- Dependencies: 3418 3554 4493
-- Name: microscopy_products_y_resolution_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT microscopy_products_y_resolution_unit_fkey FOREIGN KEY (y_resolution_unit) REFERENCES resolution(resolution_unit);


--
-- TOC entry 4712 (class 2606 OID 5300233)
-- Dependencies: 4275 3424 3428
-- Name: mpaing_image_set; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_mapping
    ADD CONSTRAINT mpaing_image_set FOREIGN KEY (image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4705 (class 2606 OID 5300238)
-- Dependencies: 3533 3418 4457
-- Name: mpproduct_mptype_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT mpproduct_mptype_fk FOREIGN KEY (microscopy_product_type_id) REFERENCES microscopy_product_type(microscopy_product_type_id);


--
-- TOC entry 4832 (class 2606 OID 5300243)
-- Dependencies: 3510 3535 4411
-- Name: multiphoton_images_fluorescent_images_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY multiphoton_images
    ADD CONSTRAINT multiphoton_images_fluorescent_images_id_fkey FOREIGN KEY (fluorescent_images_id) REFERENCES fluorescent_images(fluorescent_images_id);


--
-- TOC entry 4834 (class 2606 OID 5300248)
-- Dependencies: 3441 3539 4295
-- Name: organ_instances_organ_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY organ_instances
    ADD CONSTRAINT organ_instances_organ_type_id_fkey FOREIGN KEY (organ_type_id) REFERENCES organ_types(organ_type_id);


--
-- TOC entry 4835 (class 2606 OID 5300253)
-- Dependencies: 3428 3542 4275
-- Name: param_files_id_image_sets_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY param_files
    ADD CONSTRAINT param_files_id_image_sets_id_fk FOREIGN KEY (image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4836 (class 2606 OID 5300258)
-- Dependencies: 3541 3542 4477
-- Name: param_files_param_file_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY param_files
    ADD CONSTRAINT param_files_param_file_type_id_fkey FOREIGN KEY (param_file_type_id) REFERENCES param_file_types(param_file_type_id);


--
-- TOC entry 4837 (class 2606 OID 5300263)
-- Dependencies: 3448 3543 4309
-- Name: person_and_roles_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY person_and_roles
    ADD CONSTRAINT person_and_roles_person_id_fkey FOREIGN KEY (person_id) REFERENCES persons_2(person_id);


--
-- TOC entry 4838 (class 2606 OID 5300268)
-- Dependencies: 3556 3543 4497
-- Name: person_and_roles_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY person_and_roles
    ADD CONSTRAINT person_and_roles_role_id_fkey FOREIGN KEY (role_id) REFERENCES roles(role_id);


--
-- TOC entry 4758 (class 2606 OID 5300273)
-- Dependencies: 3463 3460 4339
-- Name: physical_specimen_cellular_fraction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subject
    ADD CONSTRAINT physical_specimen_cellular_fraction_id_fkey FOREIGN KEY (cellular_fraction_id) REFERENCES cellular_fraction(cellular_fraction_id);


--
-- TOC entry 4759 (class 2606 OID 5300278)
-- Dependencies: 3460 3466 4343
-- Name: physical_specimen_cultured_cell_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subject
    ADD CONSTRAINT physical_specimen_cultured_cell_id_fkey FOREIGN KEY (cultured_cell_id) REFERENCES cultured_cell(cultured_cell_id);


--
-- TOC entry 4760 (class 2606 OID 5300283)
-- Dependencies: 3460 3601 4581
-- Name: physical_specimen_tissue_slice_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subject
    ADD CONSTRAINT physical_specimen_tissue_slice_id_fkey FOREIGN KEY (tissue_slice_id) REFERENCES tissue_slice(tissue_slice_id);


--
-- TOC entry 4770 (class 2606 OID 5300288)
-- Dependencies: 4481 3466 3547
-- Name: plate_density_fk1; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY cultured_cell
    ADD CONSTRAINT plate_density_fk1 FOREIGN KEY (plating_density_unit) REFERENCES plate_density_unit(plate_density_unit);


--
-- TOC entry 4920 (class 2606 OID 5301075)
-- Dependencies: 3617 4313 3449
-- Name: processingstep_desc_project_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY processingstep_description
    ADD CONSTRAINT processingstep_desc_project_fk FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4761 (class 2606 OID 5301080)
-- Dependencies: 3460 4607 3617
-- Name: processingstep_desc_subject_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subject
    ADD CONSTRAINT processingstep_desc_subject_id FOREIGN KEY (processingstep_desc_id) REFERENCES processingstep_description(processingstep_desc_id);


--
-- TOC entry 4747 (class 2606 OID 5300293)
-- Dependencies: 3453 3449 4317
-- Name: project_collaborators_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project
    ADD CONSTRAINT project_collaborators_fkey FOREIGN KEY (collaborators) REFERENCES groups(group_id);


--
-- TOC entry 4748 (class 2606 OID 5300298)
-- Dependencies: 3453 3449 4317
-- Name: project_leaders_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project
    ADD CONSTRAINT project_leaders_fkey FOREIGN KEY (leaders) REFERENCES groups(group_id);


--
-- TOC entry 4716 (class 2606 OID 5300303)
-- Dependencies: 3449 3425 4313
-- Name: project_permission; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY ccdb_data_permission
    ADD CONSTRAINT project_permission FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4755 (class 2606 OID 5300308)
-- Dependencies: 3449 3458 4313
-- Name: project_project_to_animal_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_to_animal
    ADD CONSTRAINT project_project_to_animal_fk FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4772 (class 2606 OID 5300313)
-- Dependencies: 3449 3467 4313
-- Name: project_project_to_cultured_cell_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_to_culturedcell
    ADD CONSTRAINT project_project_to_cultured_cell_fk FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4766 (class 2606 OID 5300318)
-- Dependencies: 3449 3464 4313
-- Name: project_project_to_subcellular_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_to_subcellular_fraction
    ADD CONSTRAINT project_project_to_subcellular_fk FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4839 (class 2606 OID 5300323)
-- Dependencies: 4313 3548 3449
-- Name: project_project_to_tissue_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_to_tissue
    ADD CONSTRAINT project_project_to_tissue_fk FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4749 (class 2606 OID 5300328)
-- Dependencies: 3455 3449 4323
-- Name: project_publication_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project
    ADD CONSTRAINT project_publication_set_id_fkey FOREIGN KEY (publication_set_id) REFERENCES publication_set(publication_set_id);


--
-- TOC entry 4762 (class 2606 OID 5300333)
-- Dependencies: 3449 4313 3461
-- Name: project_subjectGroup_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY subject_group
    ADD CONSTRAINT "project_subjectGroup_fk" FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4929 (class 2606 OID 5417303)
-- Dependencies: 4313 3449 3632
-- Name: project_tree_html_projectID_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_tree_html
    ADD CONSTRAINT "project_tree_html_projectID_fk" FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4763 (class 2606 OID 5300338)
-- Dependencies: 3577 4539 3461
-- Name: protocol_subjectGroup_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY subject_group
    ADD CONSTRAINT "protocol_subjectGroup_fk" FOREIGN KEY (protocol_id) REFERENCES sp_protocols(protocol_id);


--
-- TOC entry 4752 (class 2606 OID 5300343)
-- Dependencies: 3456 4325 3454
-- Name: publication_fk1; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY publication_junction
    ADD CONSTRAINT publication_fk1 FOREIGN KEY (publication_id) REFERENCES publications(publication_id);


--
-- TOC entry 4753 (class 2606 OID 5300348)
-- Dependencies: 3454 3455 4323
-- Name: publication_set_fk1; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY publication_junction
    ADD CONSTRAINT publication_set_fk1 FOREIGN KEY (publication_set_id) REFERENCES publication_set(publication_set_id);


--
-- TOC entry 4848 (class 2606 OID 5300353)
-- Dependencies: 3550 3428 4275
-- Name: raw_image_set_params_raw_image_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_image_set_params
    ADD CONSTRAINT raw_image_set_params_raw_image_set_id_fkey FOREIGN KEY (raw_image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4720 (class 2606 OID 5300358)
-- Dependencies: 3418 4257 3428
-- Name: raw_image_sets_mproduct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY image_sets
    ADD CONSTRAINT raw_image_sets_mproduct_id_fkey FOREIGN KEY (mproduct_id) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4742 (class 2606 OID 5300363)
-- Dependencies: 3417 3436 4253
-- Name: raw_images_image_info_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_images
    ADD CONSTRAINT raw_images_image_info_id_fkey FOREIGN KEY (image_info_id) REFERENCES image_info(image_info_id);


--
-- TOC entry 4743 (class 2606 OID 5300368)
-- Dependencies: 3428 3436 4275
-- Name: raw_images_raw_image_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY raw_images
    ADD CONSTRAINT raw_images_raw_image_set_id_fkey FOREIGN KEY (raw_image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4849 (class 2606 OID 5300373)
-- Dependencies: 3413 3551 4245
-- Name: reagent_component_stock_antibody_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reagent_component_stock
    ADD CONSTRAINT reagent_component_stock_antibody_id_fkey FOREIGN KEY (antibody_id) REFERENCES antibodies(antibody_id);


--
-- TOC entry 4850 (class 2606 OID 5300378)
-- Dependencies: 4471 3538 3551
-- Name: reagent_component_stock_nucleic_acid_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reagent_component_stock
    ADD CONSTRAINT reagent_component_stock_nucleic_acid_id_fkey FOREIGN KEY (nucleic_acid_id) REFERENCES nucleic_acid(nucleic_acid_id);


--
-- TOC entry 4851 (class 2606 OID 5300383)
-- Dependencies: 4487 3552 3551
-- Name: reagent_components_reagent_component_stock_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reagent_components
    ADD CONSTRAINT reagent_components_reagent_component_stock_id_fkey FOREIGN KEY (reagent_component_stock_id) REFERENCES reagent_component_stock(reagent_component_stock_id);


--
-- TOC entry 4852 (class 2606 OID 5300388)
-- Dependencies: 4491 3552 3553
-- Name: reagent_components_reagent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reagent_components
    ADD CONSTRAINT reagent_components_reagent_id_fkey FOREIGN KEY (reagent_id) REFERENCES reagents(reagent_id);


--
-- TOC entry 4774 (class 2606 OID 5300393)
-- Dependencies: 4279 3469 3430
-- Name: recon_mem_recon_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY member_reconstructions
    ADD CONSTRAINT recon_mem_recon_fk FOREIGN KEY (super_recon_id) REFERENCES reconstructions(recon_id);


--
-- TOC entry 4730 (class 2606 OID 5300398)
-- Dependencies: 3410 4239 3430
-- Name: reconstructions_animation_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT reconstructions_animation_set_id_fkey FOREIGN KEY (animation_set_id) REFERENCES animation_sets(animation_set_id);


--
-- TOC entry 4731 (class 2606 OID 5300403)
-- Dependencies: 4517 3430 3566
-- Name: reconstructions_software_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reconstructions
    ADD CONSTRAINT reconstructions_software_id_fkey FOREIGN KEY (recon_software_id) REFERENCES software(software_id);


--
-- TOC entry 4706 (class 2606 OID 5300408)
-- Dependencies: 3418 4493 3554
-- Name: resolution_z_resol_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT resolution_z_resol_fk FOREIGN KEY (z_resolution_unit) REFERENCES resolution(resolution_unit);


--
-- TOC entry 4853 (class 2606 OID 5300413)
-- Dependencies: 3558 4215 3398
-- Name: scan_products_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY scan_products
    ADD CONSTRAINT scan_products_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4854 (class 2606 OID 5300418)
-- Dependencies: 4499 3557 3558
-- Name: scan_products_scan_parameters_scan_parameter_pk_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY scan_products
    ADD CONSTRAINT scan_products_scan_parameters_scan_parameter_pk_fkey FOREIGN KEY (scan_parameters_scan_parameter_pk) REFERENCES scan_parameters(scan_parameter_pk);


--
-- TOC entry 4855 (class 2606 OID 5300423)
-- Dependencies: 4503 3558 3559
-- Name: scan_products_scan_protocol_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY scan_products
    ADD CONSTRAINT scan_products_scan_protocol_type_id_fkey FOREIGN KEY (scan_protocol_type_id) REFERENCES scan_protocol_type(scan_protocol_type_id);


--
-- TOC entry 4856 (class 2606 OID 5300428)
-- Dependencies: 3558 3560 4505
-- Name: scan_products_scan_sequence_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY scan_products
    ADD CONSTRAINT scan_products_scan_sequence_type_id_fkey FOREIGN KEY (scan_sequence_type_id) REFERENCES scan_sequence_type(scan_sequence_type_id);


--
-- TOC entry 4857 (class 2606 OID 5300433)
-- Dependencies: 3558 3554 4493
-- Name: scan_products_x_resolution_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY scan_products
    ADD CONSTRAINT scan_products_x_resolution_unit_fkey FOREIGN KEY (x_resolution_unit) REFERENCES resolution(resolution_unit);


--
-- TOC entry 4858 (class 2606 OID 5300438)
-- Dependencies: 3558 4493 3554
-- Name: scan_products_y_resolution_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY scan_products
    ADD CONSTRAINT scan_products_y_resolution_unit_fkey FOREIGN KEY (y_resolution_unit) REFERENCES resolution(resolution_unit);


--
-- TOC entry 4926 (class 2606 OID 5301718)
-- Dependencies: 3623 3431 4281
-- Name: segid_seg_flat_obj_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY segmented_flat_object
    ADD CONSTRAINT segid_seg_flat_obj_fk FOREIGN KEY (seg_id) REFERENCES segmentation(seg_id);


--
-- TOC entry 4735 (class 2606 OID 5300443)
-- Dependencies: 3431 4239 3410
-- Name: segmentation_animation_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation
    ADD CONSTRAINT segmentation_animation_set_id_fkey FOREIGN KEY (animation_set_id) REFERENCES animation_sets(animation_set_id);


--
-- TOC entry 4736 (class 2606 OID 5300448)
-- Dependencies: 3431 4605 3614
-- Name: segmentation_parser_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation
    ADD CONSTRAINT segmentation_parser_id_fkey FOREIGN KEY (xml_parser) REFERENCES xml_parsers(parser_id);


--
-- TOC entry 4737 (class 2606 OID 5300453)
-- Dependencies: 4283 3432 3431
-- Name: segmentation_segmentation_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation
    ADD CONSTRAINT segmentation_segmentation_set_id_fkey FOREIGN KEY (segmentation_set_id) REFERENCES segmentation_sets(segmentation_set_id);


--
-- TOC entry 4738 (class 2606 OID 5300458)
-- Dependencies: 3564 4513 3431
-- Name: segmentation_segmented_object_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation
    ADD CONSTRAINT segmentation_segmented_object_type_id_fkey FOREIGN KEY (segmented_object_type_id) REFERENCES segmented_object_types(type_id);


--
-- TOC entry 4740 (class 2606 OID 5300463)
-- Dependencies: 3430 4279 3432
-- Name: segmentation_sets_recon_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation_sets
    ADD CONSTRAINT segmentation_sets_recon_id FOREIGN KEY (recon_id) REFERENCES reconstructions(recon_id);


--
-- TOC entry 4741 (class 2606 OID 5300468)
-- Dependencies: 4509 3432 3562
-- Name: segmentation_sets_seg_intent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation_sets
    ADD CONSTRAINT segmentation_sets_seg_intent_id_fkey FOREIGN KEY (seg_intent_id) REFERENCES segmentation_intent(seg_intent_id);


--
-- TOC entry 4859 (class 2606 OID 5300473)
-- Dependencies: 4281 3563 3431
-- Name: segmentation_transformation_input_segmentation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation_transformation
    ADD CONSTRAINT segmentation_transformation_input_segmentation_id_fkey FOREIGN KEY (input_segmentation_id) REFERENCES segmentation(seg_id);


--
-- TOC entry 4860 (class 2606 OID 5300478)
-- Dependencies: 3563 4281 3431
-- Name: segmentation_transformation_output_segmentation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY segmentation_transformation
    ADD CONSTRAINT segmentation_transformation_output_segmentation_id_fkey FOREIGN KEY (output_segmentation_id) REFERENCES segmentation(seg_id);


--
-- TOC entry 4942 (class 2606 OID 26605448)
-- Dependencies: 4654 3659 3658
-- Name: slash_project_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY slash_project
    ADD CONSTRAINT slash_project_creator_id_fkey FOREIGN KEY (creator_id) REFERENCES slash_user(user_id);


--
-- TOC entry 4862 (class 2606 OID 5300483)
-- Dependencies: 3553 3567 4491
-- Name: sp_chemical_fixation_done_reagent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_chemical_fixation
    ADD CONSTRAINT sp_chemical_fixation_done_reagent_id_fkey FOREIGN KEY (reagent_id) REFERENCES reagents(reagent_id);


--
-- TOC entry 4863 (class 2606 OID 5300488)
-- Dependencies: 3598 4575 3567
-- Name: sp_chemical_fixation_done_time_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_chemical_fixation
    ADD CONSTRAINT sp_chemical_fixation_done_time_unit_fkey FOREIGN KEY (time_unit) REFERENCES "time"(time_unit);


--
-- TOC entry 4864 (class 2606 OID 5300493)
-- Dependencies: 3567 3610 4597
-- Name: sp_chemical_fixation_done_volume_measurement_volume_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_chemical_fixation
    ADD CONSTRAINT sp_chemical_fixation_done_volume_measurement_volume_unit_fkey FOREIGN KEY (volume_measurement_volume_unit) REFERENCES volume_measurement(volume_unit);


--
-- TOC entry 4865 (class 2606 OID 5300498)
-- Dependencies: 3553 3568 4491
-- Name: sp_dehydration_fixation_reagent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_dehydration
    ADD CONSTRAINT sp_dehydration_fixation_reagent_id_fkey FOREIGN KEY (fixation_reagent_id) REFERENCES reagents(reagent_id);


--
-- TOC entry 4868 (class 2606 OID 20086940)
-- Dependencies: 3569 3634 4625
-- Name: sp_detection_method_chromagen; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_detection_method
    ADD CONSTRAINT sp_detection_method_chromagen FOREIGN KEY (chromagen) REFERENCES fluors(fluor_id);


--
-- TOC entry 4866 (class 2606 OID 5300503)
-- Dependencies: 3573 3569 4531
-- Name: sp_detection_method_molecular_localization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_detection_method
    ADD CONSTRAINT sp_detection_method_molecular_localization_id_fkey FOREIGN KEY (molecular_localization_id) REFERENCES sp_molecular_localization(molecular_localization_id);


--
-- TOC entry 4867 (class 2606 OID 5300508)
-- Dependencies: 4491 3569 3553
-- Name: sp_detection_method_reagent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_detection_method
    ADD CONSTRAINT sp_detection_method_reagent_id_fkey FOREIGN KEY (reagent_id) REFERENCES reagents(reagent_id);


--
-- TOC entry 4869 (class 2606 OID 5300513)
-- Dependencies: 4491 3553 3570
-- Name: sp_embeddings_embedding_reagent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_embeddings
    ADD CONSTRAINT sp_embeddings_embedding_reagent_id_fkey FOREIGN KEY (embedding_reagent_id) REFERENCES reagents(reagent_id);


--
-- TOC entry 4871 (class 2606 OID 5300518)
-- Dependencies: 4491 3553 3572
-- Name: sp_microtomy_reagent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_microtomy
    ADD CONSTRAINT sp_microtomy_reagent_id_fkey FOREIGN KEY (reagent_id) REFERENCES reagents(reagent_id);


--
-- TOC entry 4872 (class 2606 OID 5300523)
-- Dependencies: 3572 3597 4573
-- Name: sp_microtomy_thickness_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_microtomy
    ADD CONSTRAINT sp_microtomy_thickness_unit_fkey FOREIGN KEY (thickness_unit) REFERENCES thickness(thickness_unit);


--
-- TOC entry 4873 (class 2606 OID 5300528)
-- Dependencies: 4531 3573 3574
-- Name: sp_molecular_target_molecular_localization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_molecular_target
    ADD CONSTRAINT sp_molecular_target_molecular_localization_id_fkey FOREIGN KEY (molecular_localization_id) REFERENCES sp_molecular_localization(molecular_localization_id);


--
-- TOC entry 4875 (class 2606 OID 5300533)
-- Dependencies: 3575 4531 3573
-- Name: sp_probe_molecular_localization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_probe
    ADD CONSTRAINT sp_probe_molecular_localization_id_fkey FOREIGN KEY (molecular_localization_id) REFERENCES sp_molecular_localization(molecular_localization_id);


--
-- TOC entry 4876 (class 2606 OID 5300538)
-- Dependencies: 4489 3552 3575
-- Name: sp_probe_reagent_component_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_probe
    ADD CONSTRAINT sp_probe_reagent_component_id_fkey FOREIGN KEY (reagent_component_id) REFERENCES reagent_components(reagent_component_id);


--
-- TOC entry 4877 (class 2606 OID 5300543)
-- Dependencies: 4519 3567 3576
-- Name: sp_protocol_steps_chemical_fixation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_protocol_steps
    ADD CONSTRAINT sp_protocol_steps_chemical_fixation_id_fkey FOREIGN KEY (chemical_fixation_id) REFERENCES sp_chemical_fixation(chemical_fixation_id);


--
-- TOC entry 4878 (class 2606 OID 5300548)
-- Dependencies: 3576 3568 4521
-- Name: sp_protocol_steps_dehydration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_protocol_steps
    ADD CONSTRAINT sp_protocol_steps_dehydration_id_fkey FOREIGN KEY (dehydration_id) REFERENCES sp_dehydration(dehydration_id);


--
-- TOC entry 4879 (class 2606 OID 5300553)
-- Dependencies: 3576 3570 4525
-- Name: sp_protocol_steps_embedding_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_protocol_steps
    ADD CONSTRAINT sp_protocol_steps_embedding_id_fkey FOREIGN KEY (embedding_id) REFERENCES sp_embeddings(embedding_id);


--
-- TOC entry 4880 (class 2606 OID 5300558)
-- Dependencies: 3576 3571 4527
-- Name: sp_protocol_steps_freezing_fixation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_protocol_steps
    ADD CONSTRAINT sp_protocol_steps_freezing_fixation_id_fkey FOREIGN KEY (freezing_fixation_id) REFERENCES sp_freezing_fixation(freezing_fixation_id);


--
-- TOC entry 4881 (class 2606 OID 5300563)
-- Dependencies: 3576 3572 4529
-- Name: sp_protocol_steps_microtomy_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_protocol_steps
    ADD CONSTRAINT sp_protocol_steps_microtomy_id_fkey FOREIGN KEY (microtomy_id) REFERENCES sp_microtomy(microtomy_id);


--
-- TOC entry 4882 (class 2606 OID 5300568)
-- Dependencies: 3576 3573 4531
-- Name: sp_protocol_steps_molecular_localization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_protocol_steps
    ADD CONSTRAINT sp_protocol_steps_molecular_localization_id_fkey FOREIGN KEY (molecular_localization_id) REFERENCES sp_molecular_localization(molecular_localization_id);


--
-- TOC entry 4883 (class 2606 OID 5300573)
-- Dependencies: 3576 3578 4541
-- Name: sp_protocol_steps_stain_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_protocol_steps
    ADD CONSTRAINT sp_protocol_steps_stain_id_fkey FOREIGN KEY (stain_id) REFERENCES sp_stain(stain_id);


--
-- TOC entry 4884 (class 2606 OID 5300578)
-- Dependencies: 3577 3448 4309
-- Name: sp_protocols_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_protocols
    ADD CONSTRAINT sp_protocols_person_id_fkey FOREIGN KEY (person_id) REFERENCES persons_2(person_id);


--
-- TOC entry 4886 (class 2606 OID 5300583)
-- Dependencies: 3578 3448 4309
-- Name: sp_stain_person_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_stain
    ADD CONSTRAINT sp_stain_person_id_fkey FOREIGN KEY (person_id) REFERENCES persons_2(person_id);


--
-- TOC entry 4887 (class 2606 OID 5300588)
-- Dependencies: 3578 3553 4491
-- Name: sp_stain_reagent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sp_stain
    ADD CONSTRAINT sp_stain_reagent_id_fkey FOREIGN KEY (reagent_id) REFERENCES reagents(reagent_id);


--
-- TOC entry 4756 (class 2606 OID 5300593)
-- Dependencies: 3459 3540 4475
-- Name: species_organism_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY species
    ADD CONSTRAINT species_organism_id_fkey FOREIGN KEY (organism_id) REFERENCES organism(organism_id);


--
-- TOC entry 4744 (class 2606 OID 5300598)
-- Dependencies: 3459 4329 3442
-- Name: species_strain_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY strain
    ADD CONSTRAINT species_strain_fk FOREIGN KEY (species_id) REFERENCES species(species_id);


--
-- TOC entry 4707 (class 2606 OID 5300603)
-- Dependencies: 3418 3581 4545
-- Name: specimen_mp_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY microscopy_products
    ADD CONSTRAINT specimen_mp_fk FOREIGN KEY (specimen_id) REFERENCES specimen(specimen_id);


--
-- TOC entry 4891 (class 2606 OID 5300608)
-- Dependencies: 3577 3583 4539
-- Name: steps_in_protocol_protocol_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY steps_in_protocol
    ADD CONSTRAINT steps_in_protocol_protocol_id_fkey FOREIGN KEY (protocol_id) REFERENCES sp_protocols(protocol_id);


--
-- TOC entry 4892 (class 2606 OID 5300613)
-- Dependencies: 3576 3583 4537
-- Name: steps_in_protocol_step_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY steps_in_protocol
    ADD CONSTRAINT steps_in_protocol_step_id_fkey FOREIGN KEY (step_id) REFERENCES sp_protocol_steps(step_id);


--
-- TOC entry 4692 (class 2606 OID 5300618)
-- Dependencies: 4297 3442 3407
-- Name: strain_animal_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY animal
    ADD CONSTRAINT strain_animal_fk FOREIGN KEY (strain_id) REFERENCES strain(strain_id);


--
-- TOC entry 4893 (class 2606 OID 5300623)
-- Dependencies: 3443 3584 4299
-- Name: structure_instances_structure_types_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY structure_instances
    ADD CONSTRAINT structure_instances_structure_types_id_fkey FOREIGN KEY (structure_types_id) REFERENCES structure_types(structure_id);


--
-- TOC entry 4894 (class 2606 OID 5300628)
-- Dependencies: 4301 3585 3444
-- Name: subcellular_instances_subcellular_comp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subcellular_instances
    ADD CONSTRAINT subcellular_instances_subcellular_comp_id_fkey FOREIGN KEY (subcellular_comp_id) REFERENCES subcellular_comp_types(subcellular_comp_id);


--
-- TOC entry 4767 (class 2606 OID 5300633)
-- Dependencies: 4339 3463 3464
-- Name: subcellular_project_to_subcellular_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_to_subcellular_fraction
    ADD CONSTRAINT subcellular_project_to_subcellular_fk FOREIGN KEY (subcellular_fraction_id) REFERENCES cellular_fraction(cellular_fraction_id);


--
-- TOC entry 4764 (class 2606 OID 5300638)
-- Dependencies: 3461 3462 4335
-- Name: subjectGroup_subjectSet_Fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY subject_set
    ADD CONSTRAINT "subjectGroup_subjectSet_Fk" FOREIGN KEY (subject_group_id) REFERENCES subject_group(subject_group_id);


--
-- TOC entry 4888 (class 2606 OID 5300643)
-- Dependencies: 3460 3581 4333
-- Name: subject_id; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY specimen
    ADD CONSTRAINT subject_id FOREIGN KEY (subject_id) REFERENCES subject(subject_id);


--
-- TOC entry 4765 (class 2606 OID 5300648)
-- Dependencies: 3460 3462 4333
-- Name: subject_subjectSet_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY subject_set
    ADD CONSTRAINT "subject_subjectSet_fk" FOREIGN KEY (subject_id) REFERENCES subject(subject_id);


--
-- TOC entry 4775 (class 2606 OID 5300653)
-- Dependencies: 3566 3470 4517
-- Name: super_reconstructions_software_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY super_reconstructions
    ADD CONSTRAINT super_reconstructions_software_id_fkey FOREIGN KEY (software_id) REFERENCES software(software_id);


--
-- TOC entry 4895 (class 2606 OID 5300658)
-- Dependencies: 3445 3586 4303
-- Name: system_instances_system_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY system_instances
    ADD CONSTRAINT system_instances_system_type_id_fkey FOREIGN KEY (system_type_id) REFERENCES system_types(system_type_id);


--
-- TOC entry 4900 (class 2606 OID 5300663)
-- Dependencies: 3601 3599 4581
-- Name: t_n_a_tissue_slice_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY tissue_anatomical_region_junction
    ADD CONSTRAINT t_n_a_tissue_slice_fk FOREIGN KEY (tissue_id) REFERENCES tissue_slice(tissue_slice_id);


--
-- TOC entry 4896 (class 2606 OID 5300668)
-- Dependencies: 4563 3592 3591
-- Name: tag_category_fk1; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY tag
    ADD CONSTRAINT tag_category_fk1 FOREIGN KEY (tag_category_id) REFERENCES tag_category(tag_category_id);


--
-- TOC entry 4898 (class 2606 OID 5300673)
-- Dependencies: 3418 3593 4257
-- Name: tag_mp_mpid_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY tagged_mp_file
    ADD CONSTRAINT tag_mp_mpid_fk FOREIGN KEY (mpid) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4899 (class 2606 OID 5300678)
-- Dependencies: 4557 3593 3591
-- Name: tag_tagged_mp_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY tagged_mp_file
    ADD CONSTRAINT tag_tagged_mp_fk FOREIGN KEY (tag_id) REFERENCES tag(tag_id);


--
-- TOC entry 4840 (class 2606 OID 5300683)
-- Dependencies: 3601 3548 4581
-- Name: tissue_project_to_tissue_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY project_to_tissue
    ADD CONSTRAINT tissue_project_to_tissue_fk FOREIGN KEY (tissue_id) REFERENCES tissue_slice(tissue_slice_id);


--
-- TOC entry 4902 (class 2606 OID 5300688)
-- Dependencies: 3601 3600 4581
-- Name: tissue_section_transformation_tissue_slice_input_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tissue_section_transformation
    ADD CONSTRAINT tissue_section_transformation_tissue_slice_input_fkey FOREIGN KEY (tissue_slice_input) REFERENCES tissue_slice(tissue_slice_id);


--
-- TOC entry 4903 (class 2606 OID 5300693)
-- Dependencies: 3601 4581 3600
-- Name: tissue_section_transformation_tissue_slice_output_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tissue_section_transformation
    ADD CONSTRAINT tissue_section_transformation_tissue_slice_output_fkey FOREIGN KEY (tissue_slice_output) REFERENCES tissue_slice(tissue_slice_id);


--
-- TOC entry 4904 (class 2606 OID 5300698)
-- Dependencies: 3601 3597 4573
-- Name: tissue_slice_thickness_unit_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tissue_slice
    ADD CONSTRAINT tissue_slice_thickness_unit_fkey FOREIGN KEY (thickness_unit) REFERENCES thickness(thickness_unit);


--
-- TOC entry 4901 (class 2606 OID 5300703)
-- Dependencies: 3400 4219 3599
-- Name: tna_anatomical_region_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY tissue_anatomical_region_junction
    ADD CONSTRAINT tna_anatomical_region_fk FOREIGN KEY (region_inst_id) REFERENCES anatomical_region_inst(region_inst_id);


--
-- TOC entry 4905 (class 2606 OID 5300708)
-- Dependencies: 3529 3603 4449
-- Name: transmitted_images_channel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transmitted_images
    ADD CONSTRAINT transmitted_images_channel_id_fkey FOREIGN KEY (channel_id) REFERENCES lmproduct_channels(channel_id);


--
-- TOC entry 4906 (class 2606 OID 5300713)
-- Dependencies: 3577 3604 4539
-- Name: treatments_protocol_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY treatments
    ADD CONSTRAINT treatments_protocol_id_fkey FOREIGN KEY (protocol_id) REFERENCES sp_protocols(protocol_id);


--
-- TOC entry 4907 (class 2606 OID 5300718)
-- Dependencies: 4281 3431 3605
-- Name: tree_components_seg_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tree_components
    ADD CONSTRAINT tree_components_seg_id_fkey FOREIGN KEY (seg_id) REFERENCES segmentation(seg_id);


--
-- TOC entry 4908 (class 2606 OID 5300723)
-- Dependencies: 4589 3606 3605
-- Name: tree_nodes_tree_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tree_nodes
    ADD CONSTRAINT tree_nodes_tree_id_fkey FOREIGN KEY (tree_id) REFERENCES tree_components(tree_id);


--
-- TOC entry 4909 (class 2606 OID 5300728)
-- Dependencies: 4589 3607 3605
-- Name: tree_segments_tree_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tree_segments
    ADD CONSTRAINT tree_segments_tree_id_fkey FOREIGN KEY (tree_id) REFERENCES tree_components(tree_id);


--
-- TOC entry 4938 (class 2606 OID 5417449)
-- Dependencies: 3642 4281 3431
-- Name: volume_component_seg_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY volume_component
    ADD CONSTRAINT volume_component_seg_id_fkey FOREIGN KEY (seg_id) REFERENCES segmentation(seg_id);


--
-- TOC entry 4927 (class 2606 OID 5301723)
-- Dependencies: 4597 3623 3610
-- Name: volume_unit_seg_flat_fk; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY segmented_flat_object
    ADD CONSTRAINT volume_unit_seg_flat_fk FOREIGN KEY (volume_unit) REFERENCES volume_measurement(volume_unit);


--
-- TOC entry 4910 (class 2606 OID 5300733)
-- Dependencies: 3398 4215 3611
-- Name: web_simplified_product_anatomical_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_anatomical_details_id_fkey FOREIGN KEY (anatomical_details_id) REFERENCES anatomical_details(anatomical_details_id);


--
-- TOC entry 4911 (class 2606 OID 5300738)
-- Dependencies: 4401 3611 3505
-- Name: web_simplified_product_emproduct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_emproduct_id_fkey FOREIGN KEY (emproduct_id) REFERENCES emproduct(emproduct_id);


--
-- TOC entry 4912 (class 2606 OID 5300743)
-- Dependencies: 4305 3447 3611
-- Name: web_simplified_product_experiment_experiment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_experiment_experiment_id_fkey FOREIGN KEY (experiment_experiment_id) REFERENCES experiment(experiment_id);


--
-- TOC entry 4913 (class 2606 OID 5300748)
-- Dependencies: 3611 4447 3528
-- Name: web_simplified_product_lmproduct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_lmproduct_id_fkey FOREIGN KEY (lmproduct_id) REFERENCES lm_product(lmproduct_id);


--
-- TOC entry 4914 (class 2606 OID 5300753)
-- Dependencies: 3611 4257 3418
-- Name: web_simplified_product_microscopy_products_mpid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_microscopy_products_mpid_fkey FOREIGN KEY (microscopy_products_mpid) REFERENCES microscopy_products(mpid);


--
-- TOC entry 4915 (class 2606 OID 5300758)
-- Dependencies: 4313 3449 3611
-- Name: web_simplified_product_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_project_id_fkey FOREIGN KEY (project_id) REFERENCES project(project_id);


--
-- TOC entry 4916 (class 2606 OID 5300763)
-- Dependencies: 3455 3611 4323
-- Name: web_simplified_product_publication_set_publication_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_publication_set_publication_set_id_fkey FOREIGN KEY (publication_set_publication_set_id) REFERENCES publication_set(publication_set_id);


--
-- TOC entry 4917 (class 2606 OID 5300768)
-- Dependencies: 3428 3611 4275
-- Name: web_simplified_product_raw_image_sets_raw_image_set_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_raw_image_sets_raw_image_set_id_fkey FOREIGN KEY (raw_image_sets_raw_image_set_id) REFERENCES image_sets(image_set_id);


--
-- TOC entry 4918 (class 2606 OID 5300773)
-- Dependencies: 3430 4279 3611
-- Name: web_simplified_product_recon; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_recon FOREIGN KEY (recon_id) REFERENCES reconstructions(recon_id);


--
-- TOC entry 4919 (class 2606 OID 5300778)
-- Dependencies: 3432 3611 4283
-- Name: web_simplified_product_segmentation_sets_segmentation_set__fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY web_simplified_product
    ADD CONSTRAINT web_simplified_product_segmentation_sets_segmentation_set__fkey FOREIGN KEY (segmentation_sets_segmentation_set_id) REFERENCES segmentation_sets(segmentation_set_id);


--
-- TOC entry 4817 (class 2606 OID 5300783)
-- Dependencies: 4603 3613 3515
-- Name: xml_file_fk2; Type: FK CONSTRAINT; Schema: public; Owner: ccdbd_dev
--

ALTER TABLE ONLY image2d_annotation_xml_set
    ADD CONSTRAINT xml_file_fk2 FOREIGN KEY (xml_file_id) REFERENCES xml_file(xml_file_id);


--
-- TOC entry 4947 (class 0 OID 0)
-- Dependencies: 6
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- TOC entry 4948 (class 0 OID 0)
-- Dependencies: 3394
-- Name: acquisition_channels; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE acquisition_channels FROM PUBLIC;
REVOKE ALL ON TABLE acquisition_channels FROM postgres;
GRANT ALL ON TABLE acquisition_channels TO postgres;
GRANT ALL ON TABLE acquisition_channels TO ccdbd_dev;


--
-- TOC entry 4949 (class 0 OID 0)
-- Dependencies: 3395
-- Name: algorithms; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE algorithms FROM PUBLIC;
REVOKE ALL ON TABLE algorithms FROM ccdbd_dev;
GRANT ALL ON TABLE algorithms TO ccdbd_dev;


--
-- TOC entry 4950 (class 0 OID 0)
-- Dependencies: 3396
-- Name: alignment_methods; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE alignment_methods FROM PUBLIC;
REVOKE ALL ON TABLE alignment_methods FROM postgres;
GRANT ALL ON TABLE alignment_methods TO postgres;
GRANT ALL ON TABLE alignment_methods TO ccdbd_dev;


--
-- TOC entry 4951 (class 0 OID 0)
-- Dependencies: 3397
-- Name: anatomical_cell_junctions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_cell_junctions FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_cell_junctions FROM postgres;
GRANT ALL ON TABLE anatomical_cell_junctions TO postgres;
GRANT ALL ON TABLE anatomical_cell_junctions TO ccdbd_dev;


--
-- TOC entry 4952 (class 0 OID 0)
-- Dependencies: 3398
-- Name: anatomical_details; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_details FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_details FROM postgres;
GRANT ALL ON TABLE anatomical_details TO postgres;
GRANT ALL ON TABLE anatomical_details TO ccdbd_dev;


--
-- TOC entry 4953 (class 0 OID 0)
-- Dependencies: 3399
-- Name: anatomical_organ_junctions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_organ_junctions FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_organ_junctions FROM postgres;
GRANT ALL ON TABLE anatomical_organ_junctions TO postgres;
GRANT ALL ON TABLE anatomical_organ_junctions TO ccdbd_dev;


--
-- TOC entry 4954 (class 0 OID 0)
-- Dependencies: 3400
-- Name: anatomical_region_inst; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_region_inst FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_region_inst FROM postgres;
GRANT ALL ON TABLE anatomical_region_inst TO postgres;
GRANT ALL ON TABLE anatomical_region_inst TO ccdbd_dev;


--
-- TOC entry 4955 (class 0 OID 0)
-- Dependencies: 3401
-- Name: anatomical_region_junctions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_region_junctions FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_region_junctions FROM postgres;
GRANT ALL ON TABLE anatomical_region_junctions TO postgres;
GRANT ALL ON TABLE anatomical_region_junctions TO ccdbd_dev;


--
-- TOC entry 4956 (class 0 OID 0)
-- Dependencies: 3402
-- Name: anatomical_region_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_region_types FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_region_types FROM postgres;
GRANT ALL ON TABLE anatomical_region_types TO postgres;
GRANT ALL ON TABLE anatomical_region_types TO ccdbd_dev;


--
-- TOC entry 4957 (class 0 OID 0)
-- Dependencies: 3403
-- Name: anatomical_structure_junctions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_structure_junctions FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_structure_junctions FROM postgres;
GRANT ALL ON TABLE anatomical_structure_junctions TO postgres;
GRANT ALL ON TABLE anatomical_structure_junctions TO ccdbd_dev;


--
-- TOC entry 4958 (class 0 OID 0)
-- Dependencies: 3404
-- Name: anatomical_subcellular_junctions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_subcellular_junctions FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_subcellular_junctions FROM postgres;
GRANT ALL ON TABLE anatomical_subcellular_junctions TO postgres;
GRANT ALL ON TABLE anatomical_subcellular_junctions TO ccdbd_dev;


--
-- TOC entry 4959 (class 0 OID 0)
-- Dependencies: 3405
-- Name: anatomical_system_junctions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE anatomical_system_junctions FROM PUBLIC;
REVOKE ALL ON TABLE anatomical_system_junctions FROM postgres;
GRANT ALL ON TABLE anatomical_system_junctions TO postgres;
GRANT ALL ON TABLE anatomical_system_junctions TO ccdbd_dev;


--
-- TOC entry 4960 (class 0 OID 0)
-- Dependencies: 3406
-- Name: angles; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE angles FROM PUBLIC;
REVOKE ALL ON TABLE angles FROM postgres;
GRANT ALL ON TABLE angles TO postgres;
GRANT ALL ON TABLE angles TO ccdbd_dev;


--
-- TOC entry 4961 (class 0 OID 0)
-- Dependencies: 3407
-- Name: animal; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE animal FROM PUBLIC;
REVOKE ALL ON TABLE animal FROM postgres;
GRANT ALL ON TABLE animal TO postgres;
GRANT ALL ON TABLE animal TO ccdbd_dev;


--
-- TOC entry 4962 (class 0 OID 0)
-- Dependencies: 3408
-- Name: animal_pool_junction; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE animal_pool_junction FROM PUBLIC;
REVOKE ALL ON TABLE animal_pool_junction FROM postgres;
GRANT ALL ON TABLE animal_pool_junction TO postgres;
GRANT ALL ON TABLE animal_pool_junction TO ccdbd_dev;


--
-- TOC entry 4963 (class 0 OID 0)
-- Dependencies: 3409
-- Name: animal_set; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE animal_set FROM PUBLIC;
REVOKE ALL ON TABLE animal_set FROM ccdbd_dev;
GRANT ALL ON TABLE animal_set TO ccdbd_dev;


--
-- TOC entry 4964 (class 0 OID 0)
-- Dependencies: 3410
-- Name: animation_sets; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE animation_sets FROM PUBLIC;
REVOKE ALL ON TABLE animation_sets FROM postgres;
GRANT ALL ON TABLE animation_sets TO postgres;
GRANT ALL ON TABLE animation_sets TO ccdbd_dev;


--
-- TOC entry 4965 (class 0 OID 0)
-- Dependencies: 3411
-- Name: animations; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE animations FROM PUBLIC;
REVOKE ALL ON TABLE animations FROM postgres;
GRANT ALL ON TABLE animations TO postgres;
GRANT ALL ON TABLE animations TO ccdbd_dev;


--
-- TOC entry 4966 (class 0 OID 0)
-- Dependencies: 3413
-- Name: antibodies; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE antibodies FROM PUBLIC;
REVOKE ALL ON TABLE antibodies FROM postgres;
GRANT ALL ON TABLE antibodies TO postgres;
GRANT ALL ON TABLE antibodies TO ccdbd_dev;


--
-- TOC entry 4967 (class 0 OID 0)
-- Dependencies: 3416
-- Name: atlases; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE atlases FROM PUBLIC;
REVOKE ALL ON TABLE atlases FROM ccdbd_dev;
GRANT ALL ON TABLE atlases TO ccdbd_dev;


--
-- TOC entry 4968 (class 0 OID 0)
-- Dependencies: 3417
-- Name: image_info; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE image_info FROM PUBLIC;
REVOKE ALL ON TABLE image_info FROM postgres;
GRANT ALL ON TABLE image_info TO postgres;
GRANT ALL ON TABLE image_info TO ccdbd_dev;


--
-- TOC entry 4969 (class 0 OID 0)
-- Dependencies: 3418
-- Name: microscopy_products; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE microscopy_products FROM PUBLIC;
REVOKE ALL ON TABLE microscopy_products FROM ccdbd_dev;
GRANT ALL ON TABLE microscopy_products TO ccdbd_dev;


--
-- TOC entry 4970 (class 0 OID 0)
-- Dependencies: 3419
-- Name: available_workflow_images_view; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE available_workflow_images_view FROM PUBLIC;
REVOKE ALL ON TABLE available_workflow_images_view FROM postgres;
GRANT ALL ON TABLE available_workflow_images_view TO postgres;


--
-- TOC entry 4971 (class 0 OID 0)
-- Dependencies: 3420
-- Name: bit_measurement; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE bit_measurement FROM PUBLIC;
REVOKE ALL ON TABLE bit_measurement FROM postgres;
GRANT ALL ON TABLE bit_measurement TO postgres;
GRANT ALL ON TABLE bit_measurement TO ccdbd_dev;


--
-- TOC entry 4972 (class 0 OID 0)
-- Dependencies: 3424
-- Name: ccdb_data_mapping; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_data_mapping FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_data_mapping FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_data_mapping TO ccdbd_dev;


--
-- TOC entry 4973 (class 0 OID 0)
-- Dependencies: 3425
-- Name: ccdb_data_permission; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_data_permission FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_data_permission FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_data_permission TO ccdbd_dev;


--
-- TOC entry 4974 (class 0 OID 0)
-- Dependencies: 3426
-- Name: ccdb_data_purpose; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_data_purpose FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_data_purpose FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_data_purpose TO ccdbd_dev;


--
-- TOC entry 4975 (class 0 OID 0)
-- Dependencies: 3427
-- Name: ccdb_data_section; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_data_section FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_data_section FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_data_section TO ccdbd_dev;


--
-- TOC entry 4976 (class 0 OID 0)
-- Dependencies: 3428
-- Name: image_sets; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE image_sets FROM PUBLIC;
REVOKE ALL ON TABLE image_sets FROM postgres;
GRANT ALL ON TABLE image_sets TO postgres;
GRANT ALL ON TABLE image_sets TO ccdbd_dev;


--
-- TOC entry 4977 (class 0 OID 0)
-- Dependencies: 3429
-- Name: image_sets_used; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE image_sets_used FROM PUBLIC;
REVOKE ALL ON TABLE image_sets_used FROM postgres;
GRANT ALL ON TABLE image_sets_used TO postgres;
GRANT ALL ON TABLE image_sets_used TO ccdbd_dev;


--
-- TOC entry 4978 (class 0 OID 0)
-- Dependencies: 3430
-- Name: reconstructions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE reconstructions FROM PUBLIC;
REVOKE ALL ON TABLE reconstructions FROM postgres;
GRANT ALL ON TABLE reconstructions TO postgres;
GRANT ALL ON TABLE reconstructions TO ccdbd_dev;


--
-- TOC entry 4979 (class 0 OID 0)
-- Dependencies: 3431
-- Name: segmentation; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE segmentation FROM PUBLIC;
REVOKE ALL ON TABLE segmentation FROM postgres;
GRANT ALL ON TABLE segmentation TO postgres;
GRANT ALL ON TABLE segmentation TO ccdbd_dev;


--
-- TOC entry 4980 (class 0 OID 0)
-- Dependencies: 3432
-- Name: segmentation_sets; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE segmentation_sets FROM PUBLIC;
REVOKE ALL ON TABLE segmentation_sets FROM postgres;
GRANT ALL ON TABLE segmentation_sets TO postgres;
GRANT ALL ON TABLE segmentation_sets TO ccdbd_dev;


--
-- TOC entry 4981 (class 0 OID 0)
-- Dependencies: 3435
-- Name: ccdb_data_section_description_view; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_data_section_description_view FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_data_section_description_view FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_data_section_description_view TO ccdbd_dev;


--
-- TOC entry 4982 (class 0 OID 0)
-- Dependencies: 3476
-- Name: cell_instances; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE cell_instances FROM PUBLIC;
REVOKE ALL ON TABLE cell_instances FROM postgres;
GRANT ALL ON TABLE cell_instances TO postgres;
GRANT ALL ON TABLE cell_instances TO ccdbd_dev;


--
-- TOC entry 4983 (class 0 OID 0)
-- Dependencies: 3440
-- Name: cell_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE cell_types FROM PUBLIC;
REVOKE ALL ON TABLE cell_types FROM postgres;
GRANT ALL ON TABLE cell_types TO postgres;
GRANT ALL ON TABLE cell_types TO ccdbd_dev;


--
-- TOC entry 4984 (class 0 OID 0)
-- Dependencies: 3463
-- Name: cellular_fraction; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE cellular_fraction FROM PUBLIC;
REVOKE ALL ON TABLE cellular_fraction FROM postgres;
GRANT ALL ON TABLE cellular_fraction TO postgres;
GRANT ALL ON TABLE cellular_fraction TO ccdbd_dev;


--
-- TOC entry 4985 (class 0 OID 0)
-- Dependencies: 3466
-- Name: cultured_cell; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE cultured_cell FROM PUBLIC;
REVOKE ALL ON TABLE cultured_cell FROM ccdbd_dev;
GRANT ALL ON TABLE cultured_cell TO ccdbd_dev;


--
-- TOC entry 4986 (class 0 OID 0)
-- Dependencies: 3459
-- Name: species; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE species FROM PUBLIC;
REVOKE ALL ON TABLE species FROM postgres;
GRANT ALL ON TABLE species TO postgres;
GRANT ALL ON TABLE species TO ccdbd_dev;


--
-- TOC entry 4987 (class 0 OID 0)
-- Dependencies: 3442
-- Name: strain; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE strain FROM PUBLIC;
REVOKE ALL ON TABLE strain FROM ccdbd_dev;
GRANT ALL ON TABLE strain TO ccdbd_dev;


--
-- TOC entry 4988 (class 0 OID 0)
-- Dependencies: 3444
-- Name: subcellular_comp_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE subcellular_comp_types FROM PUBLIC;
REVOKE ALL ON TABLE subcellular_comp_types FROM postgres;
GRANT ALL ON TABLE subcellular_comp_types TO postgres;
GRANT ALL ON TABLE subcellular_comp_types TO ccdbd_dev;


--
-- TOC entry 4989 (class 0 OID 0)
-- Dependencies: 3585
-- Name: subcellular_instances; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE subcellular_instances FROM PUBLIC;
REVOKE ALL ON TABLE subcellular_instances FROM postgres;
GRANT ALL ON TABLE subcellular_instances TO postgres;
GRANT ALL ON TABLE subcellular_instances TO ccdbd_dev;


--
-- TOC entry 4990 (class 0 OID 0)
-- Dependencies: 3460
-- Name: subject; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE subject FROM PUBLIC;
REVOKE ALL ON TABLE subject FROM postgres;
GRANT ALL ON TABLE subject TO postgres;
GRANT ALL ON TABLE subject TO ccdbd_dev;


--
-- TOC entry 4991 (class 0 OID 0)
-- Dependencies: 3601
-- Name: tissue_slice; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE tissue_slice FROM PUBLIC;
REVOKE ALL ON TABLE tissue_slice FROM postgres;
GRANT ALL ON TABLE tissue_slice TO postgres;
GRANT ALL ON TABLE tissue_slice TO ccdbd_dev;


--
-- TOC entry 4992 (class 0 OID 0)
-- Dependencies: 3436
-- Name: raw_images; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE raw_images FROM PUBLIC;
REVOKE ALL ON TABLE raw_images FROM postgres;
GRANT ALL ON TABLE raw_images TO postgres;
GRANT ALL ON TABLE raw_images TO ccdbd_dev;


--
-- TOC entry 4993 (class 0 OID 0)
-- Dependencies: 3438
-- Name: ccdb_file; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_file FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_file FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_file TO ccdbd_dev;
GRANT ALL ON TABLE ccdb_file TO PUBLIC;


--
-- TOC entry 4994 (class 0 OID 0)
-- Dependencies: 3447
-- Name: experiment; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE experiment FROM PUBLIC;
REVOKE ALL ON TABLE experiment FROM postgres;
GRANT ALL ON TABLE experiment TO postgres;
GRANT ALL ON TABLE experiment TO ccdbd_dev;


--
-- TOC entry 4995 (class 0 OID 0)
-- Dependencies: 3449
-- Name: project; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE project FROM PUBLIC;
REVOKE ALL ON TABLE project FROM postgres;
GRANT ALL ON TABLE project TO postgres;
GRANT ALL ON TABLE project TO ccdbd_dev;


--
-- TOC entry 4996 (class 0 OID 0)
-- Dependencies: 3521
-- Name: instrument; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE instrument FROM PUBLIC;
REVOKE ALL ON TABLE instrument FROM postgres;
GRANT ALL ON TABLE instrument TO postgres;
GRANT ALL ON TABLE instrument TO ccdbd_dev;


--
-- TOC entry 4997 (class 0 OID 0)
-- Dependencies: 3539
-- Name: organ_instances; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE organ_instances FROM PUBLIC;
REVOKE ALL ON TABLE organ_instances FROM postgres;
GRANT ALL ON TABLE organ_instances TO postgres;
GRANT ALL ON TABLE organ_instances TO ccdbd_dev;


--
-- TOC entry 4998 (class 0 OID 0)
-- Dependencies: 3441
-- Name: organ_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE organ_types FROM PUBLIC;
REVOKE ALL ON TABLE organ_types FROM postgres;
GRANT ALL ON TABLE organ_types TO postgres;
GRANT ALL ON TABLE organ_types TO ccdbd_dev;


--
-- TOC entry 4999 (class 0 OID 0)
-- Dependencies: 3584
-- Name: structure_instances; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE structure_instances FROM PUBLIC;
REVOKE ALL ON TABLE structure_instances FROM postgres;
GRANT ALL ON TABLE structure_instances TO postgres;
GRANT ALL ON TABLE structure_instances TO ccdbd_dev;


--
-- TOC entry 5000 (class 0 OID 0)
-- Dependencies: 3443
-- Name: structure_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE structure_types FROM PUBLIC;
REVOKE ALL ON TABLE structure_types FROM postgres;
GRANT ALL ON TABLE structure_types TO postgres;
GRANT ALL ON TABLE structure_types TO ccdbd_dev;


--
-- TOC entry 5001 (class 0 OID 0)
-- Dependencies: 3586
-- Name: system_instances; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE system_instances FROM PUBLIC;
REVOKE ALL ON TABLE system_instances FROM postgres;
GRANT ALL ON TABLE system_instances TO postgres;
GRANT ALL ON TABLE system_instances TO ccdbd_dev;


--
-- TOC entry 5002 (class 0 OID 0)
-- Dependencies: 3445
-- Name: system_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE system_types FROM PUBLIC;
REVOKE ALL ON TABLE system_types FROM postgres;
GRANT ALL ON TABLE system_types TO postgres;
GRANT ALL ON TABLE system_types TO ccdbd_dev;


--
-- TOC entry 5003 (class 0 OID 0)
-- Dependencies: 3448
-- Name: persons_2; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE persons_2 FROM PUBLIC;
REVOKE ALL ON TABLE persons_2 FROM postgres;
GRANT ALL ON TABLE persons_2 TO postgres;
GRANT ALL ON TABLE persons_2 TO ccdbd_dev;


--
-- TOC entry 5004 (class 0 OID 0)
-- Dependencies: 3450
-- Name: ccdb_permission_view; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_permission_view FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_permission_view FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_permission_view TO ccdbd_dev;


--
-- TOC entry 5005 (class 0 OID 0)
-- Dependencies: 3451
-- Name: ccdb_project_permission_view; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_project_permission_view FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_project_permission_view FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_project_permission_view TO ccdbd_dev;


--
-- TOC entry 5006 (class 0 OID 0)
-- Dependencies: 3452
-- Name: group_of_people; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE group_of_people FROM PUBLIC;
REVOKE ALL ON TABLE group_of_people FROM postgres;
GRANT ALL ON TABLE group_of_people TO postgres;
GRANT ALL ON TABLE group_of_people TO ccdbd_dev;


--
-- TOC entry 5007 (class 0 OID 0)
-- Dependencies: 3453
-- Name: groups; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE groups FROM PUBLIC;
REVOKE ALL ON TABLE groups FROM postgres;
GRANT ALL ON TABLE groups TO postgres;
GRANT ALL ON TABLE groups TO ccdbd_dev;


--
-- TOC entry 5008 (class 0 OID 0)
-- Dependencies: 3454
-- Name: publication_junction; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE publication_junction FROM PUBLIC;
REVOKE ALL ON TABLE publication_junction FROM ccdbd_dev;
GRANT ALL ON TABLE publication_junction TO ccdbd_dev;


--
-- TOC entry 5009 (class 0 OID 0)
-- Dependencies: 3455
-- Name: publication_set; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE publication_set FROM PUBLIC;
REVOKE ALL ON TABLE publication_set FROM postgres;
GRANT ALL ON TABLE publication_set TO postgres;
GRANT ALL ON TABLE publication_set TO ccdbd_dev;


--
-- TOC entry 5010 (class 0 OID 0)
-- Dependencies: 3456
-- Name: publications; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE publications FROM PUBLIC;
REVOKE ALL ON TABLE publications FROM postgres;
GRANT ALL ON TABLE publications TO postgres;
GRANT ALL ON TABLE publications TO ccdbd_dev;


--
-- TOC entry 5011 (class 0 OID 0)
-- Dependencies: 3629
-- Name: ccdb_project_view; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE ccdb_project_view FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_project_view FROM postgres;
GRANT ALL ON TABLE ccdb_project_view TO postgres;


--
-- TOC entry 5012 (class 0 OID 0)
-- Dependencies: 3469
-- Name: member_reconstructions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE member_reconstructions FROM PUBLIC;
REVOKE ALL ON TABLE member_reconstructions FROM postgres;
GRANT ALL ON TABLE member_reconstructions TO postgres;
GRANT ALL ON TABLE member_reconstructions TO ccdbd_dev;


--
-- TOC entry 5013 (class 0 OID 0)
-- Dependencies: 3470
-- Name: super_reconstructions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE super_reconstructions FROM PUBLIC;
REVOKE ALL ON TABLE super_reconstructions FROM postgres;
GRANT ALL ON TABLE super_reconstructions TO postgres;
GRANT ALL ON TABLE super_reconstructions TO ccdbd_dev;


--
-- TOC entry 5014 (class 0 OID 0)
-- Dependencies: 3471
-- Name: ccdb_resource_lookup_view; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE ccdb_resource_lookup_view FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_resource_lookup_view FROM postgres;
GRANT ALL ON TABLE ccdb_resource_lookup_view TO postgres;


--
-- TOC entry 5015 (class 0 OID 0)
-- Dependencies: 3631
-- Name: ccdb_summary_result_view; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_summary_result_view FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_summary_result_view FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_summary_result_view TO ccdbd_dev;


--
-- TOC entry 5016 (class 0 OID 0)
-- Dependencies: 3475
-- Name: ccdb_upload_session; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE ccdb_upload_session FROM PUBLIC;
REVOKE ALL ON TABLE ccdb_upload_session FROM ccdbd_dev;
GRANT ALL ON TABLE ccdb_upload_session TO ccdbd_dev;


--
-- TOC entry 5017 (class 0 OID 0)
-- Dependencies: 3478
-- Name: channel_protocol_step_association; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE channel_protocol_step_association FROM PUBLIC;
REVOKE ALL ON TABLE channel_protocol_step_association FROM postgres;
GRANT ALL ON TABLE channel_protocol_step_association TO postgres;
GRANT ALL ON TABLE channel_protocol_step_association TO ccdbd_dev;


--
-- TOC entry 5019 (class 0 OID 0)
-- Dependencies: 3479
-- Name: confocal_images_done; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE confocal_images_done FROM PUBLIC;
REVOKE ALL ON TABLE confocal_images_done FROM postgres;
GRANT ALL ON TABLE confocal_images_done TO postgres;
GRANT ALL ON TABLE confocal_images_done TO ccdbd_dev;


--
-- TOC entry 5020 (class 0 OID 0)
-- Dependencies: 3480
-- Name: contextual_help_links; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE contextual_help_links FROM PUBLIC;
REVOKE ALL ON TABLE contextual_help_links FROM postgres;
GRANT ALL ON TABLE contextual_help_links TO postgres;


--
-- TOC entry 5021 (class 0 OID 0)
-- Dependencies: 3481
-- Name: contour_components; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE contour_components FROM PUBLIC;
REVOKE ALL ON TABLE contour_components FROM postgres;
GRANT ALL ON TABLE contour_components TO postgres;
GRANT ALL ON TABLE contour_components TO ccdbd_dev;


--
-- TOC entry 5022 (class 0 OID 0)
-- Dependencies: 3482
-- Name: coverslips; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE coverslips FROM PUBLIC;
REVOKE ALL ON TABLE coverslips FROM postgres;
GRANT ALL ON TABLE coverslips TO postgres;
GRANT ALL ON TABLE coverslips TO ccdbd_dev;


--
-- TOC entry 5023 (class 0 OID 0)
-- Dependencies: 3483
-- Name: cropped_reconstructions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE cropped_reconstructions FROM PUBLIC;
REVOKE ALL ON TABLE cropped_reconstructions FROM postgres;
GRANT ALL ON TABLE cropped_reconstructions TO postgres;
GRANT ALL ON TABLE cropped_reconstructions TO ccdbd_dev;


--
-- TOC entry 5025 (class 0 OID 0)
-- Dependencies: 3485
-- Name: current_density; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE current_density FROM PUBLIC;
REVOKE ALL ON TABLE current_density FROM postgres;
GRANT ALL ON TABLE current_density TO postgres;
GRANT ALL ON TABLE current_density TO ccdbd_dev;


--
-- TOC entry 5026 (class 0 OID 0)
-- Dependencies: 3486
-- Name: data_input_statuses; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE data_input_statuses FROM PUBLIC;
REVOKE ALL ON TABLE data_input_statuses FROM ccdbd_dev;
GRANT ALL ON TABLE data_input_statuses TO ccdbd_dev;


--
-- TOC entry 5027 (class 0 OID 0)
-- Dependencies: 3487
-- Name: dawg_status_type; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE dawg_status_type FROM PUBLIC;
REVOKE ALL ON TABLE dawg_status_type FROM ccdbd_dev;
GRANT ALL ON TABLE dawg_status_type TO ccdbd_dev;


--
-- TOC entry 5028 (class 0 OID 0)
-- Dependencies: 3488
-- Name: dawg_view; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE dawg_view FROM PUBLIC;
REVOKE ALL ON TABLE dawg_view FROM ccdbd_dev;
GRANT ALL ON TABLE dawg_view TO ccdbd_dev;


--
-- TOC entry 5029 (class 0 OID 0)
-- Dependencies: 3490
-- Name: dehydration_steps; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE dehydration_steps FROM PUBLIC;
REVOKE ALL ON TABLE dehydration_steps FROM postgres;
GRANT ALL ON TABLE dehydration_steps TO postgres;
GRANT ALL ON TABLE dehydration_steps TO ccdbd_dev;


--
-- TOC entry 5030 (class 0 OID 0)
-- Dependencies: 3491
-- Name: detectors; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE detectors FROM PUBLIC;
REVOKE ALL ON TABLE detectors FROM postgres;
GRANT ALL ON TABLE detectors TO postgres;


--
-- TOC entry 5031 (class 0 OID 0)
-- Dependencies: 3492
-- Name: devices; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE devices FROM PUBLIC;
REVOKE ALL ON TABLE devices FROM postgres;
GRANT ALL ON TABLE devices TO postgres;
GRANT ALL ON TABLE devices TO ccdbd_dev;


--
-- TOC entry 5032 (class 0 OID 0)
-- Dependencies: 3493
-- Name: dichroics; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE dichroics FROM PUBLIC;
REVOKE ALL ON TABLE dichroics FROM postgres;
GRANT ALL ON TABLE dichroics TO postgres;


--
-- TOC entry 5033 (class 0 OID 0)
-- Dependencies: 3494
-- Name: dif_log_product_access; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE dif_log_product_access FROM PUBLIC;
REVOKE ALL ON TABLE dif_log_product_access FROM ccdbd_dev;
GRANT ALL ON TABLE dif_log_product_access TO ccdbd_dev;


--
-- TOC entry 5034 (class 0 OID 0)
-- Dependencies: 3495
-- Name: processed_image_sets; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE processed_image_sets FROM PUBLIC;
REVOKE ALL ON TABLE processed_image_sets FROM postgres;
GRANT ALL ON TABLE processed_image_sets TO postgres;
GRANT ALL ON TABLE processed_image_sets TO ccdbd_dev;


--
-- TOC entry 5035 (class 0 OID 0)
-- Dependencies: 3497
-- Name: product_status; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE product_status FROM PUBLIC;
REVOKE ALL ON TABLE product_status FROM ccdbd_dev;
GRANT ALL ON TABLE product_status TO ccdbd_dev;


--
-- TOC entry 5036 (class 0 OID 0)
-- Dependencies: 3501
-- Name: down_sampled_reconstructions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE down_sampled_reconstructions FROM PUBLIC;
REVOKE ALL ON TABLE down_sampled_reconstructions FROM postgres;
GRANT ALL ON TABLE down_sampled_reconstructions TO postgres;
GRANT ALL ON TABLE down_sampled_reconstructions TO ccdbd_dev;


--
-- TOC entry 5038 (class 0 OID 0)
-- Dependencies: 3502
-- Name: embedding_medium; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE embedding_medium FROM PUBLIC;
REVOKE ALL ON TABLE embedding_medium FROM postgres;
GRANT ALL ON TABLE embedding_medium TO postgres;
GRANT ALL ON TABLE embedding_medium TO ccdbd_dev;


--
-- TOC entry 5039 (class 0 OID 0)
-- Dependencies: 3503
-- Name: embedding_steps; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE embedding_steps FROM PUBLIC;
REVOKE ALL ON TABLE embedding_steps FROM postgres;
GRANT ALL ON TABLE embedding_steps TO postgres;
GRANT ALL ON TABLE embedding_steps TO ccdbd_dev;


--
-- TOC entry 5040 (class 0 OID 0)
-- Dependencies: 3504
-- Name: emission_filters; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE emission_filters FROM PUBLIC;
REVOKE ALL ON TABLE emission_filters FROM postgres;
GRANT ALL ON TABLE emission_filters TO postgres;


--
-- TOC entry 5041 (class 0 OID 0)
-- Dependencies: 3505
-- Name: emproduct; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE emproduct FROM PUBLIC;
REVOKE ALL ON TABLE emproduct FROM postgres;
GRANT ALL ON TABLE emproduct TO postgres;
GRANT ALL ON TABLE emproduct TO ccdbd_dev;


--
-- TOC entry 5042 (class 0 OID 0)
-- Dependencies: 3506
-- Name: epifluorescent_images_done; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE epifluorescent_images_done FROM PUBLIC;
REVOKE ALL ON TABLE epifluorescent_images_done FROM postgres;
GRANT ALL ON TABLE epifluorescent_images_done TO postgres;
GRANT ALL ON TABLE epifluorescent_images_done TO ccdbd_dev;


--
-- TOC entry 5043 (class 0 OID 0)
-- Dependencies: 3507
-- Name: excitation_filters; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE excitation_filters FROM PUBLIC;
REVOKE ALL ON TABLE excitation_filters FROM postgres;
GRANT ALL ON TABLE excitation_filters TO postgres;


--
-- TOC entry 5044 (class 0 OID 0)
-- Dependencies: 3508
-- Name: file_formats; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE file_formats FROM PUBLIC;
REVOKE ALL ON TABLE file_formats FROM postgres;
GRANT ALL ON TABLE file_formats TO postgres;
GRANT ALL ON TABLE file_formats TO ccdbd_dev;


--
-- TOC entry 5045 (class 0 OID 0)
-- Dependencies: 3509
-- Name: filters; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE filters FROM PUBLIC;
REVOKE ALL ON TABLE filters FROM postgres;
GRANT ALL ON TABLE filters TO postgres;


--
-- TOC entry 5046 (class 0 OID 0)
-- Dependencies: 3510
-- Name: fluorescent_images; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE fluorescent_images FROM PUBLIC;
REVOKE ALL ON TABLE fluorescent_images FROM postgres;
GRANT ALL ON TABLE fluorescent_images TO postgres;
GRANT ALL ON TABLE fluorescent_images TO ccdbd_dev;


--
-- TOC entry 5047 (class 0 OID 0)
-- Dependencies: 3634
-- Name: fluors; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE fluors FROM PUBLIC;
REVOKE ALL ON TABLE fluors FROM postgres;
GRANT ALL ON TABLE fluors TO postgres;
GRANT ALL ON TABLE fluors TO ccdbd_dev;


--
-- TOC entry 5048 (class 0 OID 0)
-- Dependencies: 3512
-- Name: geometry_columns; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE geometry_columns FROM PUBLIC;
REVOKE ALL ON TABLE geometry_columns FROM postgres;
GRANT ALL ON TABLE geometry_columns TO postgres;
GRANT ALL ON TABLE geometry_columns TO ccdbd_dev;


--
-- TOC entry 5049 (class 0 OID 0)
-- Dependencies: 3513
-- Name: google_authentication; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE google_authentication FROM PUBLIC;
REVOKE ALL ON TABLE google_authentication FROM postgres;
GRANT ALL ON TABLE google_authentication TO postgres;
GRANT ALL ON TABLE google_authentication TO ccdbd_dev;


--
-- TOC entry 5050 (class 0 OID 0)
-- Dependencies: 3514
-- Name: google_users; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE google_users FROM PUBLIC;
REVOKE ALL ON TABLE google_users FROM postgres;
GRANT ALL ON TABLE google_users TO postgres;
GRANT ALL ON TABLE google_users TO ccdbd_dev;


--
-- TOC entry 5051 (class 0 OID 0)
-- Dependencies: 3516
-- Name: image_info_copy; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE image_info_copy FROM PUBLIC;
REVOKE ALL ON TABLE image_info_copy FROM postgres;
GRANT ALL ON TABLE image_info_copy TO postgres;
GRANT ALL ON TABLE image_info_copy TO ccdbd_dev;


--
-- TOC entry 5052 (class 0 OID 0)
-- Dependencies: 3517
-- Name: image_types; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE image_types FROM PUBLIC;
REVOKE ALL ON TABLE image_types FROM ccdbd_dev;
GRANT ALL ON TABLE image_types TO ccdbd_dev;


--
-- TOC entry 5053 (class 0 OID 0)
-- Dependencies: 3518
-- Name: image_workflow_tester; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE image_workflow_tester FROM PUBLIC;
REVOKE ALL ON TABLE image_workflow_tester FROM postgres;
GRANT ALL ON TABLE image_workflow_tester TO postgres;


--
-- TOC entry 5054 (class 0 OID 0)
-- Dependencies: 3519
-- Name: imaging_product_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE imaging_product_types FROM PUBLIC;
REVOKE ALL ON TABLE imaging_product_types FROM postgres;
GRANT ALL ON TABLE imaging_product_types TO postgres;
GRANT ALL ON TABLE imaging_product_types TO ccdbd_dev;


--
-- TOC entry 5055 (class 0 OID 0)
-- Dependencies: 3520
-- Name: immersion_medium; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE immersion_medium FROM PUBLIC;
REVOKE ALL ON TABLE immersion_medium FROM postgres;
GRANT ALL ON TABLE immersion_medium TO postgres;
GRANT ALL ON TABLE immersion_medium TO ccdbd_dev;


--
-- TOC entry 5056 (class 0 OID 0)
-- Dependencies: 3522
-- Name: instrument_type; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE instrument_type FROM PUBLIC;
REVOKE ALL ON TABLE instrument_type FROM ccdbd_dev;
GRANT ALL ON TABLE instrument_type TO ccdbd_dev;


--
-- TOC entry 5063 (class 0 OID 0)
-- Dependencies: 3523
-- Name: lasers; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE lasers FROM PUBLIC;
REVOKE ALL ON TABLE lasers FROM postgres;
GRANT ALL ON TABLE lasers TO postgres;


--
-- TOC entry 5064 (class 0 OID 0)
-- Dependencies: 3524
-- Name: length_measurement; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE length_measurement FROM PUBLIC;
REVOKE ALL ON TABLE length_measurement FROM postgres;
GRANT ALL ON TABLE length_measurement TO postgres;
GRANT ALL ON TABLE length_measurement TO ccdbd_dev;


--
-- TOC entry 5065 (class 0 OID 0)
-- Dependencies: 3525
-- Name: lenses; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE lenses FROM PUBLIC;
REVOKE ALL ON TABLE lenses FROM postgres;
GRANT ALL ON TABLE lenses TO postgres;
GRANT ALL ON TABLE lenses TO ccdbd_dev;


--
-- TOC entry 5066 (class 0 OID 0)
-- Dependencies: 3526
-- Name: light_sources; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE light_sources FROM PUBLIC;
REVOKE ALL ON TABLE light_sources FROM postgres;
GRANT ALL ON TABLE light_sources TO postgres;


--
-- TOC entry 5067 (class 0 OID 0)
-- Dependencies: 3635
-- Name: lm_channels; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE lm_channels FROM PUBLIC;
REVOKE ALL ON TABLE lm_channels FROM postgres;
GRANT ALL ON TABLE lm_channels TO postgres;
GRANT ALL ON TABLE lm_channels TO ccdbd_dev;


--
-- TOC entry 5068 (class 0 OID 0)
-- Dependencies: 3528
-- Name: lm_product; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE lm_product FROM PUBLIC;
REVOKE ALL ON TABLE lm_product FROM postgres;
GRANT ALL ON TABLE lm_product TO postgres;
GRANT ALL ON TABLE lm_product TO ccdbd_dev;


--
-- TOC entry 5069 (class 0 OID 0)
-- Dependencies: 3529
-- Name: lmproduct_channels; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE lmproduct_channels FROM PUBLIC;
REVOKE ALL ON TABLE lmproduct_channels FROM postgres;
GRANT ALL ON TABLE lmproduct_channels TO postgres;
GRANT ALL ON TABLE lmproduct_channels TO ccdbd_dev;


--
-- TOC entry 5070 (class 0 OID 0)
-- Dependencies: 3530
-- Name: manufacturers; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE manufacturers FROM PUBLIC;
REVOKE ALL ON TABLE manufacturers FROM ccdbd_dev;
GRANT ALL ON TABLE manufacturers TO ccdbd_dev;


--
-- TOC entry 5071 (class 0 OID 0)
-- Dependencies: 3531
-- Name: map_file_junctions; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE map_file_junctions FROM PUBLIC;
REVOKE ALL ON TABLE map_file_junctions FROM postgres;
GRANT ALL ON TABLE map_file_junctions TO postgres;
GRANT ALL ON TABLE map_file_junctions TO ccdbd_dev;


--
-- TOC entry 5072 (class 0 OID 0)
-- Dependencies: 3532
-- Name: map_files; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE map_files FROM PUBLIC;
REVOKE ALL ON TABLE map_files FROM postgres;
GRANT ALL ON TABLE map_files TO postgres;
GRANT ALL ON TABLE map_files TO ccdbd_dev;


--
-- TOC entry 5073 (class 0 OID 0)
-- Dependencies: 3534
-- Name: mounting_medium; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE mounting_medium FROM PUBLIC;
REVOKE ALL ON TABLE mounting_medium FROM postgres;
GRANT ALL ON TABLE mounting_medium TO postgres;
GRANT ALL ON TABLE mounting_medium TO ccdbd_dev;


--
-- TOC entry 5074 (class 0 OID 0)
-- Dependencies: 3535
-- Name: multiphoton_images; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE multiphoton_images FROM PUBLIC;
REVOKE ALL ON TABLE multiphoton_images FROM postgres;
GRANT ALL ON TABLE multiphoton_images TO postgres;
GRANT ALL ON TABLE multiphoton_images TO ccdbd_dev;


--
-- TOC entry 5075 (class 0 OID 0)
-- Dependencies: 3536
-- Name: my_favorites; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE my_favorites FROM PUBLIC;
REVOKE ALL ON TABLE my_favorites FROM ccdbd_dev;
GRANT ALL ON TABLE my_favorites TO ccdbd_dev;


--
-- TOC entry 5076 (class 0 OID 0)
-- Dependencies: 3538
-- Name: nucleic_acid; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE nucleic_acid FROM PUBLIC;
REVOKE ALL ON TABLE nucleic_acid FROM postgres;
GRANT ALL ON TABLE nucleic_acid TO postgres;
GRANT ALL ON TABLE nucleic_acid TO ccdbd_dev;


--
-- TOC entry 5077 (class 0 OID 0)
-- Dependencies: 3540
-- Name: organism; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE organism FROM PUBLIC;
REVOKE ALL ON TABLE organism FROM postgres;
GRANT ALL ON TABLE organism TO postgres;
GRANT ALL ON TABLE organism TO ccdbd_dev;


--
-- TOC entry 5078 (class 0 OID 0)
-- Dependencies: 3541
-- Name: param_file_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE param_file_types FROM PUBLIC;
REVOKE ALL ON TABLE param_file_types FROM postgres;
GRANT ALL ON TABLE param_file_types TO postgres;
GRANT ALL ON TABLE param_file_types TO ccdbd_dev;


--
-- TOC entry 5079 (class 0 OID 0)
-- Dependencies: 3542
-- Name: param_files; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE param_files FROM PUBLIC;
REVOKE ALL ON TABLE param_files FROM postgres;
GRANT ALL ON TABLE param_files TO postgres;
GRANT ALL ON TABLE param_files TO ccdbd_dev;


--
-- TOC entry 5080 (class 0 OID 0)
-- Dependencies: 3543
-- Name: person_and_roles; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE person_and_roles FROM PUBLIC;
REVOKE ALL ON TABLE person_and_roles FROM postgres;
GRANT ALL ON TABLE person_and_roles TO postgres;
GRANT ALL ON TABLE person_and_roles TO ccdbd_dev;


--
-- TOC entry 5081 (class 0 OID 0)
-- Dependencies: 781
-- Name: pg_buffercache_pages(); Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM postgres;
GRANT ALL ON FUNCTION pg_buffercache_pages() TO postgres;


--
-- TOC entry 5082 (class 0 OID 0)
-- Dependencies: 3544
-- Name: pg_buffercache; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE pg_buffercache FROM PUBLIC;
REVOKE ALL ON TABLE pg_buffercache FROM postgres;
GRANT ALL ON TABLE pg_buffercache TO postgres;


--
-- TOC entry 5083 (class 0 OID 0)
-- Dependencies: 64
-- Name: pg_freespacemap_pages(); Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON FUNCTION pg_freespacemap_pages() FROM PUBLIC;
REVOKE ALL ON FUNCTION pg_freespacemap_pages() FROM postgres;
GRANT ALL ON FUNCTION pg_freespacemap_pages() TO postgres;


--
-- TOC entry 5084 (class 0 OID 0)
-- Dependencies: 3545
-- Name: pg_freespacemap_pages; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE pg_freespacemap_pages FROM PUBLIC;
REVOKE ALL ON TABLE pg_freespacemap_pages FROM postgres;
GRANT ALL ON TABLE pg_freespacemap_pages TO postgres;


--
-- TOC entry 5085 (class 0 OID 0)
-- Dependencies: 65
-- Name: pg_freespacemap_relations(); Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON FUNCTION pg_freespacemap_relations() FROM PUBLIC;
REVOKE ALL ON FUNCTION pg_freespacemap_relations() FROM postgres;
GRANT ALL ON FUNCTION pg_freespacemap_relations() TO postgres;


--
-- TOC entry 5086 (class 0 OID 0)
-- Dependencies: 3546
-- Name: pg_freespacemap_relations; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE pg_freespacemap_relations FROM PUBLIC;
REVOKE ALL ON TABLE pg_freespacemap_relations FROM postgres;
GRANT ALL ON TABLE pg_freespacemap_relations TO postgres;


--
-- TOC entry 5087 (class 0 OID 0)
-- Dependencies: 3547
-- Name: plate_density_unit; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE plate_density_unit FROM PUBLIC;
REVOKE ALL ON TABLE plate_density_unit FROM ccdbd_dev;
GRANT ALL ON TABLE plate_density_unit TO ccdbd_dev;


--
-- TOC entry 5088 (class 0 OID 0)
-- Dependencies: 3637
-- Name: protein_instances; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE protein_instances FROM PUBLIC;
REVOKE ALL ON TABLE protein_instances FROM postgres;
GRANT ALL ON TABLE protein_instances TO postgres;
GRANT ALL ON TABLE protein_instances TO ccdbd_dev;


--
-- TOC entry 5089 (class 0 OID 0)
-- Dependencies: 3636
-- Name: protein_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE protein_types FROM PUBLIC;
REVOKE ALL ON TABLE protein_types FROM postgres;
GRANT ALL ON TABLE protein_types TO postgres;
GRANT ALL ON TABLE protein_types TO ccdbd_dev;


--
-- TOC entry 5090 (class 0 OID 0)
-- Dependencies: 3550
-- Name: raw_image_set_params; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE raw_image_set_params FROM PUBLIC;
REVOKE ALL ON TABLE raw_image_set_params FROM postgres;
GRANT ALL ON TABLE raw_image_set_params TO postgres;
GRANT ALL ON TABLE raw_image_set_params TO ccdbd_dev;


--
-- TOC entry 5091 (class 0 OID 0)
-- Dependencies: 3551
-- Name: reagent_component_stock; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE reagent_component_stock FROM PUBLIC;
REVOKE ALL ON TABLE reagent_component_stock FROM postgres;
GRANT ALL ON TABLE reagent_component_stock TO postgres;
GRANT ALL ON TABLE reagent_component_stock TO ccdbd_dev;


--
-- TOC entry 5092 (class 0 OID 0)
-- Dependencies: 3552
-- Name: reagent_components; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE reagent_components FROM PUBLIC;
REVOKE ALL ON TABLE reagent_components FROM postgres;
GRANT ALL ON TABLE reagent_components TO postgres;
GRANT ALL ON TABLE reagent_components TO ccdbd_dev;


--
-- TOC entry 5093 (class 0 OID 0)
-- Dependencies: 3553
-- Name: reagents; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE reagents FROM PUBLIC;
REVOKE ALL ON TABLE reagents FROM postgres;
GRANT ALL ON TABLE reagents TO postgres;
GRANT ALL ON TABLE reagents TO ccdbd_dev;


--
-- TOC entry 5094 (class 0 OID 0)
-- Dependencies: 3554
-- Name: resolution; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE resolution FROM PUBLIC;
REVOKE ALL ON TABLE resolution FROM postgres;
GRANT ALL ON TABLE resolution TO postgres;
GRANT ALL ON TABLE resolution TO ccdbd_dev;


--
-- TOC entry 5095 (class 0 OID 0)
-- Dependencies: 3555
-- Name: roi; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE roi FROM PUBLIC;
REVOKE ALL ON TABLE roi FROM postgres;
GRANT ALL ON TABLE roi TO postgres;
GRANT ALL ON TABLE roi TO ccdbd_dev;


--
-- TOC entry 5096 (class 0 OID 0)
-- Dependencies: 3556
-- Name: roles; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE roles FROM PUBLIC;
REVOKE ALL ON TABLE roles FROM postgres;
GRANT ALL ON TABLE roles TO postgres;
GRANT ALL ON TABLE roles TO ccdbd_dev;


--
-- TOC entry 5097 (class 0 OID 0)
-- Dependencies: 3648
-- Name: sand_data_downloaders; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sand_data_downloaders FROM PUBLIC;
REVOKE ALL ON TABLE sand_data_downloaders FROM postgres;
GRANT ALL ON TABLE sand_data_downloaders TO postgres;
GRANT ALL ON TABLE sand_data_downloaders TO ccdbd_dev;


--
-- TOC entry 5098 (class 0 OID 0)
-- Dependencies: 3649
-- Name: sand_downloaded_data_files; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sand_downloaded_data_files FROM PUBLIC;
REVOKE ALL ON TABLE sand_downloaded_data_files FROM postgres;
GRANT ALL ON TABLE sand_downloaded_data_files TO postgres;
GRANT ALL ON TABLE sand_downloaded_data_files TO ccdbd_dev;


--
-- TOC entry 5099 (class 0 OID 0)
-- Dependencies: 3557
-- Name: scan_parameters; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE scan_parameters FROM PUBLIC;
REVOKE ALL ON TABLE scan_parameters FROM postgres;
GRANT ALL ON TABLE scan_parameters TO postgres;
GRANT ALL ON TABLE scan_parameters TO ccdbd_dev;


--
-- TOC entry 5100 (class 0 OID 0)
-- Dependencies: 3558
-- Name: scan_products; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE scan_products FROM PUBLIC;
REVOKE ALL ON TABLE scan_products FROM postgres;
GRANT ALL ON TABLE scan_products TO postgres;
GRANT ALL ON TABLE scan_products TO ccdbd_dev;


--
-- TOC entry 5101 (class 0 OID 0)
-- Dependencies: 3559
-- Name: scan_protocol_type; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE scan_protocol_type FROM PUBLIC;
REVOKE ALL ON TABLE scan_protocol_type FROM postgres;
GRANT ALL ON TABLE scan_protocol_type TO postgres;
GRANT ALL ON TABLE scan_protocol_type TO ccdbd_dev;


--
-- TOC entry 5102 (class 0 OID 0)
-- Dependencies: 3560
-- Name: scan_sequence_type; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE scan_sequence_type FROM PUBLIC;
REVOKE ALL ON TABLE scan_sequence_type FROM postgres;
GRANT ALL ON TABLE scan_sequence_type TO postgres;
GRANT ALL ON TABLE scan_sequence_type TO ccdbd_dev;


--
-- TOC entry 5104 (class 0 OID 0)
-- Dependencies: 3562
-- Name: segmentation_intent; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE segmentation_intent FROM PUBLIC;
REVOKE ALL ON TABLE segmentation_intent FROM postgres;
GRANT ALL ON TABLE segmentation_intent TO postgres;
GRANT ALL ON TABLE segmentation_intent TO ccdbd_dev;


--
-- TOC entry 5105 (class 0 OID 0)
-- Dependencies: 3563
-- Name: segmentation_transformation; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE segmentation_transformation FROM PUBLIC;
REVOKE ALL ON TABLE segmentation_transformation FROM postgres;
GRANT ALL ON TABLE segmentation_transformation TO postgres;
GRANT ALL ON TABLE segmentation_transformation TO ccdbd_dev;


--
-- TOC entry 5106 (class 0 OID 0)
-- Dependencies: 3564
-- Name: segmented_object_types; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE segmented_object_types FROM PUBLIC;
REVOKE ALL ON TABLE segmented_object_types FROM postgres;
GRANT ALL ON TABLE segmented_object_types TO postgres;
GRANT ALL ON TABLE segmented_object_types TO ccdbd_dev;


--
-- TOC entry 5107 (class 0 OID 0)
-- Dependencies: 3565
-- Name: smartatlas_workflow_cache; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE smartatlas_workflow_cache FROM PUBLIC;
REVOKE ALL ON TABLE smartatlas_workflow_cache FROM postgres;
GRANT ALL ON TABLE smartatlas_workflow_cache TO postgres;


--
-- TOC entry 5108 (class 0 OID 0)
-- Dependencies: 3566
-- Name: software; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE software FROM PUBLIC;
REVOKE ALL ON TABLE software FROM postgres;
GRANT ALL ON TABLE software TO postgres;
GRANT ALL ON TABLE software TO ccdbd_dev;


--
-- TOC entry 5109 (class 0 OID 0)
-- Dependencies: 3567
-- Name: sp_chemical_fixation; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_chemical_fixation FROM PUBLIC;
REVOKE ALL ON TABLE sp_chemical_fixation FROM postgres;
GRANT ALL ON TABLE sp_chemical_fixation TO postgres;
GRANT ALL ON TABLE sp_chemical_fixation TO ccdbd_dev;


--
-- TOC entry 5110 (class 0 OID 0)
-- Dependencies: 3568
-- Name: sp_dehydration; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_dehydration FROM PUBLIC;
REVOKE ALL ON TABLE sp_dehydration FROM postgres;
GRANT ALL ON TABLE sp_dehydration TO postgres;
GRANT ALL ON TABLE sp_dehydration TO ccdbd_dev;


--
-- TOC entry 5111 (class 0 OID 0)
-- Dependencies: 3569
-- Name: sp_detection_method; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_detection_method FROM PUBLIC;
REVOKE ALL ON TABLE sp_detection_method FROM postgres;
GRANT ALL ON TABLE sp_detection_method TO postgres;
GRANT ALL ON TABLE sp_detection_method TO ccdbd_dev;


--
-- TOC entry 5112 (class 0 OID 0)
-- Dependencies: 3570
-- Name: sp_embeddings; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_embeddings FROM PUBLIC;
REVOKE ALL ON TABLE sp_embeddings FROM postgres;
GRANT ALL ON TABLE sp_embeddings TO postgres;
GRANT ALL ON TABLE sp_embeddings TO ccdbd_dev;


--
-- TOC entry 5113 (class 0 OID 0)
-- Dependencies: 3571
-- Name: sp_freezing_fixation; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_freezing_fixation FROM PUBLIC;
REVOKE ALL ON TABLE sp_freezing_fixation FROM postgres;
GRANT ALL ON TABLE sp_freezing_fixation TO postgres;
GRANT ALL ON TABLE sp_freezing_fixation TO ccdbd_dev;


--
-- TOC entry 5114 (class 0 OID 0)
-- Dependencies: 3572
-- Name: sp_microtomy; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_microtomy FROM PUBLIC;
REVOKE ALL ON TABLE sp_microtomy FROM postgres;
GRANT ALL ON TABLE sp_microtomy TO postgres;
GRANT ALL ON TABLE sp_microtomy TO ccdbd_dev;


--
-- TOC entry 5115 (class 0 OID 0)
-- Dependencies: 3573
-- Name: sp_molecular_localization; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_molecular_localization FROM PUBLIC;
REVOKE ALL ON TABLE sp_molecular_localization FROM postgres;
GRANT ALL ON TABLE sp_molecular_localization TO postgres;
GRANT ALL ON TABLE sp_molecular_localization TO ccdbd_dev;


--
-- TOC entry 5116 (class 0 OID 0)
-- Dependencies: 3574
-- Name: sp_molecular_target; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_molecular_target FROM PUBLIC;
REVOKE ALL ON TABLE sp_molecular_target FROM postgres;
GRANT ALL ON TABLE sp_molecular_target TO postgres;
GRANT ALL ON TABLE sp_molecular_target TO ccdbd_dev;


--
-- TOC entry 5117 (class 0 OID 0)
-- Dependencies: 3575
-- Name: sp_probe; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_probe FROM PUBLIC;
REVOKE ALL ON TABLE sp_probe FROM postgres;
GRANT ALL ON TABLE sp_probe TO postgres;
GRANT ALL ON TABLE sp_probe TO ccdbd_dev;


--
-- TOC entry 5118 (class 0 OID 0)
-- Dependencies: 3576
-- Name: sp_protocol_steps; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_protocol_steps FROM PUBLIC;
REVOKE ALL ON TABLE sp_protocol_steps FROM postgres;
GRANT ALL ON TABLE sp_protocol_steps TO postgres;
GRANT ALL ON TABLE sp_protocol_steps TO ccdbd_dev;


--
-- TOC entry 5119 (class 0 OID 0)
-- Dependencies: 3577
-- Name: sp_protocols; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_protocols FROM PUBLIC;
REVOKE ALL ON TABLE sp_protocols FROM postgres;
GRANT ALL ON TABLE sp_protocols TO postgres;
GRANT ALL ON TABLE sp_protocols TO ccdbd_dev;


--
-- TOC entry 5120 (class 0 OID 0)
-- Dependencies: 3578
-- Name: sp_stain; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE sp_stain FROM PUBLIC;
REVOKE ALL ON TABLE sp_stain FROM postgres;
GRANT ALL ON TABLE sp_stain TO postgres;
GRANT ALL ON TABLE sp_stain TO ccdbd_dev;


--
-- TOC entry 5121 (class 0 OID 0)
-- Dependencies: 3579
-- Name: spatial_ref_sys; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE spatial_ref_sys FROM PUBLIC;
REVOKE ALL ON TABLE spatial_ref_sys FROM postgres;
GRANT ALL ON TABLE spatial_ref_sys TO postgres;
GRANT ALL ON TABLE spatial_ref_sys TO ccdbd_dev;


--
-- TOC entry 5122 (class 0 OID 0)
-- Dependencies: 3583
-- Name: steps_in_protocol; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE steps_in_protocol FROM PUBLIC;
REVOKE ALL ON TABLE steps_in_protocol FROM postgres;
GRANT ALL ON TABLE steps_in_protocol TO postgres;
GRANT ALL ON TABLE steps_in_protocol TO ccdbd_dev;


--
-- TOC entry 5123 (class 0 OID 0)
-- Dependencies: 3641
-- Name: surface_component; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE surface_component FROM PUBLIC;
REVOKE ALL ON TABLE surface_component FROM postgres;
GRANT ALL ON TABLE surface_component TO postgres;
GRANT ALL ON TABLE surface_component TO ccdbd_dev;
GRANT SELECT ON TABLE surface_component TO "ccdb-atlas";
GRANT ALL ON TABLE surface_component TO "ccdb-core";


--
-- TOC entry 5124 (class 0 OID 0)
-- Dependencies: 3590
-- Name: general_sequence; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON SEQUENCE general_sequence FROM PUBLIC;
REVOKE ALL ON SEQUENCE general_sequence FROM ccdbd_dev;
GRANT ALL ON SEQUENCE general_sequence TO ccdbd_dev;
GRANT ALL ON SEQUENCE general_sequence TO PUBLIC;


--
-- TOC entry 5125 (class 0 OID 0)
-- Dependencies: 3591
-- Name: tag; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE tag FROM PUBLIC;
REVOKE ALL ON TABLE tag FROM ccdbd_dev;
GRANT ALL ON TABLE tag TO ccdbd_dev;
GRANT ALL ON TABLE tag TO PUBLIC;


--
-- TOC entry 5126 (class 0 OID 0)
-- Dependencies: 3592
-- Name: tag_category; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE tag_category FROM PUBLIC;
REVOKE ALL ON TABLE tag_category FROM ccdbd_dev;
GRANT ALL ON TABLE tag_category TO ccdbd_dev;
GRANT ALL ON TABLE tag_category TO PUBLIC;


--
-- TOC entry 5127 (class 0 OID 0)
-- Dependencies: 3593
-- Name: tagged_mp_file; Type: ACL; Schema: public; Owner: ccdbd_dev
--

REVOKE ALL ON TABLE tagged_mp_file FROM PUBLIC;
REVOKE ALL ON TABLE tagged_mp_file FROM ccdbd_dev;
GRANT ALL ON TABLE tagged_mp_file TO ccdbd_dev;
GRANT ALL ON TABLE tagged_mp_file TO PUBLIC;


--
-- TOC entry 5128 (class 0 OID 0)
-- Dependencies: 3638
-- Name: temp_channel_mappings; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE temp_channel_mappings FROM PUBLIC;
REVOKE ALL ON TABLE temp_channel_mappings FROM postgres;
GRANT ALL ON TABLE temp_channel_mappings TO postgres;
GRANT ALL ON TABLE temp_channel_mappings TO ccdbd_dev;


--
-- TOC entry 5129 (class 0 OID 0)
-- Dependencies: 3597
-- Name: thickness; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE thickness FROM PUBLIC;
REVOKE ALL ON TABLE thickness FROM postgres;
GRANT ALL ON TABLE thickness TO postgres;
GRANT ALL ON TABLE thickness TO ccdbd_dev;


--
-- TOC entry 5130 (class 0 OID 0)
-- Dependencies: 3598
-- Name: time; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE "time" FROM PUBLIC;
REVOKE ALL ON TABLE "time" FROM postgres;
GRANT ALL ON TABLE "time" TO postgres;
GRANT ALL ON TABLE "time" TO ccdbd_dev;


--
-- TOC entry 5131 (class 0 OID 0)
-- Dependencies: 3600
-- Name: tissue_section_transformation; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE tissue_section_transformation FROM PUBLIC;
REVOKE ALL ON TABLE tissue_section_transformation FROM postgres;
GRANT ALL ON TABLE tissue_section_transformation TO postgres;
GRANT ALL ON TABLE tissue_section_transformation TO ccdbd_dev;


--
-- TOC entry 5132 (class 0 OID 0)
-- Dependencies: 3603
-- Name: transmitted_images; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE transmitted_images FROM PUBLIC;
REVOKE ALL ON TABLE transmitted_images FROM postgres;
GRANT ALL ON TABLE transmitted_images TO postgres;
GRANT ALL ON TABLE transmitted_images TO ccdbd_dev;


--
-- TOC entry 5133 (class 0 OID 0)
-- Dependencies: 3604
-- Name: treatments; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE treatments FROM PUBLIC;
REVOKE ALL ON TABLE treatments FROM postgres;
GRANT ALL ON TABLE treatments TO postgres;
GRANT ALL ON TABLE treatments TO ccdbd_dev;


--
-- TOC entry 5134 (class 0 OID 0)
-- Dependencies: 3605
-- Name: tree_components; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE tree_components FROM PUBLIC;
REVOKE ALL ON TABLE tree_components FROM postgres;
GRANT ALL ON TABLE tree_components TO postgres;
GRANT ALL ON TABLE tree_components TO ccdbd_dev;


--
-- TOC entry 5135 (class 0 OID 0)
-- Dependencies: 3606
-- Name: tree_nodes; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE tree_nodes FROM PUBLIC;
REVOKE ALL ON TABLE tree_nodes FROM postgres;
GRANT ALL ON TABLE tree_nodes TO postgres;
GRANT ALL ON TABLE tree_nodes TO ccdbd_dev;


--
-- TOC entry 5136 (class 0 OID 0)
-- Dependencies: 3607
-- Name: tree_segments; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE tree_segments FROM PUBLIC;
REVOKE ALL ON TABLE tree_segments FROM postgres;
GRANT ALL ON TABLE tree_segments TO postgres;
GRANT ALL ON TABLE tree_segments TO ccdbd_dev;


--
-- TOC entry 5138 (class 0 OID 0)
-- Dependencies: 3609
-- Name: voltages; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE voltages FROM PUBLIC;
REVOKE ALL ON TABLE voltages FROM postgres;
GRANT ALL ON TABLE voltages TO postgres;
GRANT ALL ON TABLE voltages TO ccdbd_dev;


--
-- TOC entry 5139 (class 0 OID 0)
-- Dependencies: 3642
-- Name: volume_component; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE volume_component FROM PUBLIC;
REVOKE ALL ON TABLE volume_component FROM postgres;
GRANT ALL ON TABLE volume_component TO postgres;
GRANT ALL ON TABLE volume_component TO ccdbd_dev;
GRANT SELECT ON TABLE volume_component TO "ccdb-atlas";
GRANT ALL ON TABLE volume_component TO "ccdb-core";


--
-- TOC entry 5140 (class 0 OID 0)
-- Dependencies: 3610
-- Name: volume_measurement; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE volume_measurement FROM PUBLIC;
REVOKE ALL ON TABLE volume_measurement FROM postgres;
GRANT ALL ON TABLE volume_measurement TO postgres;
GRANT ALL ON TABLE volume_measurement TO ccdbd_dev;


--
-- TOC entry 5141 (class 0 OID 0)
-- Dependencies: 3639
-- Name: w_trigger_project_keywords; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE w_trigger_project_keywords FROM PUBLIC;
REVOKE ALL ON TABLE w_trigger_project_keywords FROM postgres;
GRANT ALL ON TABLE w_trigger_project_keywords TO postgres;
GRANT ALL ON TABLE w_trigger_project_keywords TO ccdbd_dev;


--
-- TOC entry 5142 (class 0 OID 0)
-- Dependencies: 3611
-- Name: web_simplified_product; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE web_simplified_product FROM PUBLIC;
REVOKE ALL ON TABLE web_simplified_product FROM postgres;
GRANT ALL ON TABLE web_simplified_product TO postgres;
GRANT ALL ON TABLE web_simplified_product TO ccdbd_dev;


--
-- TOC entry 5143 (class 0 OID 0)
-- Dependencies: 3612
-- Name: weight; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE weight FROM PUBLIC;
REVOKE ALL ON TABLE weight FROM postgres;
GRANT ALL ON TABLE weight TO postgres;
GRANT ALL ON TABLE weight TO ccdbd_dev;


--
-- TOC entry 5144 (class 0 OID 0)
-- Dependencies: 3614
-- Name: xml_parsers; Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON TABLE xml_parsers FROM PUBLIC;
REVOKE ALL ON TABLE xml_parsers FROM postgres;
GRANT ALL ON TABLE xml_parsers TO postgres;
GRANT ALL ON TABLE xml_parsers TO ccdbd_dev;


--
-- TOC entry 5161 (class 0 OID 0)
-- Dependencies: 218
-- Name: dblink_connect_u(text); Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON FUNCTION dblink_connect_u(text) FROM PUBLIC;
REVOKE ALL ON FUNCTION dblink_connect_u(text) FROM postgres;
GRANT ALL ON FUNCTION dblink_connect_u(text) TO postgres;


--
-- TOC entry 5162 (class 0 OID 0)
-- Dependencies: 195
-- Name: dblink_connect_u(text, text); Type: ACL; Schema: public; Owner: postgres
--

REVOKE ALL ON FUNCTION dblink_connect_u(text, text) FROM PUBLIC;
REVOKE ALL ON FUNCTION dblink_connect_u(text, text) FROM postgres;
GRANT ALL ON FUNCTION dblink_connect_u(text, text) TO postgres;


-- Completed on 2012-12-21 15:26:40

--
-- PostgreSQL database dump complete
--

