YS
select * from test where id=1 or id=2 or id=3 or id=4
id = ANY(<массив>)
Size: a a a
YS
id = ANY(<массив>)
Б
drop table if exists redirect;
create table redirect (old varchar(100), current varchar(100));
insert into redirect (old, current) values
('category1-0', 'c1-0'), ('category1-1', 'c1-1'), ('product-1', 'p-1');
WITH RECURSIVE r AS (
select '/category1-0/category1-1/product-1/' as link, 0 as i
UNION
select
replace(r.link, redirect.old, redirect.current) as link,
i + 1 as i
from redirect, r where link like '%'||old||'%'
)
SELECT * FROM r order by i desc limit 1;
Z
Б
Z
Б
Z
K
id = ANY(<массив>)
K
YS
Z
K
АТ
Z
K
# select id,fname, playlist_id, row_number() over (order by video_playlist.playlist_id DESC) from video_data as vd join video_playlist on video_playlist.item=vd.id where video_playlist.playlist_id any((select playlists from devices where ip='192.168.141.141')) or video_playlist.playlist_id=255;
Z
Z
K
Table "public.devices"
Column | Type | Collation | Nullable | Default
-----------+-----------+-----------+----------+---------
ip | inet | | not null |
playlists | integer[] | | |
Indexes:
"devices_pkey" PRIMARY KEY, btree (ip)
K
```
Z