For many things it's simple enough to read the code, did this e.g. for the Configuration system in ASP.NET Core. Dunno, if I could do this with postgres.
Combine that with maybe the info you are looking for actually is in the docs, but it's sprinkled across loads of examples so it's hard to find or build a comprehensive understanding of.