Обсуждение: Error adding new column to existing table.

Поиск
Список
Период
Сортировка

Error adding new column to existing table.

От
Ted Taylor
Дата:

Short version: using the “Add Column” GUI on an existing table puts double quotes around the datatype, and won’t run.

 

Long version:

Using pgAdmin III Version 1.2.0 Beta 1 (Sep  8 2004) on Windows 2000, fully patched from Windows Update site.  Connecting to PostgreSQL 7.4.5 on Fedora Core 2 (select version() reports “"PostgreSQL 7.4.5 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)")

 

Opened “Servers” à <my server name> à “Databases” à <my database name> à “Schemas” à “public” à “Tables” and single-clicked on my table name to highlight it.

Right clicked on the table name and chose “Properties”.

 

The Table dialog box has “Properties” “Columns” “Constraints” “Privileges” and “SQL” tabs; clicked on “Columns”.

Clicked on the “Add”  button at the bottom.

 

In the New Column dialog box, I entered:

            Name=      user_surname

            Datatype=         varchar

            Length=            80

I left all other available properties “Default Value” “Not Null” “Statistics” and “Comment” at the default of blank.

 

Clicked OK to close the New Column dialog box.

 

>>> Back on the Table à Columns dialog box, I notice the keyword “varchar” has double quotes around it.  Other datatypes such as “int4” do not have double quotes around it.

 

On the Table dialog box, click OK.  I receive an error message ERROR: syntax error at or near “(“ at character 67.

 

I clear the error and go to the Table à SQL tab.  I have copied its SQL here:

 

ALTER TABLE <my table name> ADD COLUMN user_surname "varchar"(80);

 

I removed the double quotes around varchar, and executed the SQL directly, with no errors.

 

Thanks,

Ted Tayloor

ted.taylor@aircanada.ca

 

Re: Error adding new column to existing table.

От
"Dave Page"
Дата:
 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Ted Taylor
Sent: 16 September 2004 21:51
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Error adding new column to existing table.

Short version: using the “Add Column” GUI on an existing table puts double quotes around the datatype, and won’t run.

 

Hi Ted,

 

I'm surprised it didn't work with the quotes to be honest, but that aside, theres a known quoting bug in beta1 that has been fixed for beta2 that almost certainly caused this. It should also be fixed in the latest snapshot at http://pgadmin.postgresql.org/snapshots/win32/ if you wish to upgrade to that.

 

Thanks for the email though - a textbook example of the perfect bug report; I wish they were all like that!

 

Regards, Dave

Re: Error adding new column to existing table.

От
Ted Taylor
Дата:

Hi Dave,

 

Thank you for your quick response.

 

I downloaded pgAQdmin III “Version 1.2.0 Post Beta 1 (Sep 16 2004)” and I confirm that my original bug report has been fixed.  The GUI does not add the quotes to the datatype, and the column is added.

 

…BUT…

 

(and I realize the SEP 16 snapshot is exactly that, a work-in-progress, not ready for prime time.  So take this new bug report with the usual grain of salt)

 

Short version:

(continuing the exact sequence of events from my previous report) After adding the new column successfully, I cannot successfully re-right-click the same table name.

 

 

Long version:

Using pgAdmin III Version 1.2.0 Post Beta 1 (Sep  16 2004) on Windows 2000, fully patched from Windows Update site.  Connecting to PostgreSQL 7.4.5 on Fedora Core 2 (select version() reports “"PostgreSQL 7.4.5 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7)")

 

Opened “Servers” à <my server name> à “Databases” à <my database name> à “Schemas” à “public” à “Tables” and single-clicked on my table name to highlight it.

Right clicked on the table name and chose “Properties”.

 

The Table dialog box has “Properties” “Columns” “Constraints” “Privileges” and “SQL” tabs; clicked on “Columns”.

Clicked on the “Add”  button at the bottom.

 

In the New Column dialog box, I entered:

            Name=      user_surname

            Datatype=         varchar

            Length=            80

I left all other available properties “Default Value” “Not Null” “Statistics” and “Comment” at the default of blank.

 

Clicked OK to close the New Column dialog box.  On the Table dialog box, click OK.  The column has been successfully added (The only “transaction” I did was to scroll the bottom-right corner of the window that shows the CREATE TABLE command, and the new column is shown.  I did not click anywhere else except that scrollbar).

 

NOW, on the left hand side, I re-right-clicked on the same table name (eg if I wanted to add another new column name).  pgAdmin abruptly closes with no error messages at all (the app exits, no GPF, no Illegal Operation, no BSOD, no nothing).  The expected context menu that normally appears, did not appear.

 

 

Thanks,
Ted.

 

PS: Would you like me to revert to “Beta 1 Sep 8 2004”, in case I discover more bugs?  Or should I stay on the Sep 16 snapshot for any bug reports.  Note I am not asking about whether the snapshot will corrupt my database; that’s my decision and my responsibility.  My question is solely from the bug-reports-for-pgAdminIII, which version would *you* prefer?

 

-----Original Message-----
From: Dave Page [mailto:dpage@vale-housing.co.uk]
Sent: Friday, September 17, 2004 3:26 AM
To: Ted.Taylor@aircanada.ca; pgadmin-support@postgresql.org
Subject: RE: [pgadmin-support] Error adding new column to existing table.

 

 

 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Ted Taylor
Sent: 16 September 2004 21:51
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Error adding new column to existing table.

Short version: using the “Add Column” GUI on an existing table puts double quotes around the datatype, and won’t run.

 

Hi Ted,

 

I'm surprised it didn't work with the quotes to be honest, but that aside, theres a known quoting bug in beta1 that has been fixed for beta2 that almost certainly caused this. It should also be fixed in the latest snapshot at http://pgadmin.postgresql.org/snapshots/win32/ if you wish to upgrade to that.

 

Thanks for the email though - a textbook example of the perfect bug report; I wish they were all like that!

 

Regards, Dave

Re: Error adding new column to existing table.

От
"Dave Page"
Дата:
 


From: Ted.Taylor@aircanada.ca [mailto:Ted.Taylor@aircanada.ca]
Sent: 17 September 2004 14:52
To: Dave Page; pgadmin-support@postgresql.org
Subject: RE: [pgadmin-support] Error adding new column to existing table.

Hi Dave,

 

Hi Ted,

 

Thank you for your quick response.

 

Your welcome.

 

NOW, on the left hand side, I re-right-clicked on the same table name (eg if I wanted to add another new column name).  pgAdmin abruptly closes with no error messages at all (the app exits, no GPF, no Illegal Operation, no BSOD, no nothing).  The expected context menu that normally appears, did not appear.

 

I can't reproduce that here, however it does sound like it might be the 'find focus' bug that was worked around yesterday.

 

PS: Would you like me to revert to “Beta 1 Sep 8 2004”, in case I discover more bugs?  Or should I stay on the Sep 16 snapshot for any bug reports.  Note I am not asking about whether the snapshot will corrupt my database; that’s my decision and my responsibility.  My question is solely from the bug-reports-for-pgAdminIII, which version would *you* prefer? 

 

Bug reports should always come from the latest snapshot where possible (you can install and run multiple versions at once BTW - the settings will be shared, but the code is self contained as long as you install in a different directory). I can email you a copy of the build I have if you want to re-test the bug above?

 

Regards, Dave.

Re: Error adding new column to existing table.

От
Andreas Pflug
Дата:
Dave Page wrote:

>      
> 
>     NOW, on the left hand side, I re-right-clicked on the same table
>     name (eg if I wanted to add another new column name).  pgAdmin
>     abruptly closes with no error messages at all (the app exits, no
>     GPF, no Illegal Operation, no BSOD, no nothing).  The expected
>     context menu that normally appears, did not appear.
> 
>      
> 
> I can't reproduce that here, however it does sound like it might be the 
> 'find focus' bug that was worked around yesterday.

I located another bug (invalid current node after editing an object) an 
hour ago, might be that one.
Recheck with cvs version or the 2004-09-17 snapshot (upload tonight).

Regards,
Andreas


Re: Error adding new column to existing table.

От
Ted Taylor
Дата:
Andreas, Dave,

It is fixed in the executable that Dave sent me [Version 1.2.0 Post Beta 1
(Sep 17 2004)].  I will also download the snapshot when it becomes
available.

Thanks!
Ted.

-----Original Message-----
From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] 
Sent: Friday, September 17, 2004 10:40 AM
To: Dave Page
Cc: Ted.Taylor@aircanada.ca; pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Error adding new column to existing table.

Dave Page wrote:

>      
> 
>     NOW, on the left hand side, I re-right-clicked on the same table
>     name (eg if I wanted to add another new column name).  pgAdmin
>     abruptly closes with no error messages at all (the app exits, no
>     GPF, no Illegal Operation, no BSOD, no nothing).  The expected
>     context menu that normally appears, did not appear.
> 
>      
> 
> I can't reproduce that here, however it does sound like it might be the 
> 'find focus' bug that was worked around yesterday.

I located another bug (invalid current node after editing an object) an 
hour ago, might be that one.
Recheck with cvs version or the 2004-09-17 snapshot (upload tonight).

Regards,
Andreas


Air Canada offers the most non stop flights between Canada and     
South America, including Lima, Peru, effective November 1st, 2004.
                                                                              
 
Air Canada offre le plus grand nombre de vols sans escale entre le 
Canada et l'Am�rique du Sud, incluant Lima, P�rou en vigueur le 1er
novembre, 2004.                                                    


------------------- Air Canada Disclaimer/Avertissement -------------
This email and any files transmitted with it are privileged, confidential, and intended solely for the use of the
individualor entity to whom they are addressed.  Views expressed are those of the author and not necessarily those of
AirCanada or its subsidiaries.  Any unauthorized use or disclosure is prohibited.  Please notify the sender if you have
receivedthis email in error. Thank you for your co-operation.
 

Le pr�sent courriel et, s'il y a lieu, ses pi�ces jointes constituent des renseignements confidentiels et destin�s au
seulusage de leurs destinataires, qu'il s'agisse de particuliers ou d'organismes. Les opinions qui y sont exprim�es
sontcelles de l'auteur et ne correspondent pas n�cessairement � celles d'Air Canada ou de ses filiales. Il est interdit
d'utiliserou de divulguer ces renseignements sans autorisation. Si vous avez re�u ce courriel par erreur, veuillez
communiqueravec son exp�diteur. Nous vous remercions de votre collaboration.
 
---------------------------------------------------------------------



Error adding columns to existing tables

От
derrick@grifflink.com
Дата:
I am running PGAdminIII Version 1.2.0 Post Beta 1 (Sept 16 2004) on Windows XP.  Connecting to postgres 7.4.
 
When we navigate to the table name, click on properties, add a new column.  All works well, the column is added.  Then click on properties again and the application crashes.
 
Thanks for the great work,
Derrick