Thread

  1. PostgreSQL bug in UPPER

    Michael Richards <026809r@dragon.acadiau.ca> — 1998-03-10T22:04:52Z

    Hi:
    
    Little bug causes postgres to die:
    sc=> select count(*) from urlcont where (UPPER(url) LIKE '%APOLLO%');
    Field| Value
    -- RECORD 0 --
    count| 1
    (1 row)
    
    sc=> select count(*) from urlcont where (UPPER(content) LIKE '%APOLLO%');
    FATAL 1:  palloc failure: memory exhausted
    sc=> select count(*) from urlcont where (UPPER(url) LIKE '%APOLLO%');
    Broken pipe
    bash$ psql -x sc
    Welcome to the POSTGRESQL interactive sql monitor:
      Please read the file COPYRIGHT for copyright terms of POSTGRESQL
    
       type \? for help on slash commands
       type \q to quit
       type \g or terminate with semicolon to execute query
     You are currently connected to the database: sc
    
    sc=> select count(*) from urlcont where (UPPER(url) LIKE '%APOLLO%');
    Field| Value
    -- RECORD 0 --
    count| 1
    (1 row)
    sc-> \d urlcont
    
    Table    = urlcont
    +----------------------------------+----------------------------------+-------+
    |              Field               |              Type                |
    Length|
    +----------------------------------+----------------------------------+-------+
    | url                              | varchar()                        |
    256 |
    | pos                              | int4                             |
    4 |
    | content                          | varchar()                        |
    1024 |
    +----------------------------------+----------------------------------+-------+
    
    
    Also, I suppose I should get on the postgres mailing list. You prolly
    already have this done, so if you have a procmail filter set up for the
    list, could you please clip it out and send it to me?
    
    thanks
    -Mike