Advertisement
Guest User

fn_anyelement

a guest
Feb 28th, 2020
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. postgres=# create or replace function a (b anyelement) returns anyelement as $$ select b $$ language sql;
  2. CREATE FUNCTION
  3. postgres=# select pg_typeof(a(1::bigint));
  4.  pg_typeof
  5. -----------
  6.  bigint
  7. (1 row)
  8.  
  9. postgres=# select pg_typeof(a(1::text));
  10.  pg_typeof
  11. -----------
  12.  text
  13. (1 row)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement