Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open the DBF file: File too large #8

Open
gobird opened this issue Jun 6, 2013 · 0 comments
Open

Unable to open the DBF file: File too large #8

gobird opened this issue Jun 6, 2013 · 0 comments

Comments

@gobird
Copy link

gobird commented Jun 6, 2013

Hi,
I use pgdbf tools to load dbf to pg,the command below:
#pgdbf xxx.dbf (the size of xxx.dbf is 3.1GB)
unable to open the DBF file:File too large

the limits size of dbf is ?

-------update----
I see the source code from pgdbf.c/pgdbf.h
pgdbf.c line321324
dbffile = fopen(dbffilename, "rb");
if(dbffile == NULL) {
exitwitherror("Unable to open the DBF file", 1);
pgdbf.h line243
245
if(systemerror) {
perror(message);
}

an off_t is commonly 32 bits. To avoid conflicts with negative numbers, the largest offset that can be represented in
a 32-bit off_t variable is 2 gigabytes.

------update2---
maybe you can compile use -D _FILE_OFFSET_BITS=64 to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant