SAN FRANCISCO — The nation’s largest state bar association is overhauling ethics rules for attorneys for the first time in 30 years, and some lawyers are unhappy about a proposal that would open them up to discipline for having sex with clients.

California currently bars attorneys from coercing a client into sex or demanding sex in exchange for legal representation.

Supporters of an all-out ban say the relationship between a lawyer and client is inherently unequal, so any sexual relationship is potentially coercive. But some attorneys say it’s an unjustified invasion of privacy.

Opponents of the ban, including the Los Angeles County Bar Association’s ethics committee, say it’s unnecessary and would be struck down as an unconstitutional violation of fundamental privacy rights.

Still another change would bring California in line with other states by subjecting prosecutors to discipline for failing to turn over evidence they know or reasonably should know would help the defense.

The proposals are part of a long-awaited shake-up of the state bar association’s ethics rules for attorneys, which were last fully revised in 1987. Lawyers who violate the regulations are subject to discipline.