创建索引

  1. CREATE INDEX 索引名 ON 表名("字段名");
  2. 范例:CREATE INDEX power_type_index ON dev_machine_door_card("power_type");
  1. ? any 数组匹配
  2. ?| 数组匹配
  1. 霸道的pgsql 正则替换函数regexp_matches
  2. 一个语句可以更新所有图片地址更新
  3. UPDATE base_resident
  4. set
  5. portrait_url = REGEXP_REPLACE(portrait_url, '.*/.*/.*/.*/', 'airbridge/microbrain/base/people/2021/12/10/'),
  6. face_photo_url = REGEXP_REPLACE(face_photo_url, '.*/.*/.*/.*/', 'airbridge/microbrain/base/people/2021/12/10/'),
  7. cert_photo_url = REGEXP_REPLACE(cert_photo_url, '.*/.*/.*/.*/', 'airbridge/microbrain/base/people/2021/12/10/'),
  8. cert_photo_assistant_url = REGEXP_REPLACE(cert_photo_assistant_url, '.*/.*/.*/.*/', 'airbridge/microbrain/base/people/2021/12/10/')