Your ancestor, Colonel Charles Jay Foster was reported a retired jeweler at the time of his death. [See the earlier posted San Francisco funeral home reference]
He married Mina Bauer on Saturday, March 23, 1889, in San Francisco, California. Sausalito News, Friday, March 29, 1889, p. 3, c. 6.
The engagement was announced in October, 1888; Charles was then the purchasing agent in Europe for Geo. W. Shreve & Co. See, Sausalito News, Friday, October 12, 1888, p. 3, c. 2.
Geo. ... Shreve & Co., aka Shreve & Co., is reported by today's Wikipedia as the "oldest commercial establishment" in San Francisco.
Charles J. Foster appears in various San Francisco Directories between 1889 (the time of his marriage) and 1880 (the date of the census entry about which you have inquired). (He probably appears in all the years, a few are listed below.)
At San Francisco in the 1880 U.S. census is one one Chas. J. Foster, age 30 [indexed as 20], b. New York. Link here to the FS index; partial snippet below from Ancestry. This Chas. J. Foster is enumerated as a lodger in what seems a boarding house. (Page and image is not in good shape; other than to say it doesn't seem to be "Pine," I can't make out the street.) Occupation is "merchant"; entry remarks that he is "out of the ?city."
SFgenealogy.com has other San Francisco information and directories online. There is probably a better way to navigate to it, but I used their page, "Index of ... Directory." to view images from Langley's 1879 San Francisco Directory.
- image 71 is the directory title page.
- image 403 (actual page is 333) has entry, Charles J. Foster, salesman, George C. Shreve & Co., r. 1122 Pine.
And ... they have the 1878 directory.
- image 86 is the title page
- image 414 (actual page is 330) has entry Charles J. Foster, salesman Anderson & Randolph, dwl NE cor Kearny and Post.
- (I couldn't quickly find an ad for Anderson & Randolph in the 1878 directory, but did find an ad for them in the 1879 publication. See the entry here: "Randolph & Co.: Jewelers," said "Successors to "Anderson & Randolph."
I guess this is a long way of saying your Charles J. Foster was probably enumerated at San Francisco in 1880; he may be the man in the census entry provided. He likely resided there at least by 1878.
Your Charles J. Foster does not seem to be the man in 1880 stationed at Wyoming.
Would think it is possible for you to keep "inching" him back to see when he stops appearing in the San Francisco directories.
Wikipedia, "Colonel (United States)" suggests this military rank, "became rare" in the period after the Civil War; also "many brevet colonels were appointed again during the Spanish American War, prominent among them Theodore Roosevelt and David Grant Colson."
Although I suspect news about the time of his engagement and marriage would be a more timely reference, information follows that might help you locate an obituary. Have also included a news item that refers to him as "Colonel Charles Jay Foster."
On the trail of the obituary:
With a 1929 death, there is at least a good chance the cemetery or mortuary has a copy of his obituary, or at least a newspaper reference.
Do you have a copy of his death certificate? The (early) California Death Index reports his state [death record] file number is 28738. See entry, Charles J. Foster (d. 9 May 1929); "California, Death Index, 1905-1939"; digital images, FamilySearch (accessed 2012), cites California State Registrar, California, Death Index; Office of the State Register; Sacramento, and the Butte County Courthouse, Oroville.
FindaGrave has memorial for him at Cypress Lawn Memorial Park, Coloma, San Mateo County, California,
Ancestry's collection of "San Francisco Area Funeral Home Records, 1895-1985," entry for "Charles Jay Foster" (dec'd 9 May 1929), reports the mortuary as N. Gray and Company; reports his occupation as "Retired Jeweler." More about this mortuary and records on www.sfgenealogy.com; http://www.sfgenealogy.com/sf/sfranlib.htm#researchity. (Seemed to me perhaps better luck with the cemetery.)
From the same funeral home, record for his widow, Mina (Bauer) Foster (d. 24 Oct 1943). Her parents John A. Bauer; Louise Hagen.
News item referring to family members; calls him Colonel Charles Jay Foster.
Here is one of the news items; a dramatic story of the shooting death of a young woman. Charles Jay Foster is called "Colonel Foster." The woman killed is, it seems, his wife's niece. Oakland Tribune, January 14, 1913.