I have a swimming pool in my backyard which is surrounded by a low fence. One of my neighbors told me that I have to build a sturdy fence that is at least ten tefochim (i.e. almost three feet) high just like one has to erect a sturdy fence around his roof. Is this true and if so do I make a brocho on it?
Your neighbor is correct. While the pasuk in Chumash only mentions the requirement to build a fence around one’s roof the Sifrei writes, “From the pasuk we would only know that there is a requirement to enclose a roof. From where do we know that one is required to enclose a cavity in the ground as well? It is derived from the words: “Lo sosim damim beveisecho (One must ensure that no one will perish from a hazard in his property).”
This is ruled by all the poskim as well. For example, the Rambam (Hilchos Rotseach 11, 4) writes, “One must erect a fence around a roof or any other dangerous object situated in his property that one can fall into and thereby perish. Therefore, one must erect a fence of ten tefochim or cover over, a well or a cavity in his property whether it contains water or not, in order to ensure that no one will fall into it and perish.” This is quoted verbatim by the Shulchan Aruch (427, 7) without a dispute.
Therefore, your neighbor is definitely correct in telling you that you must erect a sturdy ten tefach high fence, at the least, around your pool. In fact, these poskim mention that by erecting this fence you will be fulfilling an asei (of building a fence around a roof) and prevent yourself from violating a Torah prohibition, which you have been violating until now.
In a certain sense, the requirement to enclose a dangerous cavity is more prevalent than the requirement to enclose a roof. The Gemoro (Chulin 136A) derives from the Torah that one is not required to erect a fence around the roof of a shul. Many Acharonim write that this leniency applies only to the roof of a shul. However, if there is a cavity on the grounds of a shul, the shul must erect a fence around or cover over the cavity. This is ruled, for example, by the Devar Avrohom (1, 37) who explains that the reason the Torah does not require a fence around the roof of a shul is only because it is not commonly used. However, since people walk in the yard of a shul and therefore they may fall into a cavity situated in the shul’s yard, the shul must erect a fence around or cover over any cavity in its yard.
Similarly, the Rav Po’olim (Yoreh Deoh 2, 36; the responsa of the Ben Ish Chai) writes that a shul is required to erect a ten tefach high fence around a high (ten tefachim high) bimah in the shul since people can fall from it. The Divrei Chayim Lesholom (siman 243) writes similarly that a shul must construct a fence to prevent people from falling when climbing the stairs to a high Aron Hakodesh.
The question of making a brocho is a bit more complex. Even though almost all poskim agree, and it is the common practice, that one recites a brocho when erecting a fence around his roof, and, as we discussed, one is certainly required to construct a fence around his pool, the poskim dispute whether one recites a brocho when constructing a fence around a cavity.
The main proponent of the opinion that one does not recite a brocho is the Chaye Odom (15, 24). He writes (but he does not cite any source for his ruling) that even though one is required to construct a ten tefach sturdy fence around his cavities, one does not recite a brocho when doing so. He explains that only when one constructs a wall surrounding his roof, which is specifically mentioned in the pasuk as a positive command, does one recite a brocho. For all other actions which one must take in order to prevent danger, one does not recite a brocho since they are primarily done in order to avoid violating a lav-a negative precept. Similarly one does not recite a brocho when he refrains from eating treife food or avoids speaking loshon hora. It is true that when one fences in his cavity he fulfills a positive command as well, but the positive command is only secondary to the lav.
While there are some (e.g. the Netsiv in Ha’amek Sheilo, Sheilto 145, 17) who agree with the Chaye Odom, there are many who disagree. For example the Minchas Chinuch (Mitzvo 546) addresses this question and deduces from the Rambam (also Shulchan Aruch who quotes him) and the Chinuch, who group cavities together with roofs for the obligation to erect a fence, and record the requirement to remove or fence off any dangerous object separately, that the obligation to fence off cavities is equivalent to the obligation to fence-in roofs and both are full-fledged positive commandments.
The Ma’asei Rav (paragraph 100), which records the practical rulings of the Vilna Gaon, writes explicitly that one must erect a ten tefach high fence around a cavity and one recites a brocho when fencing in the cavity. Among others who agree with the Gro and Minchas Chinuch are the Devar Avrohom and the Eimek Brocho (Hilchos Ma’akeh).
The general rule by brochos is that when in doubt we don’t recite a brocho (except for benching, shemonah esrei and birchas hatora). Therefore, some write that it is better not to recite a brocho.
We should note that there is a second method to prevent people from falling into cavities, namely one can cover over the cavity (in case of a swimming pool this is not generally practical). There is an issue whether one makes a brocho if one employs this method. The Ben Ish Chai (Hilchos Makeh) and the Mishnas Eliyohu (Succo siman 4) write that when one employs this method one does not recite a brocho because when employing this method one is removing the hazard rather than rendering it guarded as one does when when fulfilling the Torah precept to erect a fence around his roof.
In conclusion, your neighbor is perfectly correct that you must construct a ten tefach high sturdy fence but whether you should recite a brocho is the subject of a dispute. Therefore, you can recite a brocho if you wish or refrain if you prefer. You should consult with a competent halachic authority about exactly where to construct the fence.