Thread

  1. Postgres 7.3b1 + JDBC3 (2002-09-05) truncates SQL commands?

    H. Meyer <nospaming@gmx.net> — 2002-09-17T12:01:22Z

    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);
    
    
    
    
    
  2. Re: [GENERAL] Postgres 7.3b1 + JDBC3 (2002-09-05) truncates SQL

    Barry Lind <barry@xythos.com> — 2002-09-18T17:08:14Z

    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
    > 
    
    
    
  3. Re: [GENERAL] Postgres 7.3b1 + JDBC3 (2002-09-05) truncates SQL

    Oliver Jowett <oliver@opencloud.com> — 2002-09-18T22:22:54Z

    I've seen something like this -- it was due to an embedded null (\0) in a
    string value being inserted (presumably at the end of 'SCRAPBOOK', here)
    which the JDBC driver doesn't escape and the backend appears to treat as
    "end of query string". Took me a while to find as printing Strings doesn't
    show nulls!
    
    I experimented with escaping it in the driver, but it looks like the backend
    doesn't support embedded nulls in TEXT either? (the stored value is silently
    truncated at the null).
    
    -O
    
    On Wed, Sep 18, 2002 at 10:08:14AM -0700, Barry Lind wrote:
    > 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
    
    [...]
    
    
  4. Re: Postgres 7.3b1 + JDBC3 (2002-09-05) truncates SQL commands?

    Neil Conway <neilc@samurai.com> — 2002-09-23T22:44:58Z

    "H. Meyer" <nospaming@gmx.net> writes:
    > 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.
    
    [ ...]
    
    > it seems as if the SQL command was truncated.
    
    Can anyone confirm this?
    
    Cheers,
    
    Neil
    
    -- 
    Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC