I am still new to postgres. Can you please tell the exact syntax for this. I tried different things but was not able to retun the ids of the newly inserted rows. -- View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-insert-multiple-rows-and-get-the-ids-back-in-a-temp-table-pgplsql-tp2845274p4287708.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general