Re: Obscure bug - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Obscure bug
Date
Msg-id 28861.962892440@sss.pgh.pa.us
Whole thread Raw
In response to Obscure bug  ("Andrew Brown" <andrew_brown@adc.com>)
List pgsql-bugs
"Andrew Brown" <andrew_brown@adc.com> writes:
> Using the attached test program to insert into a table with the following
> definition:
> expr_id    int4         not null
> line_no    int4         not null
> line_text  varchar(254)

> The output is as follows:
> perl t2 x
> 2: ERROR:  Unterminated quoted string

I cannot reproduce this failure here, using current sources and
DBD-Pg-0.93.  Possibly it's a bug that's been fixed since 7.0.*
but I don't recall having heard of any quoting-related fixes.
Please investigate more closely.

One thing you should at least do is narrow down whether the problem
is in DBD or the backend.  If you start perl with environment variable
PGOPTIONS=-d2 to log received queries, what do you get in the postmaster
log?  I see

DEBUG:  StartTransactionCommand
DEBUG:  query: begin
DEBUG:  ProcessUtility: begin
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: delete from expression_line where EXPR_ID = 40000
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: commit
DEBUG:  ProcessUtility: commit
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: begin
DEBUG:  ProcessUtility: begin
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: insert into expression_line (EXPR_ID,LINE_NO,LINE_TEXT) values (40000,1,'                        / \\')
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: insert into expression_line (EXPR_ID,LINE_NO,LINE_TEXT) values (40000,2,'                     abc \\')
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: commit
DEBUG:  ProcessUtility: commit
DEBUG:  CommitTransactionCommand

which looks reasonable enough ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Andreas Schwab
Date:
Subject: Re: [PATCHES] Patch for Linux-IA64
Next
From: Tom Lane
Date:
Subject: Re: Bug??: getattproperties fails !!