postgres create limited user that can select tables and columns of those tables
You can set column level privileges to very specifically (and narrowly) allow otherwise unprivileged users to access data.  In your case, it is two catalogs: pg_attribute and pg_type.

I have a user called alice who is similarly restricted as your user:

alice@test=&gt; &gt; SELECT * FROM pg_class LIMIT 1;
ERROR:  permission denied for relation pg_class


Issue the following GRANT statements:

GRANT SELECT (oid, typname) ON pg_type TO alice;
GRANT SELECT (attrelid, attname, atttypid, attnum) ON TABLE pg_attribute TO alice;


After these, alice can do the following, for example:

SELECT attname, typname 
  FROM pg_attribute JOIN pg_type t ON t.oid = atttypid
 WHERE attrelid = 't2'::regclass AND attnum &gt; 0;

 attname │ typname 
─────────┼─────────
 key     │ jsonb
 value   │ jsonb


You can trivially extend the privileges to match your needs.