Re: [pgadmin-support] Cannot add an column of type serial or bigserial
Christopher Kings-Lynne wrote: > You cannot add a serial column after table creation time in PostgreSQL. But you can do the following from the query editor: ALTER TABLE table ADD column INTEGER; CREATE SEQUENCE table_column_seq; ALTER TABLE table ALTER column SET DEFAULT nextval('"table_column_seq"'::text); If you want the column to be NOT NULL as well, you will have to populate that column for all the rows and then do: ALTER TABLE table ALTER column SET NOT NULL; Ian > Chris > > David Sigeti wrote: > > > Dear Pgadmin Folks, > > > > I am using pgadminIII 1.0.2 with PostgreSQL 7.4 under W2K SP4 and Cygwin > > (current as of 2 or 3 weeks ago). The server is running locally. > > > > If I attempt to add an column of type serial or bigserial to a table, > > the operation fails with a message telling me that adding an column with > > a default value is not implemented. What is really weird is that one > > can, in fact, add a column with a default value, like an int4 with a > > default value or 0. The problem does not arise if the serial (or > > bigserial) column is created when the table is created (as a part of > > CREATE TABLE). > > > > Yours, > > David > > > > --- > > Dr. David E. Sigeti > > Phone: 505-667-9239 > > E-mail: [EMAIL PROTECTED] > > Surface mail: X-8, MS-F645, Los Alamos National Laboratory, > > Los Alamos, NM 87545 USA > > > > > > ---(end of broadcast)--- > > TIP 6: Have you searched our list archives? > > > > http://archives.postgresql.org > > ---(end of broadcast)--- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] > ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [pgadmin-support] mouse-free PgadminIII usage
Miernik wrote: Adding a server is possible without the mouse. But if I want to select a server from the servers list, it's impossible. The "Servers (1)" text is highlited, but pressing arrows or Tab doesn't do anything, there is no way to move the higlight down to a specific server. Is there any way I can do that? We got some focusing problem here. When putting the focus on the tree control (the selection changes from gray to blue), you can navigate the objects. Unfortunately, as soon as TAB is pressed, you don't have a chance to get it back. The reason for this is that some wx controls aren't designed to be focused at all. This is currently being changed, so we will come back on this topic as soon as the base is done. Regards, Andreas ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [pgadmin-support] database properties don't pop up
Michael Shapiro wrote: I downloaded the latest snapshot (20031209) for win32. When you right click on a database and ask for the properties, the dialog that normally appears (that would allow you to edit variable and security) does not appear. My recent GetDatabase() refactoring missed this Must have been to easy to implement for a database node :-) Fixed in cvs. Regards, Andreas ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [pgadmin-support] Cannot add an column of type serial or bigserial
David Sigeti wrote: Dear Pgadmin Folks, I am using pgadminIII 1.0.2 with PostgreSQL 7.4 under W2K SP4 and Cygwin (current as of 2 or 3 weeks ago). The server is running locally. If I attempt to add an column of type serial or bigserial to a table, the operation fails with a message telling me that adding an column with a default value is not implemented. What is really weird is that one can, in fact, add a column with a default value, like an int4 with a default value or 0. The problem does not arise if the serial (or bigserial) column is created when the table is created (as a part of CREATE TABLE). serial isn't a true datatype but a keyword that can be used only at creation time. Still, pgAdmin3 should create the commands necessary for this to make life easier; I added this as a TODO item. Regards, Andreas ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [pgadmin-support] Cannot add an column of type serial or bigserial
serial isn't a true datatype but a keyword that can be used only at creation time. Still, pgAdmin3 should create the commands necessary for this to make life easier; I added this as a TODO item. The problem will be recording the dependency properly in pg_depend... Chris ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [pgadmin-support] Cannot add an column of type serial or bigserial
Christopher Kings-Lynne wrote: serial isn't a true datatype but a keyword that can be used only at creation time. Still, pgAdmin3 should create the commands necessary for this to make life easier; I added this as a TODO item. The problem will be recording the dependency properly in pg_depend... That's no real problem, just an issue that should be thought of; thanks for mentioning. Regards, Andreas ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[pgadmin-support] Snake/CVS downtime
---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[pgadmin-support] Snake/CVS Downtime
I'll include the message this time... At 3:30PM GMT 10 Dec 2003 both snake.pgadmin.org and cvs.pgadmin.org will be shutdown whilst some electrical work is undertaken. We expect them to be available again by 5PM. Apologies for any inconvenience. Regards, Dave ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [pgadmin-support] Cannot add an column of type serial or
At 12:21 PM 12/10/2003 +0100, Andreas Pflug wrote: David Sigeti wrote: I am using pgadminIII 1.0.2 with PostgreSQL 7.4 under W2K SP4 and Cygwin (current as of 2 or 3 weeks ago). The server is running locally. If I attempt to add an column of type serial or bigserial to a table, the operation fails with a message telling me that adding an column with a default value is not implemented. What is really weird is that one can, in fact, add a column with a default value, like an int4 with a default value or 0. The problem does not arise if the serial (or bigserial) column is created when the table is created (as a part of CREATE TABLE). serial isn't a true datatype but a keyword that can be used only at creation time. Still, pgAdmin3 should create the commands necessary for this to make life easier; I added this as a TODO item. Adding this functionality would be great but I suggest that the error message be changed right away as it is seriously misleading. Thanks to everyone who took the time to help me out. Yours, David --- Dr. David E. Sigeti Phone: 505-667-9239 E-mail: [EMAIL PROTECTED] Surface mail: X-8, MS-F645, Los Alamos National Laboratory, Los Alamos, NM 87545 USA ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [pgadmin-support] Cannot add an column of type serial
David Sigeti wrote: At 12:21 PM 12/10/2003 +0100, Andreas Pflug wrote: David Sigeti wrote: I am using pgadminIII 1.0.2 with PostgreSQL 7.4 under W2K SP4 and Cygwin (current as of 2 or 3 weeks ago). The server is running locally. If I attempt to add an column of type serial or bigserial to a table, the operation fails with a message telling me that adding an column with a default value is not implemented. What is really weird is that one can, in fact, add a column with a default value, like an int4 with a default value or 0. pgAdmin breaks this into two steps for you; have a look at the SQL page. The problem does not arise if the serial (or bigserial) column is created when the table is created (as a part of CREATE TABLE). serial isn't a true datatype but a keyword that can be used only at creation time. Still, pgAdmin3 should create the commands necessary for this to make life easier; I added this as a TODO item. Adding this functionality would be great but I suggest that the error message be changed right away as it is seriously misleading. The error message originates from the backend. I agree that this might be confusing to newbies, who don't know that serial actually is int4 default nextval('...') (currently pgAdmin3 doesn't either :-) I'm forwarding this to pgsql-hackers. Regards, Andreas ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster