From: Michael Dutka Date: Fri, 14 Jun 1996 20:37:49 +0200 Subject: [PG95]: pg_atoi() problem on boolean f inserts during initdb To report a bug, please complete the following form and send it by email to postgres95@postgres95.vnet.net ============================================================================ POSTGRES95 BUG REPORT TEMPLATE ============================================================================ Your name : Michael Dutka Your email address : beagle@cs.tu-berlin.de System Configuration - --------------------- Architecture (example: Intel Pentium) : Intel P90 Operating System (example: Linux 1.3.42 ELF) : Linux 1.3.75 ELF Postgres95 version (example: Postgres95-1.01) : Postgres95-1.01 Compiler used (example: gcc 2.7.0) : gcc 2.6.3 Please enter a FULL description of your problem: - ------------------------------------------------ calling >initdb< renders to: initdb: verbose mode on initdb: using /usr/local/postgres95/data/files/local1_template1.bki initdb: using /usr/local/postgres95/data/files/global1.bki initdb: creating SHARED relations in /usr/local/postgres95/data initdb: creating template database in /usr/local/postgres95/data/base/template1 postgres -boot -C -Q template1 < /usr/local/postgres95/data/files/local1_template1.bki WARN:pg_atoi: error in "f": can't parse "f" initdb: could not create template database initdb: cleaning up. A sample line of the file local1_template1.bki looks like this: insert OID = 28 ( boolin 506 11 f t f 1 f 16 "0" 100 0 0 100 foo bar ) Seems that function pg_atoi() residing in src/backend/utils/adt/numutils.c got some problems to interpret a boolean f(alse). This is obvious because strtol("f", &badp, 10) (numutils.c:34) of course returns with an error. So I suppose pg_atoi() should not to be called on boolean fields. Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: - ---------------------------------------------------------------------- normal installation on a LINUX system. Should happen to anyone. If you know how this problem might be fixed, list the solution below: - --------------------------------------------------------------------- Sorry. - -------------------------------------------------------------------------------- Michael Dutka, TU-Berlin Theory means to know everything, but nothing works. beagle@cs.tu-berlin.de Practice means that everything works, but no one knows why. With me theory and practice are balanced: Nothing works and I don't know why. - --------------------------------------------------------------------------------