added README with description
[pgsql-fix-value-too-long] / README
1 PostgreSQL - try to load SQL dump, parse errors and modify varchar to text for next re-try of dump load
2
3 Sometimes when you try to load SQL dump from PostgreSQL you get errors like:
4
5 ERROR:  value too long for type character varying(50)
6 CONTEXT:  COPY casopis, line 24713, column vrsta_rada: "...something too long..."
7
8 in that case, you have to modify database dump (which is usually compressed)
9 while loading it into database. This is exactly what pgsql-fix-value-too-long.pl
10 does together with parsing of error messages to figure out which varchar
11 columns are too short and converting them to text columns on the fly.
12
13 It's usually used by import-pgsql-dump.sh which will create file
14 log with all errors and then filter "value too long" ones to errors
15 file and run pgsql-fix-value-too-long.pl using this file. It will also
16 restart import if there are more errors, so it will probably run
17 import multiple times.