select 'id' in every table psql
You can do this all in one statement pretty easily.

SELECT string_agg(statement, E'\nUNION ALL ') || ';'
FROM (
  SELECT FORMAT(
    $$SELECT '%s' AS table_catalog, '%s' AS table_schema, '%s' AS table_name, id FROM %I.%I.%I WHERE %I BETWEEN 1 AND 1000$$,
    table_catalog,
    table_schema,
    table_name,
    table_catalog,
    table_schema,
    table_name,
    column_name
  )
  FROM information_schema.columns
  WHERE
    table_catalog = CURRENT_CATALOG
    AND table_schema = 'public'
    AND column_name = 'id'
) AS t(statement);


That will generate a single statement. In psql, just run \gexec after that.