The New York State constitution bars public employers from slowing the rate at which workers build up their pensions over the course of their careers. That degree of protection contrasts sharply with the private sector, where companies can generally change the rate at which workers build their benefits at any time. Furthermore, as companies have reduced pensions substantially over the last two decades, states and cities have embellished theirs with sweeteners like inflation adjustments and lower retirement ages that appealed to unions and their members, who vote.

Police and other safety workers are in many cases allowed to retire with full pensions after 20 years. Other workers can often do so after 30 years, even as young as 55, although future hires in New York will have to work to age 62 to get their full benefits, under a law passed in January.

Census data from 2008 show that the typical state or municipal pension is substantially richer than the typical company pension — $15,941 versus $7,904 — for retirees aged 65 and older. By tradition, public employees have said they accepted lower salaries in exchange for better benefits, but the Census data show this has not been true for a number of years. In 2008 the median pay for a worker in the private sector was $39,877, compared with $45,124 for a state or local employee. The data show broad national aggregates that do not try to compare similar occupations.

And, while companies must adhere to uniform federal guidelines about setting aside money to pay pensions, states do not. Some, like New Jersey, have failed to fund their pensions for years and have fallen so far behind they may never catch up again. New York City and New York State have been more diligent about contributing the required amounts each year — but the required amounts now turn out to have been too low, in part because they counted on solid investment returns that have not materialized.

In Yonkers, contributions to the state pension fund keep rising. This year, to save money, the city is proposing to eliminate about 90 police jobs, out of 640. The savings, though, will not even cover the extra cost of the overtime-enriched pensions. Meanwhile, the police say the layoffs will make the situation worse, because shrinking the police force means those who remain must work even more overtime, driving up pension costs even more.

An online, searchable database compiled by The Times contains the names and pensions of about 3,700 public retirees in New York who receive more than $100,000 a year. Information was provided by New York State’s two big pension plans, one for teachers and the other for other state and local workers outside New York City.

Four of New York City’s five big pension funds also provided data. But the city police pension fund listed the six-figure amounts being collected by 536 retired police officers without giving their names. The pension plan for the city’s firefighters has yet to provide the information, as required by public information law.