Bug report

Поиск
Список
Период
Сортировка
От Denis N. Stepanov
Тема Bug report
Дата
Msg-id Pine.LNX.4.04.9911282236480.31038-100000@Tornado.inp.nsk.su
обсуждение исходный текст
Список pgsql-bugs
Errrgh... jolly@cs.berkeley.edu seems to be unexistent :(


Your name        : Denis N. Stepanov
Your email address    : D.N.Stepanov@inp.nsk.su


System Configuration
---------------------
  Architecture (example: Intel Pentium)      : Intel Pentium

  Operating System (example: Linux 2.0.26 ELF)     : Linux 2.0.37 ELF

  PostgreSQL version (example: PostgreSQL-6.5.3):   PostgreSQL-6.5.1

  Compiler used (example:  gcc 2.8.0)        : gcc 2.7.2.3

  Tcl/Tk version                                : 8.0


Please enter a FULL description of your problem:
------------------------------------------------

 An error statement issued when transactions rolls back is not seen
in pgtclsh/pgtksh scripts.


Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

Generally say, I don't think that this problem depends on particular
architecture, OS or even compiler.

1. Create test database:

     $> createdb test
     $>

2. Enter into it and create test table:

     $> psql test
     Welcome to the POSTGRESQL interactive sql monitor:
     Please read the file COPYRIGHT for copyright terms of POSTGRESQL
     [PostgreSQL 6.5.1 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3]

        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: test

     test=> CREATE TABLE test (value int2);
     CREATE
     test=> \q
     $>

3. Create test script with invalid insertion:

     $> cat >test.pgtclsh
     set DBhandle [pg_connect test]
     pg_result [pg_exec $DBhandle "insert into test values (100000)"] -clear
     pg_disconnect $DBhandle
     ^D
     $>

4. Execute it:

     $> pgtclsh test.pgtclsh
     $>

As you will see, this script executes succesfully, though no lines will be
inserted actually. Invoking the same insert statement directly in psql causes
the following message:

     ERROR:  i4toi2: '100000' causes int2 overflow

So, inside the script I can't determine whether operation succeded or not.


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

The latest distribution of Postgres (6.5.3) behaves similarly. But
pgtclsh/pgtksh in 6.3.2 distribution in exactly the same situation fails with
the following error message:

     ERROR:  i4toi2: '100000' causes int2 overflow

         while executing
     "pg_exec $DBhandle "insert into test values (100000)""
         invoked from within
     "pg_result [pg_exec $DBhandle "insert into test values (100000)"]..."
         (file "test.pgtclsh" line 2)

Even if it is not a bug, I don't like such difference between distributions,
and this is the thing that keeps me from upgrading to 6.5.x. All my program
stuff is used to catch such errors from a database.

Please, send me a reply for my awareness of your opinion.

Sorry for English mistakes, if any.

             Sincerely,
                    Denis N. Stepanov
                    BINP SB RAS, Novosibirsk, Russia.



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] Postgresql on Ultraparc/Linux , Bug report and patch!
Следующее
От: "Emils Klotins"
Дата:
Сообщение: Backend dies upon UPDATE of DATE field with CASE WHEN, 6.5.3