From: | Hans Plum <plum(at)giub(dot)uni-bonn(dot)de> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Bug: Importing files of different sizes via psql -f |
Date: | 2002-01-21 23:26:51 |
Message-ID: | 3C4CA3BB.4E745840@giub.uni-bonn.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
=========================================================================
POSTGRESQL BUG REPORT TEMPLATE
=========================================================================
Your name : Hans Plum
Your email address : plum(at)giub(dot)uni-bonn(dot)de
System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium II
Operating System (example: Linux 2.0.26 ELF) : Linux version 2.4.10
PostgreSQL version (example: PostgreSQL-7.1.3): PostgreSQL-7.1.3
Compiler used (example: gcc 2.95.2) : gcc version 2.95.3
20010315
Please enter a FULL description of your problem:
------------------------------------------------
I have tried to add a table to a database by importing the file by using
"-f" option for psql (psql -U -f file db).
If I use a file, a bit smaller than 900 byte - like 30_parser_error.sql
- it worked. Every other file, bigger than this one - like
"31_parser_error.sql", I used, did not work. There was always a error
message of the parser, saying that at the end of the file is an error -
see error message of 31_parser_error.sql in detail a bit further down.
Files and Error Messages of PSQL:
-rw-r--r-- 1 root root 890 Jan 21 16:38
30_parser_error.sql
# psql -U postgres -f 30_parser_error.sql ghl
psql:30_parser_error.sql:30: NOTICE: CREATE TABLE will create implicit
sequence 'ghl_einricht30_id_seq' for SERIAL column 'ghl_einricht30.id'
psql:30_parser_error.sql:30: NOTICE: CREATE TABLE/UNIQUE will create
implicit index 'ghl_einricht30_id_key' for table 'ghl_einricht30'
CREATE
#
-rw-r--r-- 1 root root 932 Jan 21 17:30
31_parser_error.sql
# psql -U postgres -f 31_parser_error.sql ghl
psql:31_parser_error.sql:32: ERROR: parser: parse error at or near "("
#
First, I thought, it would be a SQL syntax error, like some spaces,
tabs, commas, ... but I could not find one. When I search in the FAQs, I
could find a message, somebody described a pretty similar behaviour of
psql, but with a much smaller sql statement (but not using the import
function).
Bug, somebody else reported in January 2002:
psql bug: copy paste statements looses tab character
http://archives.postgresql.org/pgsql-sql/2002-01/msg00220.php
The only difference, I could observe, was the size of the file. It might
be a problem of the size of a buffer - I have imported larger files via
psql -f with large INSERT statements and it worked. Now, I am not sure
if it is a problem of the file size.
Now, I send you both files, I used, so that you can reproduce the error.
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
Within a PostgreSQL database environment, just try to import the 2 files
from the command line.
My examples:
# psql -U postgres -f 30_parser_error.sql ghl
# psql -U postgres -f 31_parser_error.sql ghl
Find attached both files.
If you know how this problem might be fixed, list the solution below:
----------------------------------------------------------------------
Maybe I did not recognize a SQL problem or I missed to change the size
of a special buffer, I have not read about.
Thank you for solving the problem,
Hans Plum
Attachment | Content-Type | Size |
---|---|---|
30_parser_error.sql | text/plain | 891 bytes |
31_parser_error.sql | text/plain | 933 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Evandro | 2002-01-22 12:07:03 | Database can´t give the result of the query |
Previous Message | Alvaro Herrera | 2002-01-21 06:44:55 | Message about not null in ALTER TABLE |