Thread: Potential bug

Potential bug

From
James Vinett
Date:
To whom it may concern:

I tried to create a new table with the following statement:

    CREATE TABLE
        "bit" (
        provider_name varchar
        );



I got the error message:

ERROR:  TypeCreate: type bit already defined



According to your documentation 'PosetgreSQL 7.1 User's Guide' on page 2
it states:

A delimited identifier (or qouted identifier) is always an identifier,
never a key word. So "select" could be used to refer to a column or
table named select, whereas an unquoted select would be taken as a key
word and would therefore provoke a paser error when used where a table
or column name is expected.

It then goes further to state in 'PostgreSQL 7.1 Reference Manual' on
page 54 the syntax for CREATE TABLE:


CREATE [ TEMPORARY | TEMP ] TABLE table (
    column type
[ NULL | NOT NULL ] [ UNIQUE ] [ DEFAULT value ]
    [column_constraint_clause | PRIMARY KEY } [ ... ] ]
    [, ... ]
    [, PRIMARY KEY ( column [, ...] ) ]
    [, CHECK ( condition ) ]
    [, table_constraint_clause ]
    ) [ INHERITS ( inherited_table [, ...] ) ]


Is this exception that is being thrown correct?  If so you should state
that 'types' are excluded from the 'qouted identifier' rule.   Futher
more the exception makes it sound like I'm trying to CREATE TYPE, which
i am not.

james vinett

PG_DUMP Load

From
"Mike Rogers"
Date:
I seem to be having a problem with the pg_dump command on the Linux 2.2.x
operating system.  I have found that in doing a 425MB dump via TCP/IP over a
network, I receive up to 90.00 load on the dual P2 and dual P3 servers from a
start of 0.25 or so.  This is a gradule increase in load peaking up there, but
still this is completely unacceptable from a systems perspective.  Why is the
load going so high?  Why is this putting such stress on the system?  Why
doesn't this happen on load backups (which only peak up around 1.3 or so).
The server appears unresponsive during these times and processes time out and
fail.

Has anyone else has similar problems with pg_dump 7.1.3?
--
Mike

Re: Potential bug

From
Tom Lane
Date:
James Vinett <james@imdstrading.com> writes:
> ERROR:  TypeCreate: type bit already defined

This is neither a bug nor a keyword conflict.

A table has a datatype of the same name associated (the composite type
corresponding to its rowtype).  So, when you try to create table "bit"
that means creating type "bit" too.  But there already is one.

In 7.3 this issue will be considerably alleviated because the predefined
datatypes will live in a different schema (namespace) than user-defined
datatypes do.  But you'll still get burnt if you make a datatype "foo"
and then try to create a table "foo".

            regards, tom lane