To safely (as if pvc and air is totally safe lol) add fittings to pvc airguns, it is important to drill and tap the hole where a fitting overlaps the pipe. This will give a better number of threads and make it less prone to leaking and breakage. For reference, look at the three photos attached below.
The first step is to solvent weld the pipe to the fitting. When the cure time has been reached, drill the appropriate sized hole.
Second, deburr the hole and tap your threads.
Third, use pipe thread tape and attach your fitting. For a longer lasting attachment, use pvc compatible epoxy.
Hope that helps you make airtight connections between pvc pipe and fittings.