Skip site navigation (1) Skip section navigation (2)

Bug in pg_dump?!

From: "Michael Leun" <ml(at)newton(dot)lahn(dot)de>
To: "pgsql-bugs" <pgsql-bugs(at)postgresql(dot)org>
Subject: Bug in pg_dump?!
Date: 1998-12-29 22:06:29
Message-ID: 75209645@newton.lahn.de (view raw or flat)
Thread:
Lists: pgsql-bugs
Hello,


Your name		: Michael Leun	
Your email address	: ml(at)newton(dot)lahn(dot)de


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

  Operating System (example: Linux 2.0.26 ELF) 	: Linux 2.0.36 ELF (SuSE 6.0)

  PostgreSQL version (example: PostgreSQL-6.4)  :   PostgreSQL-6.4

  Compiler used (example:  gcc 2.8.0)		: gcc egcs-2.91.6


Please enter a FULL description of your problem:
------------------------------------------------
Bug in pg_dump(?), notice the results of the 'select * from t2;' statements
in the following typescript:

ml(at)lara:~ > createdb test
ml(at)lara:~ > psql test
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: test

test=> select version();
version
------------------------------------------------------------------
PostgreSQL 6.4.0 on i586-pc-linux-gnu, compiled by gcc egcs-2.91.6
(1 row)

test=> create table t1 (value float4, factor float4);
CREATE
test=> insert into t1 values(100,.6);
INSERT 2496394 1
test=> create view t2 as select value * (1-factor) from t1;
CREATE
test=> select * from t2;
        ?column?
----------------
39.9999976158142
(1 row)

test=> \q
ml(at)lara:~ > pg_dump test >test.dp
ml(at)lara:~ > createdb test1
ml(at)lara:~ > psql -e test1 <test.dp
CREATE TABLE "t1" ("value" "float4", "factor" "float4");
QUERY: CREATE TABLE "t1" ("value" "float4", "factor" "float4");
CREATE
CREATE TABLE "t2" ("?column?" "float8");
QUERY: CREATE TABLE "t2" ("?column?" "float8");
CREATE
COPY "t1" FROM stdin;
QUERY: COPY "t1" FROM stdin;
CREATE RULE "_RETt2" AS ON SELECT TO "t2" DO INSTEAD SELECT "value" * "float8"('1'::"int4") - "factor" FROM "t1";
QUERY: CREATE RULE "_RETt2" AS ON SELECT TO "t2" DO INSTEAD SELECT "value" * "float8"('1'::"int4") - "factor" FROM "t1";
CREATE
EOF
ml(at)lara:~ > psql test1
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: test1

test1=> select * from t2;
        ?column?
----------------
99.3999999761581
(1 row)

test1=> \q
ml(at)lara:~ > 


Maybe this is one of the pg_dump bugs already fixed in 6.4.2?!

-- 
Best Regards,

Michael Leun

pgsql-bugs by date

Next:From: Ernst MolitorDate: 1998-12-31 11:34:11
Subject: Minor problem with Solaris-2.5/SPARC-1/gcc-2.8.1
Previous:From: andreaDate: 1998-12-23 15:13:59
Subject:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group