-
Notifications
You must be signed in to change notification settings - Fork 84
/
sample-uk-zipcodes.sql
854 lines (624 loc) · 20.7 KB
/
sample-uk-zipcodes.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.9
-- Dumped by pg_dump version 9.6.9
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
--
-- Name: postgis; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
--
-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
--
-- Name: unaccent; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public;
--
-- Name: EXTENSION unaccent; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION unaccent IS 'text search dictionary that removes accents';
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: ccgs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.ccgs (
code character varying(32) NOT NULL,
name character varying(255)
);
-- Name: constituencies; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.constituencies (
code character varying(32) NOT NULL,
name character varying(255)
);
--
-- Name: counties; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.counties (
code character varying(32) NOT NULL,
name character varying(255)
);
--
-- Name: districts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.districts (
code character varying(32) NOT NULL,
name character varying(255)
);
--
-- Name: nuts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.nuts (
nuts_code character varying(32) NOT NULL,
code character varying(32) NOT NULL,
name character varying(255)
);
--
-- Name: outcodes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.outcodes (
id integer NOT NULL,
outcode character varying(5),
longitude double precision,
latitude double precision,
location public.geography(Point,4326),
northings integer,
eastings integer,
admin_district character varying(255)[],
parish character varying(255)[],
admin_county character varying(255)[],
admin_ward character varying(255)[],
country character varying(255)[]
);
--
-- Name: outcodes_temp_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.outcodes_temp_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: outcodes_temp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.outcodes_temp_id_seq OWNED BY public.outcodes.id;
--
-- Name: parishes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.parishes (
code character varying(32) NOT NULL,
name character varying(255)
);
--
-- Name: places; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.places (
id integer NOT NULL,
code character varying(255),
longitude double precision,
latitude double precision,
location public.geography(Point,4326),
eastings integer,
northings integer,
min_eastings integer,
min_northings integer,
max_eastings integer,
max_northings integer,
bounding_polygon public.geography(Polygon,4326),
local_type character varying(128),
outcode character varying(5),
name_1 character varying(128),
name_1_lang character varying(10),
name_1_search character varying(128),
name_1_search_ts tsvector,
name_2 character varying(128),
name_2_lang character varying(10),
name_2_search character varying(128),
name_2_search_ts tsvector,
county_unitary character varying(128),
county_unitary_type character varying(128),
district_borough character varying(128),
district_borough_type character varying(128),
region character varying(32),
country character varying(16)
);
--
-- Name: places_archived; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.places_archived (
id integer NOT NULL,
code character varying(255),
longitude double precision,
latitude double precision,
location public.geography(Point,4326),
eastings integer,
northings integer,
min_eastings integer,
min_northings integer,
max_eastings integer,
max_northings integer,
bounding_polygon public.geography(Polygon,4326),
local_type character varying(128),
outcode character varying(5),
name_1 character varying(128),
name_1_lang character varying(10),
name_1_search character varying(128),
name_1_search_ts tsvector,
name_2 character varying(128),
name_2_lang character varying(10),
name_2_search character varying(128),
name_2_search_ts tsvector,
county_unitary character varying(128),
county_unitary_type character varying(128),
district_borough character varying(128),
district_borough_type character varying(128),
region character varying(32),
country character varying(16)
);
--
-- Name: places_temp_id_seq1; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.places_temp_id_seq1
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: places_temp_id_seq1; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.places_temp_id_seq1 OWNED BY public.places_archived.id;
--
-- Name: places_temp_id_seq2; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.places_temp_id_seq2
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: places_temp_id_seq2; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.places_temp_id_seq2 OWNED BY public.places.id;
--
-- Name: postcodes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.postcodes (
id integer NOT NULL,
postcode character varying(10) COLLATE pg_catalog."C",
pc_compact character varying(9) COLLATE pg_catalog."C",
quality integer,
eastings integer,
northings integer,
country character varying(255),
nhs_ha character varying(255),
admin_county_id character varying(32),
admin_district_id character varying(32),
admin_ward_id character varying(32),
longitude double precision,
latitude double precision,
location public.geography(Point,4326),
european_electoral_region character varying(255),
primary_care_trust character varying(255),
region character varying(255),
parish_id character varying(32),
lsoa character varying(255),
msoa character varying(255),
nuts_id character varying(32),
incode character varying(5),
outcode character varying(5),
ccg_id character varying(32),
constituency_id character varying(32)
);
--
-- Name: postcodes_temp_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.postcodes_temp_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: postcodes_temp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.postcodes_temp_id_seq OWNED BY public.postcodes.id;
--
-- Name: terminated_postcodes; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.terminated_postcodes (
id integer NOT NULL,
postcode character varying(10) COLLATE pg_catalog."C" NOT NULL,
pc_compact character varying(9) COLLATE pg_catalog."C",
year_terminated integer,
month_terminated integer,
eastings integer,
northings integer,
longitude double precision,
latitude double precision,
location public.geography(Point,4326)
);
--
-- Name: terminated_postcodes_temp_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.terminated_postcodes_temp_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: terminated_postcodes_temp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.terminated_postcodes_temp_id_seq OWNED BY public.terminated_postcodes.id;
--
-- Name: wards; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.wards (
code character varying(32) NOT NULL,
name character varying(255)
);
--
-- Name: outcodes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.outcodes ALTER COLUMN id SET DEFAULT nextval('public.outcodes_temp_id_seq'::regclass);
--
-- Name: places id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.places ALTER COLUMN id SET DEFAULT nextval('public.places_temp_id_seq2'::regclass);
--
-- Name: places_archived id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.places_archived ALTER COLUMN id SET DEFAULT nextval('public.places_temp_id_seq1'::regclass);
--
-- Name: postcodes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.postcodes ALTER COLUMN id SET DEFAULT nextval('public.postcodes_temp_id_seq'::regclass);
--
-- Name: terminated_postcodes id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.terminated_postcodes ALTER COLUMN id SET DEFAULT nextval('public.terminated_postcodes_temp_id_seq'::regclass);
--
-- Data for Name: ccgs; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.ccgs (code, name) FROM stdin;
E38000001 NHS Airedale, Wharfedale and Craven
E38000006 NHS Barnsley
E38000004 NHS Barking and Dagenham
E38000010 NHS Bedfordshire
E38000011 NHS Bexley
E38000002 NHS Ashford
E38000008 NHS Bassetlaw
E38000007 NHS Basildon and Brentwood
E38000014 NHS Blackburn with Darwen
E38000015 NHS Blackpool
E38000016 NHS Bolton
E38000018 NHS Bradford City
E38000009 NHS Bath and North East Somerset
E38000005 NHS Barnet
E38000019 NHS Bradford Districts
E38000020 NHS Brent
E38000021 NHS Brighton and Hove
E38000023 NHS Bromley
E38000024 NHS Bury
E38000026 NHS Cambridgeshire and Peterborough
E38000025 NHS Calderdale
E38000027 NHS Camden
E38000028 NHS Cannock Chase
E38000029 NHS Canterbury and Coastal
E38000030 NHS Castle Point and Rochford
E38000031 NHS Central London (Westminster)
E38000034 NHS Chorley and South Ribble
E38000035 NHS City and Hackney
E38000037 NHS Corby
E38000039 NHS Crawley
E38000038 NHS Coventry and Rugby
E38000040 NHS Croydon
E38000042 NHS Darlington
E38000044 NHS Doncaster
E38000045 NHS Dorset
E38000046 NHS Dudley
E38000043 NHS Dartford, Gravesham and Swanley
E38000047 NHS Durham Dales, Easington and Sedgefield
E38000048 NHS Ealing
E38000049 NHS East and North Hertfordshire
E38000050 NHS East Lancashire
E38000051 NHS East Leicestershire and Rutland
E38000053 NHS East Staffordshire
E38000052 NHS East Riding of Yorkshire
E38000054 NHS East Surrey
E38000055 NHS Eastbourne, Hailsham and Seaford
E38000056 NHS Eastern Cheshire
E38000057 NHS Enfield
E38000058 NHS Erewash
E38000059 NHS Fareham and Gosport
E38000062 NHS Gloucestershire
E38000063 NHS Great Yarmouth and Waveney
E38000064 NHS Greater Huddersfield
E38000068 NHS Halton
E38000070 NHS Hammersmith and Fulham
E38000069 NHS Hambleton, Richmondshire and Whitby
E38000071 NHS Hardwick
E38000066 NHS Greenwich
E38000072 NHS Haringey
E38000073 NHS Harrogate and Rural District
E38000074 NHS Harrow
E38000075 NHS Hartlepool and Stockton-on-Tees
E38000076 NHS Hastings and Rother
E38000077 NHS Havering
E38000078 NHS Herefordshire
E38000079 NHS Herts Valleys
E38000080 NHS Heywood, Middleton and Rochdale
E38000081 NHS High Weald Lewes Havens
E38000082 NHS Hillingdon
E38000083 NHS Horsham and Mid Sussex
E38000084 NHS Hounslow
E38000085 NHS Hull
E38000086 NHS Ipswich and East Suffolk
E38000087 NHS Isle of Wight
E38000089 NHS Kernow
E38000088 NHS Islington
E38000090 NHS Kingston
E38000091 NHS Knowsley
E38000092 NHS Lambeth
E38000097 NHS Leicester City
E38000098 NHS Lewisham
E38000099 NHS Lincolnshire East
E38000100 NHS Lincolnshire West
E38000101 NHS Liverpool
E38000102 NHS Luton
E38000103 NHS Mansfield and Ashfield
E38000105 NHS Merton
E38000104 NHS Medway
E38000106 NHS Mid Essex
E38000108 NHS Nene
E38000107 NHS Milton Keynes
E38000109 NHS Newark and Sherwood
E38000113 NHS Newham
E38000115 NHS North Derbyshire
E38000116 NHS North Durham
E38000117 NHS North East Essex
E38000118 NHS North East Hampshire and Farnham
E38000119 NHS North East Lincolnshire
E38000121 NHS North Kirklees
E38000120 NHS North Hampshire
E38000124 NHS North Norfolk
E38000122 NHS North Lincolnshire
E38000126 NHS North Staffordshire
E38000127 NHS North Tyneside
E38000128 NHS North West Surrey
E38000129 NHS Northern, Eastern and Western Devon
E38000130 NHS Northumberland
E38000132 NHS Nottingham City
E38000133 NHS Nottingham North and East
E38000134 NHS Nottingham West
E38000135 NHS Oldham
E38000138 NHS Redbridge
E38000137 NHS Portsmouth
E38000139 NHS Redditch and Bromsgrove
E38000136 NHS Oxfordshire
E38000140 NHS Richmond
E38000141 NHS Rotherham
E38000142 NHS Rushcliffe
E38000143 NHS Salford
E38000144 NHS Sandwell and West Birmingham
E38000145 NHS Scarborough and Ryedale
E38000146 NHS Sheffield
E38000147 NHS Shropshire
E38000150 NHS Somerset
E38000151 NHS South Cheshire
E38000152 NHS South Devon and Torbay
E38000153 NHS South East Staffordshire and Seisdon Peninsula
E38000156 NHS South Kent Coast
E38000154 NHS South Eastern Hampshire
E38000157 NHS South Lincolnshire
E38000161 NHS South Sefton
E38000162 NHS South Tees
E38000163 NHS South Tyneside
E38000164 NHS South Warwickshire
E38000176 NHS Sunderland
E38000185 NHS Thurrock
E38000196 NHS West Cheshire
E38000208 NHS Wirral
\.
--
-- Name: ccgs ccgs_code_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.ccgs
ADD CONSTRAINT ccgs_code_key UNIQUE (code);
--
-- Name: constituencies constituencies_code_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.constituencies
ADD CONSTRAINT constituencies_code_key UNIQUE (code);
--
-- Name: counties counties_code_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.counties
ADD CONSTRAINT counties_code_key UNIQUE (code);
--
-- Name: districts districts_code_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.districts
ADD CONSTRAINT districts_code_key UNIQUE (code);
--
-- Name: nuts nuts_code_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.nuts
ADD CONSTRAINT nuts_code_key UNIQUE (code);
--
-- Name: outcodes outcodes_temp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.outcodes
ADD CONSTRAINT outcodes_temp_pkey PRIMARY KEY (id);
--
-- Name: parishes parishes_code_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.parishes
ADD CONSTRAINT parishes_code_key UNIQUE (code);
--
-- Name: places_archived places_temp_pkey1; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.places_archived
ADD CONSTRAINT places_temp_pkey1 PRIMARY KEY (id);
--
-- Name: places places_temp_pkey2; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.places
ADD CONSTRAINT places_temp_pkey2 PRIMARY KEY (id);
--
-- Name: postcodes postcodes_temp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.postcodes
ADD CONSTRAINT postcodes_temp_pkey PRIMARY KEY (id);
--
-- Name: terminated_postcodes terminated_postcodes_temp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.terminated_postcodes
ADD CONSTRAINT terminated_postcodes_temp_pkey PRIMARY KEY (id);
--
-- Name: wards wards_code_key; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.wards
ADD CONSTRAINT wards_code_key UNIQUE (code);
--
-- Name: ccgs_code_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX ccgs_code_idx ON public.ccgs USING btree (code);
--
-- Name: constituencies_code_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX constituencies_code_idx ON public.constituencies USING btree (code);
--
-- Name: counties_code_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX counties_code_idx ON public.counties USING btree (code);
--
-- Name: districts_code_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX districts_code_idx ON public.districts USING btree (code);
--
-- Name: nuts_code_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX nuts_code_idx ON public.nuts USING btree (code);
--
-- Name: outcodes_temp_location_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX outcodes_temp_location_idx ON public.outcodes USING gist (location);
--
-- Name: outcodes_temp_outcode_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX outcodes_temp_outcode_idx ON public.outcodes USING btree (outcode);
--
-- Name: parishes_code_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX parishes_code_idx ON public.parishes USING btree (code);
--
-- Name: places_temp_bounding_polygon_idx1; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_bounding_polygon_idx1 ON public.places_archived USING gist (bounding_polygon);
--
-- Name: places_temp_bounding_polygon_idx2; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_bounding_polygon_idx2 ON public.places USING gist (bounding_polygon);
--
-- Name: places_temp_code_idx1; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX places_temp_code_idx1 ON public.places_archived USING btree (code);
--
-- Name: places_temp_code_idx2; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX places_temp_code_idx2 ON public.places USING btree (code);
--
-- Name: places_temp_location_idx1; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_location_idx1 ON public.places_archived USING gist (location);
--
-- Name: places_temp_location_idx2; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_location_idx2 ON public.places USING gist (location);
--
-- Name: places_temp_name_1_search_idx1; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_name_1_search_idx1 ON public.places_archived USING btree (name_1_search varchar_pattern_ops);
--
-- Name: places_temp_name_1_search_idx2; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_name_1_search_idx2 ON public.places USING btree (name_1_search varchar_pattern_ops);
--
-- Name: places_temp_name_1_search_ts_idx1; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_name_1_search_ts_idx1 ON public.places_archived USING gin (name_1_search_ts);
--
-- Name: places_temp_name_1_search_ts_idx2; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_name_1_search_ts_idx2 ON public.places USING gin (name_1_search_ts);
--
-- Name: places_temp_name_2_search_idx1; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_name_2_search_idx1 ON public.places_archived USING btree (name_2_search varchar_pattern_ops);
--
-- Name: places_temp_name_2_search_idx2; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_name_2_search_idx2 ON public.places USING btree (name_2_search varchar_pattern_ops);
--
-- Name: places_temp_name_2_search_ts_idx1; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_name_2_search_ts_idx1 ON public.places_archived USING gin (name_2_search_ts);
--
-- Name: places_temp_name_2_search_ts_idx2; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX places_temp_name_2_search_ts_idx2 ON public.places USING gin (name_2_search_ts);
--
-- Name: postcodes_temp_location_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX postcodes_temp_location_idx ON public.postcodes USING gist (location);
--
-- Name: postcodes_temp_outcode_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX postcodes_temp_outcode_idx ON public.postcodes USING btree (outcode);
--
-- Name: postcodes_temp_pc_compact_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX postcodes_temp_pc_compact_idx ON public.postcodes USING btree (pc_compact);
--
-- Name: postcodes_temp_pc_compact_idx1; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX postcodes_temp_pc_compact_idx1 ON public.postcodes USING btree (pc_compact varchar_pattern_ops);
--
-- Name: postcodes_temp_postcode_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX postcodes_temp_postcode_idx ON public.postcodes USING btree (postcode);
--
-- Name: terminated_postcodes_temp_pc_compact_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX terminated_postcodes_temp_pc_compact_idx ON public.terminated_postcodes USING btree (pc_compact);
--
-- Name: wards_code_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX wards_code_idx ON public.wards USING btree (code);
--
-- PostgreSQL database dump complete
--