GitXplorerGitXplorer
t

test-extension-directory

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
71a3e584fd07f17edf8e3e1803f34269c51e778f

Link to fix

ttheory committed a year ago
Verified
81d771c444ae9466b42cd3eae34cb54bf8f8e96c

The fix

ttheory committed a year ago
Verified
6ad4e7f696134835835b6168a4d2e240541fb6c5

Describe the issue

ttheory committed a year ago
Verified
a4c420c715ffdf5c0ef072e7073672f1ddb719a8

Actual output

ttheory committed a year ago
Verified
e48f1869aa313cbb289c76ffd3f97e4f229d7c56

Repo to with test case for directory bug

ttheory committed a year ago

README

The README file for this repository.

Testing Postgres Extension Directory

A simple test case for this bug report. Not actually a bug, though; see the fix below.

Actual output:

$ make install
gmkdir -p '/data/pgsql/share/extension'
gmkdir -p '/data/pgsql/share/extension'
ginstall -c -m 644 .//click.control '/data/pgsql/share/extension/'
ginstall -c -m 644 .//sql/click--1.0.0.sql  '/data/pgsql/share/extension/'

Expected output:

$ make install
gmkdir -p '/data/pgsql/share/extension/click'
gmkdir -p '/data/pgsql/share/extension/click'
ginstall -c -m 644 .//click.control '/data/pgsql/share/extension/'
ginstall -c -m 644 .//sql/click--1.0.0.sql  '/data/pgsql/share/extension/click'

Note that the click subdirectory is neither created nor used to install the DATA file in th actual output, despite this line in the control file:

directory = 'extension/click'

From the docs:

directory (string)

The directory containing the extension's SQL script file(s). Unless an absolute path is given, the name is relative to the installation's SHAREDIR directory. The default behavior is equivalent to specifying directory = 'extension'.

The Fix

Turns out this it requires that MODULEDIR also be set in the Makefile:

MODULEDIR = extension/click

With that in place, it works as expected:

$ make install
gmkdir -p '/data/pgsql/share/extension'
gmkdir -p '/data/pgsql/share/extension/click'
ginstall -c -m 644 .//click.control '/data/pgsql/share/extension/'
ginstall -c -m 644 .//sql/click--1.0.0.sql  '/data/pgsql/share/extension/click/'