url_verify.url

Data-Modifying Triggers: This table has BEFORE ROW trigger(s) that modify row data before write. Values you INSERT or UPDATE may differ from what is actually stored. See the Triggers section below.

Cascading Deletes: Deleting rows from this table will cascade to: url_verify.url, url_verify.session.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: url_item_fkey, url_redirect_from_fkey, url_session_fkey, url_url_selector_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('url_verify.url_id_seq'::regclass)

redirect_from FK

integer

Yes

url_verify.url(id)

item FK

integer

Yes

container.biblio_record_entry_bucket_item(id)

session FK

integer

Yes

url_verify.session(id)

url_selector FK

integer

Yes

url_verify.url_selector(id)

tag

text

Yes

subfield

text

Yes

ord

integer

Yes

full_url

text

No

scheme

text

Yes

username

text

Yes

password

text

Yes

host

text

Yes

domain

text

Yes

tld

text

Yes

port

text

Yes

path

text

Yes

page

text

Yes

query

text

Yes

fragment

text

Yes

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

item

container.biblio_record_entry_bucket_item(id)

NO ACTION

NO ACTION

DEFERRED

url_item_fkey

redirect_from

url_verify.url(id)

CASCADE

CASCADE

DEFERRED

url_redirect_from_fkey

session

url_verify.session(id)

CASCADE

CASCADE

DEFERRED

url_session_fkey

url_selector

url_verify.url_selector(id)

NO ACTION

NO ACTION

DEFERRED

url_url_selector_fkey

Check Constraints

  • redirect_or_from_item: CHECK

Indexes

Index Method Definition

url_pkey PK

btree

CREATE UNIQUE INDEX url_pkey ON url_verify.url USING btree (id)

Triggers

Trigger Timing Event Level Function

ingest_url_tgr

BEFORE

INSERT

ROW

url_verify.ingest_url()

Trigger Bodies

ingest_url_tgr

Function: url_verify.ingest_url()
Timing: BEFORE INSERT ROW

This trigger modifies the row before it is written (returns a modified NEW).

DECLARE
    tmp_row url_verify.url%ROWTYPE;
BEGIN
    SELECT * INTO tmp_row FROM url_verify.parse_url(NEW.full_url);

    NEW.scheme          := tmp_row.scheme;
    NEW.username        := tmp_row.username;
    NEW.password        := tmp_row.password;
    NEW.host            := tmp_row.host;
    NEW.domain          := tmp_row.domain;
    NEW.tld             := tmp_row.tld;
    NEW.port            := tmp_row.port;
    NEW.path            := tmp_row.path;
    NEW.page            := tmp_row.page;
    NEW.query           := tmp_row.query;
    NEW.fragment        := tmp_row.fragment;

    RETURN NEW;
END;

Referenced By

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

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

url_verify.url

redirect_from

id

url_redirect_from_fkey

url_verify.url_verification

redirect_to

id

url_verification_redirect_to_fkey

url_verify.url_verification

url

id

url_verification_url_fkey