5Y72WB5QDDV3MJ3FC2TODMYYLZ47CLIRAS6WTNYBFVO5KNOGJIHQC
72DUSPYXB64ECTFQWWD7XSY4YJUNRCFZT22AS4BDRIIUZP33CZGAC
WA2FN2YR2TDCOLDWCZPYHRHPKJXE7KUB7AFERUCEB3KODVBNCUVQC
E4HFJ4L4PAGV7R7EXVG2B2CWDGGW7XWU4D37VURZ66HZ3ILHCFUAC
5RSETDN4QCQLU7Z55EFXSW27CBEW6HD2MVD2MKB6WDBXIKXFHKNQC
5XHBBUBSPTNNPEZZVELCS5AEAKQVHEMLAI2URKBMMBUGWTPARFVQC
63VXWIHIAKGK7J4VTNRUAG2V32N2QUSWFELB6GD34S54FGRWAPCQC
ZBUC3VBT42SDAG42OCUX7MTT6GNPX2GEGWU2QIUYAY4NMX33IGLAC
(type = 'online' and url is not null and address is null and address2 is null and city is null and postal_code is null and coordinate is null and timezone is null) or
(type = 'physical' and address is not null and city is not null and postal_code is not null and coordinate is not null and timezone is not null)
(type = 'online' and url is not null and address is null and address2 is null and city is null and postal_code is null and longitude is null and latitude is null and osrm_hint is null and timezone is null) or
(type = 'physical' and address is not null and city is not null and postal_code is not null and longitude is not null and latitude is not null and timezone is not null)
create or replace function get_store(_store_id integer) returns table(name text, url text, address citext, address2 citext, city citext, region citext, country citext, postal_code citext, coordinate point, timezone text, images json, times json) as $$
create or replace function get_store(_store_id integer) returns table(name text, url text, address citext, address2 citext, city citext, region citext, country citext, postal_code citext, longitude decimal, latitude decimal, timezone text, images json, times json) as $$