PostgreSQL: foreign table and discarded records -
where postgresql stores records discarded foreign table during select? have following table:
create foreign table ext.alternatenamesext ( altid bigint, geoid bigint, isolanguage varchar(7), alternatename text, ispreferredname integer, isshortname integer, iscolloquial integer, ishistoric integer ) server edrive_server options ( delimiter e'\t', encoding 'utf-8', filename '/mnt/storage/edrive/data/alternatenames.txt', format 'csv');
alternatenames.txt contains ~11 mln records. when "select * ext.alternatenamesext" returns ~9.5mln records. rest of 2mln are? there way put them separate file, oracle's sql*ldr?
problem has been solved following syntax of create foreign table...:
create foreign table ext.alternatenamesext ( altid bigint, geoid bigint, isolanguage varchar(7), alternatename varchar(400), ispreferredname int, isshortname int, iscolloquial int, ishistoric int ) server edrive_server options ( delimiter e'\t', encoding 'utf-8', filename '/mnt/storage/edrive/data/alternatenames.txt', format 'text', -- not 'csv'! null ''); -- eliminate null values (some kind of trailing nullcolls in oracle guess)
Comments
Post a Comment