Re: [GENERAL] Postgres 7.3b1 + JDBC3 (2002-09-05) truncates SQL

Barry Lind <barry@xythos.com>

From: Barry Lind <barry@xythos.com>
To: "H. Meyer" <nospaming@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Date: 2002-09-18T17:08:14Z
Lists: pgsql-general
I can't reproduce this problem.  Can you submit a simple test case that 
reproduces the problem?

thanks,
--Barry



H. Meyer wrote:
> hi
> 
> i have a very wired problem.
> when i try to execute the following SQL command:
> 
> INSERT INTO SERIES 
> (seriesDateTime,modality,seriesnumber,seriesinstanceuid,seriesdescr,bodypartexamined,slicethickness,sequencename,viewdirection,studytype,fieldofview,contrastAgent,numberseriesrelatedimages,manufacturermodel,stuParent,insertTimestamp) 
> VALUES ('2002-05-07 14:34:12.0', 'MR', '2', 
> '1.2.804.114118.1.20020507.143415.2812940098.1.1', 'SCRAPBOOK', '', 
> '006.000000E+00', 'b0_1000', 'HEAD', 'MEA', '261*261', '', 0, 'MAGNETOM 
> Harmony', '1.3.12.2.1107.5.2.5.10288.20020426150938000', '2002-09-17 
> 11:07:30.293');
> 
> via the JDBC3 beta driver for postgres 7.3b1 i get the following error.
> 
> 2002-09-17 11:07:30 [24588]  LOG:  query: INSERT INTO SERIES 
> (seriesDateTime,modality,seriesnumber,seriesinstanceuid,seriesdescr,bodypartexamined,slicethickness,sequencename,viewdirection,studytype,fieldofview,contrastAgent,numberseriesrelatedimages,manufacturermodel,stuParent,insertTimestamp) 
> VALUES ('2002-05-07 14:34:12.0', 'MR', '2', 
> '1.2.804.114118.1.20020507.143415.2812940098.1.1', 'SCRAPBOOK
> 2002-09-17 11:07:30 [24588]  ERROR:  parser: unterminated quoted string 
> at or near "'SCRAPBOOK" at character 349
> 2002-09-17 11:07:30 [24588]  LOG:  statement: INSERT INTO SERIES 
> (seriesDateTime,modality,seriesnumber,seriesinstanceuid,seriesdescr,bodypartexamined,slicethickness,sequencename,viewdirection,studytype,fieldofview,contrastAgent,numberseriesrelatedimages,manufacturermodel,stuParent,insertTimestamp) 
> VALUES ('2002-05-07 14:34:12.0', 'MR', '2', 
> '1.2.804.114118.1.20020507.143415.2812940098.1.1', 'SCRAPBOOK
> 
> it seems as if the SQL command was truncated.
> i added and removed some spaces to the command. it is always trunctated 
> ryt where the ' behind SCRAPBOOK is supposed to be.
> so it doesn't seem to be some fixed character number (i.e. due to some 
> undersizes buffer) after which the statment is truncated.
> the exact same programm/statment works on an IBM DB/2 db without 
> problems, btw.
> 
> I was wondering if this is maybe a known problem in the 7.3b1 release of 
> postgresql or the beta jdbc driver.
> 
> THX
> 
> mfg
> meyer
> 
> PS:
> 
> some additional information, maybe it is usefull.
> 
> table definition:
> CREATE TABLE 
> SERIES                                                            
> (                                                                               
> 
>        seriesdatetime          timestamp NOT 
> NULL,                                   modality                
> VARchar(16) NOT NULL,                                 
> seriesnumber            VARchar(12) NOT NULL,                          
>        seriesinstanceuid       VARchar(64) NOT 
> NULL,                                 seriesdescr             
> VARchar(64) ,                                         
> bodypartexamined        VARchar(16) ,                                  
>        slicethickness          numeric(30,6) 
> ,                                       sequencename            
> VARchar(16) ,                                         
> studytype               VARchar(16) ,                                  
>        viewdirection           VARchar(16) 
> ,                                         fieldofview             
> VARchar(32) ,                                         
> contrastAgent           VARchar(16) ,                                  
>        numberseriesrelatedimages     integer NOT 
> NULL,                               manufacturermodel       VARchar(64) 
> ,                                         stuParent               
> VARchar(64) NOT NULL,                                 
> insertTimestamp         timestamp NOT NULL                             );
> CREATE INDEX SERIES_SERIES_X ON SERIES (seriesinstanceuid);
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
>