Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TYfNz-0000Jp-1v for pgsql-bugs@postgresql.org; Wed, 14 Nov 2012 16:00:19 +0000 Received: from ecbiz115.inmotionhosting.com ([69.174.114.17]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TYfNt-0006uq-T6 for pgsql-bugs@postgresql.org; Wed, 14 Nov 2012 16:00:17 +0000 Received: from [173.200.119.18] (port=51640 helo=MattPC) by ecbiz115.inmotionhosting.com with esmtp (Exim 4.77) (envelope-from ) id 1TYfNq-0005HD-JS; Wed, 14 Nov 2012 11:00:11 -0500 From: "Matthew Kuss" To: Cc: References: <20121113231947.GA7849@depesz.com> In-Reply-To: <20121113231947.GA7849@depesz.com> Subject: Re: BUG #7657: Create Table doesn't create columns Date: Wed, 14 Nov 2012 10:00:08 -0600 Message-ID: <000f01cdc281$1ef20680$5cd61380$@rigminder.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQLb3/6VjRua/ELe1NB41nGVQ0qC5AGpnpF5lb/vOzA= Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ecbiz115.inmotionhosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - rigminder.com X-Source: X-Source-Args: X-Source-Dir: X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201211/69 X-Sequence-Number: 34627 Depesz - I'm fairly sure it's not a problem with something I'm doing wrong = because I've used the same code before. It has to be something wrong on = the DB side. But just to entertain you I did as you requested: RigMinder_NewDBTest02=3D# \d test Table "public.test" Column | Type | Modifiers --------+------+----------- RigMinder_NewDBTest02=3D# Before I ran this I created a table using the following: create table "test" ("column1" text, "column2" float); It ran without any errors. Yesterday after I sent out the help request I = uninstalled postgresql and installed version 9.0.10 and I'm having the = same problem. It does look like it only occurs when my logging package = is running. Ie if I shut it down, I can create tables in pgAdmin, but as = soon as my program is running, I get the errors described above. Any = other ideas on how to fix this?=20 Thanks for all the help! Matt -----Original Message----- From: depesz@depesz.com [mailto:depesz@depesz.com]=20 Sent: Tuesday, November 13, 2012 5:20 PM To: Matt@rigminder.com Cc: pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #7657: Create Table doesn't create columns On Tue, Nov 13, 2012 at 04:59:53PM +0000, Matt@rigminder.com wrote: > The following bug has been logged on the website: >=20 > Bug reference: 7657 > Logged by: Matt > Email address: Matt@rigminder.com > PostgreSQL version: 9.1.4 > Operating system: Windows Server Standard SP2 > Description: =20 >=20 > When I run the following statement, the table is created, but there=20 > are no > columns: >=20 > CREATE TABLE "mod_1237" ("Collecteddepth" float8 NOT NULL, = "Collectedtime" > float8 NOT NULL, "CollectedData" Varchar(45) NOT NULL, "Collectedpass" > float8 NOT NULL, "Collectedmodtime" float8 NOT NULL) WITH (OIDS =3D=20 > FALSE); >=20 > I know I'm not creating a primary key, but that shouldn't prevent the=20 > columns from being generated. When I run this code it also doesn't=20 > generate any errors so everything looks fine until I try to write to=20 > the table. Any ideas as to why this wouldn't work or how to make a=20 > table with the given columns? most likely you did insert like: insert into mod_1237 (Collecteddepth) values (...) i.e. you didn't quote = the column names. Hence the problem. In psql, you can do: \d mod_1237 and you will see the columns are there. Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact = with it. = http://depesz.com/