In the not-too-distant past, a government job all but guaranteed a comfortable retirement. Sure, the salaries are rarely as good as you might get in the public sector, but where else could you work for 30 years or so and then retire with guaranteed income for the rest of your life?
Is this still the case? With many pension plans struggling financially, government workers are gradually being shifted away from defined-benefit plans like pensions into more common retirement plans like 401(k)s.
So how do today's government retirement plans compare with what workers can expect from the private sector?

Image source: Getty Images.
Pensions: Do they still exist?
Yes, but they're not as prevalent as they used to be. And they might not be around at all for too much longer, considering that many pension plans are insolvent or close to it.
In fact, according to a recent report by Moody's, the largest 25 public pension systems in the U.S. have about $2 trillion in underfunded liabilities.
Government retirement plans today
Most government employees still have the option of a pension plan, but many plans have different conditions than they did in past years. Some require more years of service before the employee is considered to be "full retirement age" or fully vested in the plan. Some require contributions from employees, whereas in the past, they were funded solely by the employer.
For example, the Florida Retirement System has made some of these changes in recent years. For its pension plan, the state has changed the vesting requirement (the length of time before workers are entitled to a pension benefit) from six years to eight. The FRS also raised its "normal retirement" age and required years of service, which an employee must reach in order to receive full retirement benefits, by three years each. Employees are also now required to contribute 3% of their salary to the plan. Up until a couple of years ago, the employer was responsible for the full contribution.
As with many public plans, there is an alternative "investment plan" that functions much like a 401(k). In order to incentivize this plan for new employees, contributions are vested after just one year, and there is no minimum number of years of service for a full retirement. Your retirement benefit is simply based on the amount of money in your account when you decide to leave.
Many state and local governments have done away with their pension plans altogether or are in the process of doing so, like Florida is. For example, one California county is attempting to do away with taxpayer-funded pensions; if that's successful, it could start a trend throughout the state.
For now, federal government employees still have a pension plan and the Thrift Savings Plan.
Government "investment" plans
The alternatives many government agencies offer are definitely not as good as a pension (guaranteed income for the rest of your life), but they are still pretty good retirement plans offering generous employer-matching programs. For example, the aforementioned Florida plan requires a 3% employee contribution, and the employer contributes 3.3% of the employee's salary, so the match rate is actually more than 100%.
Some states require higher contribution amounts. South Carolina requires employees to contribute 8% of their salary regardless of whether they choose the pension plan or the investment plan, but it also provides a 5% matching contribution. So 13% of an employee's salary goes toward retirement savings each year, which could really add up over time.
What's normal for the private sector?
According to a recent Washington Post article, the average U.S. employer (public or private) contributes 4.5% of an employee's salary toward retirement. However, it's tough to say what's "normal" for the private sector, as there is so much variation in retirement benefits.
Most companies will match a certain percentage of employee contributions, and some will contribute a predetermined percentage no matter what the employee decides to do. Contribution matches between 50% and 100% seem to be the most common, up to a certain percentage of salary.
Some private-sector companies are exceedingly generous with their retirement plans. Conoco Phillips requires employees to save just 1% of their pay and contributes 9% of that employee's salary to the 401(k) -- that's a 900% match for those who contribute the minimum. And Visa contributes 6% of its employees' salaries even if they choose to contribute nothing at all.
On the other hand, some companies seem downright stingy. A recent survey by Schwab found that 10% of companies don't offer any employee match. Amazon.com matches just 2% of pay, and Facebook, which has no employee matching, finished dead last in Bloomberg's 401(k) rankings.With a government job, you at least know you'll get some sort of employer-funded retirement contribution.
Is a cushy retirement still one of the perks of government jobs?
It's tough to say whether or not government "investment" retirement plans are still superior to their private-sector counterparts. But many still offer some sort of pension (for now), so the actual quality of the retirement plan varies from job to job.
When choosing to take a government job, there are a lot of things to take into consideration, and the retirement plan is definitely one of them. And although an investment plan with a generous match doesn't offset a lower salary quite as much as a pension does, it can still be a pretty nice perk of the job.