From: | Kevin Murphy <murphy(at)genome(dot)chop(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: syntax error but command executes anyway? |
Date: | 2004-06-19 23:34:36 |
Message-ID: | 200406192334.36739.murphy@genome.chop.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Saturday 19 June 2004 06:57 pm, Tom Lane wrote:
> > egenome_dev=# \i
> > /Users/murphy/cvs/egora/sql/data_port/port_identifiers.sql INSERT 0
> > 1672036
> > psql:/Users/murphy/cvs/egora/sql/data_port/port_identifiers.sql:15:
> > ERROR: syntax error at or near "sourcecode" at character 2
>
> It seems mighty suspicious that psql is reporting a syntax error at line
> 15 of the file when cat is only showing 9 lines. I suspect that the
> insert you are showing us did execute, but then something further on
> in the file is producing the syntax error.
>
> I am wondering whether cat on OS X stops at embedded nulls, or something
> stupid like that. It sure looks like there must be garbage in the
> port_identifiers.sql file beyond what cat has printed here. What do you
> see when you examine the file with other tools? (Try "od -c" if nothing
> else springs to mind.)
>
> It is possible that the problem is not entirely cat's fault but has
> something to do with the way that psql's \! command invokes cat.
> Does cat at the shell prompt produce the same output?
>
> regards, tom lane
It is indeed very weird, since the script is not that long. I piped it
through 'od -a' to confirm.
However, I retract my complaint, since I can't reproduce it!
I had to take a bad DIMM out of this machine a few days ago; maybe I need to
run that memory test again. Still, it would seem remarkable if a memory
error could produce my initial results rather than a crash or hang. I am
also feeling like compiling PG again, since it was initially compiled with
that bad DIMM (but again, what would the odds be?)
Tom, as always, thanks for your mellow and rapid response to questions.
I'll let you know if this crops up again in a reproducible way.
-Kevin Murphy
From | Date | Subject | |
---|---|---|---|
Next Message | mike.griffin | 2004-06-20 02:37:20 | Re: 7.4's INFORMATION_SCHEMA.Columns View |
Previous Message | Kevin Murphy | 2004-06-19 23:06:06 | Re: syntax error but command executes anyway? |