Advertisement
Guest User

misspelled table

a guest
Oct 27th, 2015
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.61 KB | None | 0 0
  1. -- Table: misspelled
  2.  
  3. -- DROP TABLE misspelled;
  4.  
  5. CREATE TABLE misspelled
  6. (
  7.   word text,
  8.   url text,
  9.   occnum BIGINT,
  10.   proper BOOLEAN,
  11.   scanid BIGINT,
  12.   CONSTRAINT misspelled_scanid_fkey FOREIGN KEY (scanid)
  13.       REFERENCES scans (scanid) MATCH SIMPLE
  14.       ON UPDATE NO ACTION ON DELETE NO ACTION,
  15.   CONSTRAINT misspelled_word_url_scanid_key UNIQUE (word, url, scanid)
  16. )
  17. WITH (
  18.   OIDS=FALSE
  19. );
  20. ALTER TABLE misspelled
  21.   OWNER TO postgres;
  22.  
  23. -- Index: test_scanid
  24.  
  25. -- DROP INDEX test_scanid;
  26.  
  27. CREATE INDEX test_scanid
  28.   ON misspelled
  29.   USING btree
  30.   (word COLLATE pg_catalog."default", scanid);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement