Flags are particularly important at sea, where they can mean the difference between life and death, and consequently where the rules and regulations for the flying of flags are strictly enforced. Flags (and pennants) are flown for signalling and for identification.
Ensigns are usually required to be flown when entering and leaving harbour, when sailing through foreign waters, and when the ship is signalled to do so by a warship. Warships usually fly their ensigns between the morning colours ceremony and sunset, when underway, and at all times when engaged in battle.
A Commodore is entitled to a broad pennant, i.e. a short swallow-tailed pennant. Admirals fly rectangular rank flags: an Admiral of the Fleet flies a Union Jack, while an Admiral flies the St George's Cross. The flags of Vice-Admirals and Rear-Admirals, as well as the masthead and broad pendants, are based on the St George's Cross.
The Senior Officer Present Afloat Pennant is green on the hoist and fly with a white field between.
The Church Pennant has a field divided horizontally red over white over blue, bearing the red cross of St George on a white field at the hoist.
The Gin Pennant means that the Wardroom invites Officers
from ships in company to drinks. The origins of the Gin Pennant are uncertain but it seems to have been used since the 1940s and probably earlier. Originally it was a small green triangular pennant measuring approximately 18 inches by
9 inches, defaced with a white wine glass. Its colour, size and position when hoisted were all significant as the aim was for the pennant to be as inconspicuous as possible, therefore having less ships sight it and subsequently accept the invitation for drinks.