The following bug has been logged online: Bug reference: 5352 Logged by: Oleg Email address: sero...@gmail.com PostgreSQL version: any Operating system: any Description: Bug in PL/PgSQL "SELECT .. INTO" statement parser Details:
CREATE TABLE test2 ( id BIGINT, chunk_id BIGINT ); CREATE TABLE test1 ( id BIGINT ); CREATE OR REPLACE FUNCTION "bug" () RETURNS pg_catalog.void AS $body$ DECLARE row_test1 test1%rowtype; row_test2 test2%rowtype; BEGIN SELECT test1, chunk_id FROM test1 JOIN test2 ON(chunk.id = test2.chunk_id) LIMIT 1 INTO row_test1, row_test2; END; $body$ LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY DEFINER; Will throw error: ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses. QUERY: SELECT test1, chunk_id FROM test1 JOIN test2 ON(chunk.id = test2.chunk_id) LIMIT 1, 0, $1 CONTEXT: SQL statement in PL/PgSQL function "bug" near line 8 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs