Documenting a trick I have long used in sql server, but it is slightly different in postgres:
CREATE TEMPORARY TABLE my_f(lookup character varying (10), dataval character varying(10)); INSERT INTO my_f SELECT '\1', '\2';
The gist is this:
- Paste some table data into a code editor (usually it will have tabs between columns)
- Regex it to an insert statement. Find: (.+)\t(.+) The INSERT above is the replace
- Put in the create table and run it