Pgsql的offset可以通過以下替代方案實現:
SELECT * FROM (
SELECT *, ROW_NUMBER() OVER () AS rn
FROM table_name
) AS foo
WHERE rn > 10;
DECLARE cur CURSOR FOR
SELECT *
FROM table_name
OFFSET 10;
FETCH NEXT FROM cur;
SELECT *
FROM table_name
WHERE id > 10
LIMIT 10;
這些替代方案可以幫助實現offset的功能,但可能會對性能產生一定影響,需要根據具體情況選擇合適的方法。