Project

General

Profile

« Previous | Next » 

Revision 2884

schemas/vegbien.sql: party: Changed indexes to use `COALESCE` to match what sql_gen now does

View differences:

schemas/vegbien.my.sql
4327 4327
-- Name: party_givenname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4328 4328
--
4329 4329

  
4330
CREATE INDEX party_givenname ON party  (givenname);
4331 4330

  
4332 4331

  
4332

  
4333 4333
--
4334 4334
-- Name: party_middlename; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4335 4335
--
4336 4336

  
4337
CREATE INDEX party_middlename ON party  (middlename);
4338 4337

  
4339 4338

  
4339

  
4340 4340
--
4341 4341
-- Name: party_organizationname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4342 4342
--
4343 4343

  
4344
CREATE INDEX party_organizationname ON party  (organizationname);
4345 4344

  
4346 4345

  
4346

  
4347 4347
--
4348 4348
-- Name: party_surname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4349 4349
--
4350 4350

  
4351
CREATE INDEX party_surname ON party  (surname);
4352 4351

  
4353 4352

  
4354
--
4355
-- Name: party_unique_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4356
--
4357 4353

  
4358

  
4359

  
4360

  
4361 4354
--
4362
-- Name: party_unique_organizationname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4355
-- Name: party_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4363 4356
--
4364 4357

  
4365 4358

  
schemas/vegbien.sql
4854 4854
-- Name: party_givenname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4855 4855
--
4856 4856

  
4857
CREATE INDEX party_givenname ON party USING btree (givenname);
4857
CREATE INDEX party_givenname ON party USING btree ((COALESCE(givenname, '\\N'::text)));
4858 4858

  
4859 4859

  
4860 4860
--
4861 4861
-- Name: party_middlename; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4862 4862
--
4863 4863

  
4864
CREATE INDEX party_middlename ON party USING btree (middlename);
4864
CREATE INDEX party_middlename ON party USING btree ((COALESCE(middlename, '\\N'::text)));
4865 4865

  
4866 4866

  
4867 4867
--
4868 4868
-- Name: party_organizationname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4869 4869
--
4870 4870

  
4871
CREATE INDEX party_organizationname ON party USING btree (organizationname);
4871
CREATE INDEX party_organizationname ON party USING btree ((COALESCE(organizationname, '\\N'::text)));
4872 4872

  
4873 4873

  
4874 4874
--
4875 4875
-- Name: party_surname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4876 4876
--
4877 4877

  
4878
CREATE INDEX party_surname ON party USING btree (surname);
4878
CREATE INDEX party_surname ON party USING btree ((COALESCE(surname, '\\N'::text)));
4879 4879

  
4880 4880

  
4881 4881
--
4882
-- Name: party_unique_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4882
-- Name: party_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4883 4883
--
4884 4884

  
4885
CREATE UNIQUE INDEX party_unique_name ON party USING btree (givenname, (COALESCE(middlename, ''::text)), surname);
4885
CREATE UNIQUE INDEX party_unique ON party USING btree ((COALESCE(organizationname, '\\N'::text)), (COALESCE(givenname, '\\N'::text)), (COALESCE(middlename, '\\N'::text)), (COALESCE(surname, '\\N'::text)));
4886 4886

  
4887 4887

  
4888 4888
--
4889
-- Name: party_unique_organizationname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4890
--
4891

  
4892
CREATE UNIQUE INDEX party_unique_organizationname ON party USING btree (organizationname) WHERE (((givenname IS NULL) AND (middlename IS NULL)) AND (surname IS NULL));
4893

  
4894

  
4895
--
4896 4889
-- Name: partymember_childparty_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4897 4890
--
4898 4891

  

Also available in: Unified diff