Subject: DSO Terms Galore

From: "David E. Wheeler" <[email-masked]>
Date: Fri, 19 Jul 2024 15:27:49 -0400

Hackers,

I’m trying to understand the standard terms for extension libraries. There seem too a bewildering number of terms used to refer to a shared object library, for example:

* LOAD[1]:
  * “shared library”
  * “shared library file”
* dynamic_library_path[2]:
  * “dynamically loadable module”
* xfunc-c[3]:
  * “dynamically loadable object”
  * “shared library”
  * “loadable object”
  * “loadable object file”
  * “object file”
  * “dynamically loaded object file”
* pg_config[5]:
  * “object code libraries” (static?)
  * “dynamically loadable modules”
* PGXS[4]:
  * “MODULES”
  * “shared-library objects”
  * “shared library”

Bonus confusion points to PGXS for MODULEDIR having nothing to do with MODULES.

What is the standard term for these things? Or perhaps, what *should* it be? “Module”? “Library”? “Object”? “Shared ____”? “Dynamic ____”?

Would it be useful to decide on one term (perhaps with “file” appended where it refers to a file that contains one of these things) and standardize the docs?

Confusedly yours,

David

[1]: https://www.postgresql.org/docs/current/sql-load.html
[2]: https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-DYNAMIC-LIBRARY-PATH
[3]: https://www.postgresql.org/docs/current/xfunc-c.html
[4]: https://www.postgresql.org/docs/current/extend-pgxs.html
[5]: https://www.postgresql.org/docs/current/app-pgconfig.html

---

From: Nathan Bossart <[email-masked]>
Date: Fri, 19 Jul 2024 14:46:28 -0500

On Fri, Jul 19, 2024 at 03:27:49PM -0400, David E. Wheeler wrote:
> I´m trying to understand the standard terms for extension libraries.
> There seem too a bewildering number of terms used to refer to a shared
> object library, for example:
>
> [...] 
> 
> What is the standard term for these things? Or perhaps, what *should* it
> be? "Module"? "Library"? "Object"? "Shared ____"? "Dynamic ____"?
> 
> Would it be useful to decide on one term (perhaps with "file" appended
> where it refers to a file that contains one of these things) and
> standardize the docs?

The lack of consistent terminology seems at least potentially confusing for
readers.  My first reaction is that "shared library" is probably fine.

-- 
nathan

---

From: "David E. Wheeler" <[email-masked]>
Date: Fri, 19 Jul 2024 16:15:28 -0400

> readers.  My first reaction is that "shared library" is probably fine.

That’s the direction I was leaning, as well, but I thought I heard somewhere that the project used the term “module” for this feature specifically. That would be a bit nicer for the new PGXN Meta Spec revision I’m working on[1], where these three different types of things could be usefully separated:

* extensions: CREATE EXTENSION extensions
* modules: loadable modules for extensions, hooks, and workers (anything else?)
* apps: Programs and scripts like pg_top, pgAdmin, or pg_partman scripts[2]

Here the term “libraries” would be a little over-generic, and “share_libraries” longer than I'd like (these are JSON object keys).

Best,

David

[1]: https://github.com/pgxn/rfcs/pull/3
[2]: https://github.com/pgpartman/pg_partman/tree/master/bin/common