473,800 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pgAdmin III creates dud SQL for create table

I tried to use pgAdmin III to add a table to a database. Using the GUI
to add the fields it ended up creating SQL like this:

CREATE TABLE customer
(
id serial NOT NULL,
name "varchar"(8 0) NOT NULL,
balance "numeric"(1 0,2) NOT NULL DEFAULT 0
)
WITH OIDS;

However it won't execute the SQL it generates, and comes back with
"syntax error at or near "(" at character ...
If you remove the quotes from around varchar and numeric it works fine.

Tim
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
1 3326
Tim Penhey wrote:
I tried to use pgAdmin III to add a table to a database. Using the
GUI to add the fields it ended up creating SQL like this:

CREATE TABLE customer
(
id serial NOT NULL,
name "varchar"(8 0) NOT NULL,
balance "numeric"(1 0,2) NOT NULL DEFAULT 0
)
WITH OIDS;

However it won't execute the SQL it generates, and comes back with
"syntax error at or near "(" at character ...
If you remove the quotes from around varchar and numeric it works fine.

Tim


Forgot to mention, using Version 1.2.0 Beta 1 (Sep 8 2004)
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1193
by: Matthew T. O'Connor | last post by:
Saw this on newsforge.com just a few minutes ago. Go to www.pgadmin.org to get your copy. I just installed the windows version on a Win2k Terminal Server Box that several developers use, installed easy seems to work well, and looks nice. Contratualatios to all the PGAdmin developers on a job well done, finally a nice cross-platform gui postgresql admin tool!!! Matthew
1
2261
by: Együd Csaba | last post by:
Hi All, I've a problem using PGAdmin III. When I click on one of my functions the definition pane shows an empty function (with the correct header and footer but with no body). Pg_dump shows everything correctly. What can be the problem. My other problem is that PGAdmin won't handle '?' (euro) sign. It shows the previously correctly enterd data (by means of other tools) but it won't insert or update it in the correct way. It shows a '?'...
1
6642
by: mikew | last post by:
I am working at a company that has been using MS SQL Server, and we are going to be switching over to postgresql next week. (Getting off of Windows will be a relief!) I am very familiar with SQL Server's "Enterprise Manager", which is their GUI for accessing the db. I have been acquainting myself with pgAdmin. There are a number of things that I really like about pgAdmin, but there are a few things that SQL Server Enterprise manager can...
1
3424
by: MargaretGillon | last post by:
I am using PGADMIN III v1.1.0 Windows to set up PostgreSQL tables on a Linux Server, RedHat 9. Every time I create a character field, even just one character wide, the PGADMIN uses EXTENDED as the default storage type. Is this normal? I can't find anything about why this would be done in the PostgreSQL documentation or the Internet. It seems to me it will be very messy if every character field is in a secondary table. I would have thought...
2
2690
by: raptor | last post by:
In pgadmin3 I'm tring to add auto_inc column like this ALTER TABLE public.modems ADD COLUMN id serial; But get this error : NOTICE: ALTER TABLE will create implicit sequence "modems_id_seq" for "serial" column "modems.id" ERROR: adding columns with defaults is not implemented HINT: Add the column, then use ALTER TABLE SET DEFAULT.
2
1941
by: mmd | last post by:
I want to use pgadmin to set up some tables, rather than do all the psql statements from the terminal. When I try to add a server, though, pgadmin fails to connect, and asks whether the server is accepting TCP/IP connections on the default port, and whether localhost is the correct servername. I assume that both of these ARE set to the defaults, because if I simply type
1
1524
by: raptor | last post by:
hi, Is there a plans for pgadmin III to support editing the table data, not only view-ing it ? tia ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
0
1217
by: Laurent Duperval | last post by:
HI, I'm using pgadmin III 1.2.0 Post Beta 1 (Sept 17 2004). I used it to execute a SQL script that creates tables and inserts data. At the end, I get a message saying that everything went through correctly. However, when I try to view the data in the pgadmin window, nothing shows up. My backend is PG 8.0 Beta 2 on Windows 2000. Any ideas on what the problem could be?
1
124918
by: gocraig | last post by:
PG Admin Version 1.6.0 (Nov 15 2006, rev 5641) Running on Windows 2000 PostgreSQL 8.2.6, running remotely on Linux pg_hba.conf contains the record ... host all all 12.345.678.90 255.255.255.255 trust where 12.345.678.90 is the IP address that I am trying to connect from Database started with /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -o -i start
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10273
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10250
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.