title: concat two int values in postgresql
body: <p>I have 7 integer values (with 3,1,3,4,4,5,4 digits respectively) and I have to concatenate them to a single integer (i.e a 24 digit no.) . I tried to do it like this  </p>
  
  <pre><code>create or replace function gen_id(int,int,int,int,int,int,int) returns bigint as $$
  declare
      id bigint;
  begin
      id = $1 * 1000000000000000000000 + $2 * 100000000000000000000 + $3 * 100000000000000000 + $4 * 10000000000000 + $5 * 1000000000 + $6 * 10000 + $7;
      return id;
  end;
  $$ language plpgsql;
  
  select * from gen_id(100,1,101,1000,1001,10001,1000);  
  </code></pre>
  
  <p>But when I execute it I get error: bigint out of range . Is there any other better way to do it ?<br>
  thanks  </p>