# Extension module\_pathname and .sql.in

DevFeed: [Extension module\_pathname and .sql.in](<https://devfeed.tech/articles/extension-module-pathname-and-sql-in-34415.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2011/05/extension-module_pathname-and-.sql.in/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2011-05-02T15:30:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Extension](<https://devfeed.tech/topics/extension.md>)

Tags: [compatibility](<https://devfeed.tech/tags/compatibility.md>), [extension](<https://devfeed.tech/tags/extension.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [scripts](<https://devfeed.tech/tags/scripts.md>)

## AI overview

This article discusses PostgreSQL extension packaging and the use of module_pathname instead of the older $libdir pattern in extension SQL scripts. It explains compatibility considerations across PostgreSQL versions, control-file properties, versioning, and upgrade scripts.

## Source excerpt

While currently too busy at work to deliver much Open Source contributions, let's debunk an old habit of PostgreSQL extension authors. It's all down to copy pasting from contrib, and there's no reason to continue doing $libdir this way ever since 7.4 days. Let's take an example here, with the prefix extension. This one too will need some love, but is still behind on my spare time todo list, sorry about that. So, in the prefix.sql.in we read