[gold-users] Error in gchproject after adding an object attribute

Scott Jackson scottmo at adaptivecomputing.com
Thu Feb 4 10:29:14 MST 2010


Have you restarted Gold after these changes? It appears you may have 
simply corrupted the cache after making these changes to the database 
directly instead of using the Gold interface.

Scott

Hazlewood, Victor Gene wrote:
>
> And the ShowUsage for Project Modify is the following: Hmmm, looks 
> like DisplayProject is missing from this list. That’s a clue…
>
> $ goldsh Project Modify ShowUsage:=True
>
> <Request action="Modify">
>
> <Object>Project</Object>
>
> [<Set name="Active" [op="Assign (Assign)"]>True|False (True)</Set>]
>
> [<Set name="Organization" [op="Assign (Assign)"]>{Organization}</Set>]
>
> [<Set name="GrantNumber" [op="Assign (Assign)"]>{}</Set>]
>
> [<Set name="AmieTransaction" [op="Assign|Inc|Dec (Assign)"]>{Integer 
> Number} (0)</Set>]
>
> [<Set name="AmieActive" [op="Assign (Assign)"]>True|False (False)</Set>]
>
> [<Set name="NccsProjectId" [op="Assign (Assign)"]>{}</Set>]
>
> [<Set name="SentToNccs" [op="Assign (Assign)"]>True|False (False)</Set>]
>
> [<Set name="Pi" [op="Assign (Assign)"]>{}</Set>]
>
> [<Set name="PrjType" [op="Assign (Assign)"]>{}</Set>]
>
> [<Set name="Fos" [op="Assign|Inc|Dec (Assign)"]>{Integer Number}</Set>]
>
> [<Set name="Description" [op="Assign (Assign)"]>{Description}</Set>]
>
> [<Where name="Name" [op="eq|ne|gt|ge|lt|le|match (eq)"] [conj="And|Or 
> (And)"] [group="<Integer Number>"]>{Project Name}</Where>]
>
> [<Where name="Active" [op="eq|ne (eq)"] [conj="And|Or (And)"] 
> [group="<Integer Number>"]>True|False</Where>]
>
> [<Where name="Organization" [op="eq|ne|gt|ge|lt|le|match (eq)"] 
> [conj="And|Or (And)"] [group="<Integer Number>"]>{Organization}</Where>]
>
> [<Where name="GrantNumber" [op="eq|ne|gt|ge|lt|le|match (eq)"] 
> [conj="And|Or (And)"] [group="<Integer Number>"]>{}</Where>]
>
> [<Where name="AmieTransaction" [op="eq|ne|gt|ge|lt|le (eq)"] 
> [conj="And|Or (And)"] [group="<Integer Number>"]>{Integer Number}</Where>]
>
> [<Where name="AmieActive" [op="eq|ne (eq)"] [conj="And|Or (And)"] 
> [group="<Integer Number>"]>True|False</Where>]
>
> [<Where name="NccsProjectId" [op="eq|ne|gt|ge|lt|le|match (eq)"] 
> [conj="And|Or (And)"] [group="<Integer Number>"]>{}</Where>]
>
> [<Where name="SentToNccs" [op="eq|ne (eq)"] [conj="And|Or (And)"] 
> [group="<Integer Number>"]>True|False</Where>]
>
> [<Where name="Pi" [op="eq|ne|gt|ge|lt|le|match (eq)"] [conj="And|Or 
> (And)"] [group="<Integer Number>"]>{}</Where>]
>
> [<Where name="PrjType" [op="eq|ne|gt|ge|lt|le|match (eq)"] 
> [conj="And|Or (And)"] [group="<Integer Number>"]>{}</Where>]
>
> [<Where name="Fos" [op="eq|ne|gt|ge|lt|le (eq)"] [conj="And|Or (And)"] 
> [group="<Integer Number>"]>{Integer Number}</Where>]
>
> [<Where name="Description" [op="eq|ne|gt|ge|lt|le|match (eq)"] 
> [conj="And|Or (And)"] [group="<Integer Number>"]>{Description}</Where>]
>
> [<Option name="ShowHidden">True|False (False)</Option>]
>
> [<Option name="ShowUsage">True|False (False)</Option>] </Request>
>
> *From:* gold-users-bounces at supercluster.org 
> [mailto:gold-users-bounces at supercluster.org] *On Behalf Of *Mike McCarty
> *Sent:* Monday, February 01, 2010 2:24 PM
> *To:* gold-users at supercluster.org
> *Subject:* [gold-users] Error in gchproject after adding an object 
> attribute
>
> Hi,
>
> I used the follow commands to add an attribute to our Project object.
>
> goldsh Attribute Create Object=Project Name=DisplayProject 
> DataType=Boolean DefaultValue=False
>
> Afterwards the project table looked like the following.
>
> gold=> \d g_project
> Table "public.g_project"
> Column | Type | Modifiers
> ---------------------+-------------------------+------------------------------------
> g_creation_time | integer | not null
> g_modification_time | integer | not null
> g_deleted | character varying(5) | default 'False'::character varying
> g_request_id | integer | not null
> g_transaction_id | integer | not null
> g_name | character varying(1024) |
> g_active | character varying(5) | default 'True'::character varying
> g_organization | character varying(1024) |
> g_special | character varying(5) | default 'False'::character varying
> g_description | character varying(1024) |
> g_grant_number | character varying(1024) |
> g_amie_transaction | integer | default 0
> g_amie_active | character varying(5) | default 'False'::character varying
> g_nccs_project_id | character varying(1024) |
> g_sent_to_nccs | character varying(5) | default 'False'::character varying
> g_pi | character varying(1024) |
> g_prj_type | character varying(1024) |
> g_fos | integer |
> g_display_project | character varying(5) | default 'False'::character 
> varying
> Indexes:
> "g_project_deleted_idx" btree (g_deleted)
> "g_project_name_idx" btree (g_name)
> "g_project_txnid_idx" btree (g_transaction_id)
>
> Then in the psql...
>
> Set g_display_project to the default for the existing records.
> update g_project set g_display_project = 'False';
>
> Set g_display_project to ‘True’ using the filter I had in my forms 
> project select query.
> update g_project set g_display_project = 'True' where <filtered for 
> specific projects>
>
> My problem is that I now get this in gchproject.
>
> bash-3.2$ gchproject -p TG-STA100003 -X AmieActive=True
> DBD::Pg::db do failed: ERROR: column "g_fos" is of type integer but 
> expression is of type character varying
> HINT: You will need to rewrite or cast the expression.
>
> Notice this was the last column before I added g_display_project. 
> Without looking at the source code, I would guess that there’s an 
> update SQL statement in the database abstraction layer that’s trying 
> to set a char to g_fos instead of g_display_project. Is there another 
> data structure that I need to update after adding the attribute? Or 
> what using psql directly a bad idea?
>
> Thanks,
> -mike
>
> Mike McCarty, HPC Software Developer
>
> National Institute for Computational Sciences (NICS)
> University of Tennessee
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users
>   



More information about the gold-users mailing list