Which is the proper height of a barrier fence for an open hole ?

Which is the proper height of a barrier fence for an open hole ?