<?xml version="1.0" encoding="UTF-8" standalone="yes"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><id>https://blog.pgxn.org/tags/documentation/</id><title>Documentation</title><updated>2011-05-13T20:34:46Z</updated><link rel="self" type="application/atom+xml" href="https://blog.pgxn.org/tags/documentation/feed.xml"/><link rel="alternate" type="text/html" href="https://blog.pgxn.org/tags/documentation/"/><author><name>The PGXN Maintainers</name></author><generator uri="https://gohugo.io/" version="0.167.0">Hugo</generator><entry><id>https://blog.pgxn.org/post/5458118596</id><title type="html">New HOWTO</title><link rel="alternate" type="text/html" href="https://blog.pgxn.org/2011/new-howto/"/><updated>2026-10-07T16:13:48Z</updated><published>2011-05-13T20:34:46Z</published><author><name>David E. Wheeler</name></author><category scheme="https://blog.pgxn.org/tags" term="howto" label="HOWTO"/><category scheme="https://blog.pgxn.org/tags" term="build" label="Build"/><category scheme="https://blog.pgxn.org/tags" term="makefile" label="Makefile"/><category scheme="https://blog.pgxn.org/tags" term="readme" label="README"/><category scheme="https://blog.pgxn.org/tags" term="changes" label="Changes"/><category scheme="https://blog.pgxn.org/tags" term="documentation" label="Documentation"/><category scheme="https://blog.pgxn.org/tags" term="meta.json" label="META.json"/><category scheme="https://blog.pgxn.org/tags" term="control-file" label="Control File"/><summary type="html"><![CDATA[<p>I updated the <a href="https://manager.pgxn.org/">howto</a> yesterday. This document explains how to create a PGXN
distribution. If you&rsquo;re interested in releasing PostgreSQL extensions on
<a href="https://pgxn.org/">PGXN</a>, this document is worth a read.</p>
<p>In essence, it&rsquo;s really simple: Just create a <a href="https://pgxn.org/spec/"><code>META.json</code></a> and upload. But to
get the full benefit, there are quite a few other recommendations. Already
familiar with it? Here&rsquo;s the checklist:</p>
<ul>
<li>Create a <a href="https://pgxn.org/spec/"><code>META.json</code></a></li>
<li>Create a <a href="https://www.postgresql.org/docs/9.1/static/extend-extensions.html">control file</a></li>
<li>Create a <a href="https://www.postgresql.org/docs/current/static/xfunc-c.html#XFUNC-C-PGXS"><code>Makefile</code></a></li>
<li>Implement the code in the <code>sql</code> and <code>src</code> directories</li>
<li>Write tests in the <code>test</code> directory</li>
<li>Write a <a href="https://search.cpan.org/perldoc?Text::Markup">Text::Markup</a>-recognizable <code>README</code></li>
<li>Write <a href="https://search.cpan.org/perldoc?Text::Markup">Text::Markup</a>-recognizable documentation in the <code>doc</code> directory</li>
<li>Consider including other files: <code>Changes</code>, <code>LICENSE</code>, <code>INSTALL</code>, <code>COPYING</code>,
<code>AUTHORS</code></li>
<li><a href="https://manager.pgxn.org/">Release it</a>!</li>
</ul>
<p>Be sure to read the <a href="https://manager.pgxn.org/">howto</a> for details. Got feedback or suggestions? Leave a
comment!</p>]]></summary><content type="html" xml:base="https://blog.pgxn.org/" xml:space="preserve"><![CDATA[<p>I updated the <a href="https://manager.pgxn.org/">howto</a> yesterday. This document explains how to create a PGXN
distribution. If you&rsquo;re interested in releasing PostgreSQL extensions on
<a href="https://pgxn.org/">PGXN</a>, this document is worth a read.</p>
<p>In essence, it&rsquo;s really simple: Just create a <a href="https://pgxn.org/spec/"><code>META.json</code></a> and upload. But to
get the full benefit, there are quite a few other recommendations. Already
familiar with it? Here&rsquo;s the checklist:</p>
<ul>
<li>Create a <a href="https://pgxn.org/spec/"><code>META.json</code></a></li>
<li>Create a <a href="https://www.postgresql.org/docs/9.1/static/extend-extensions.html">control file</a></li>
<li>Create a <a href="https://www.postgresql.org/docs/current/static/xfunc-c.html#XFUNC-C-PGXS"><code>Makefile</code></a></li>
<li>Implement the code in the <code>sql</code> and <code>src</code> directories</li>
<li>Write tests in the <code>test</code> directory</li>
<li>Write a <a href="https://search.cpan.org/perldoc?Text::Markup">Text::Markup</a>-recognizable <code>README</code></li>
<li>Write <a href="https://search.cpan.org/perldoc?Text::Markup">Text::Markup</a>-recognizable documentation in the <code>doc</code> directory</li>
<li>Consider including other files: <code>Changes</code>, <code>LICENSE</code>, <code>INSTALL</code>, <code>COPYING</code>,
<code>AUTHORS</code></li>
<li><a href="https://manager.pgxn.org/">Release it</a>!</li>
</ul>
<p>Be sure to read the <a href="https://manager.pgxn.org/">howto</a> for details. Got feedback or suggestions? Leave a
comment!</p>
<p>Oh, and check out <a href="https://github.com/guedes/pgxn-utils/">pgxn-utils</a> and simplify your extension-development life.</p>
]]></content></entry><entry><id>https://blog.pgxn.org/post/4970682941</id><title type="html">PGXN API Docs Published</title><link rel="alternate" type="text/html" href="https://blog.pgxn.org/2011/api-docs-published/"/><updated>2026-10-07T16:13:48Z</updated><published>2011-04-27T00:27:55Z</published><author><name>David E. Wheeler</name></author><category scheme="https://blog.pgxn.org/tags" term="api" label="API"/><category scheme="https://blog.pgxn.org/tags" term="documentation" label="Documentation"/><category scheme="https://blog.pgxn.org/tags" term="docs" label="Docs"/><category scheme="https://blog.pgxn.org/tags" term="api-docs" label="API Docs"/><category scheme="https://blog.pgxn.org/tags" term="zip" label="Zip"/><category scheme="https://blog.pgxn.org/tags" term="client" label="Client"/><category scheme="https://blog.pgxn.org/tags" term="daniele-varrazzo" label="Daniele Varrazzo"/><summary type="html"><![CDATA[<p>The <a href="https://github.com/pgxn/pgxn-api/wiki">PGXN API Documentation</a> is up! I&rsquo;ve just finished writing the docs for
the lightweight REST API provided by all PGXN mirrors. It also documents how
the same APIs differ when provided by the <a href="https://api.pgxn.org/">API server</a>. Their are four more
documents to write still, APIs provided by the API server but not the mirrors
(including full-text search); I should be able to get those done tomorrow.</p>
<p>So if you&rsquo;re interested in use the API for various things, please <a href="https://github.com/pgxn/pgxn-api/wiki">have a
look</a>! I&rsquo;d appreciate any feedback or corrections.</p>]]></summary><content type="html" xml:base="https://blog.pgxn.org/" xml:space="preserve"><![CDATA[<p>The <a href="https://github.com/pgxn/pgxn-api/wiki">PGXN API Documentation</a> is up! I&rsquo;ve just finished writing the docs for
the lightweight REST API provided by all PGXN mirrors. It also documents how
the same APIs differ when provided by the <a href="https://api.pgxn.org/">API server</a>. Their are four more
documents to write still, APIs provided by the API server but not the mirrors
(including full-text search); I should be able to get those done tomorrow.</p>
<p>So if you&rsquo;re interested in use the API for various things, please <a href="https://github.com/pgxn/pgxn-api/wiki">have a
look</a>! I&rsquo;d appreciate any feedback or corrections.</p>
<p>Speaking of users of the API, <a href="https://profiles.google.com/daniele.varrazzo/about">Daniele Varrazzo</a> has started writing a <a href="https://github.com/dvarrazzo/pgxn-client/">PGXN
client app</a> in Python. This is so awesome! It makes me happy that people are
able to just get going on this. And Daniele did it before I&rsquo;d written the
docs, just from reading the PGXN source code. Nice!</p>
<p>Anyway, getting these docs written was the last barrier I had to releasing
various pieces of PGXN on CPAN and generally being able to get on with my
life. I wanted to write these docs first so that I would have a little more
freedom to change things if something struct me as especially stupid.
Fortunately, as I&rsquo;ve written the <a href="https://pgxn.org/">main site</a> as a thin client for the API,
most of the lameness has already been excised. I think the only change I&rsquo;d
like to make is to change the <code>{char}</code> URI template variable for the
<a href="https://github.com/pgxn/pgxn-api/wiki/userlist-api"><code>userlist</code> API</a> to <code>{letter}</code>, because only lowercased ASCII letters a-z are
allowed. It&rsquo;s more accurate.</p>
<p>Another thing I think I&rsquo;ll change is the file name suffix used for the
distribution download files. Currently it&rsquo;s <code>.pgz</code>, but after <a href="https://blog.pgxn.org/post/4854707157/pgxn-manager">Daniele
complained</a> about it, I <a href="https://groups.google.com/group/pgxn-users/browse_thread/thread/1209538be03be8a4">asked around</a> and the concensus seems to be to change
it to <code>.zip</code>. I&rsquo;ll likely do that tomorrow, too. Fortunately it&rsquo;s pretty easy:
Just edit the configuration file and rename the files on the master mirror. At
least it <em>should</em> be that easy!</p>
<p>There was one other thing in the APIs the felt a bit silly, but I don&rsquo;t
remember what it was, so screw it.</p>
<p>Anyway, feedback on the API docs would be greatly appreciated. And &ndash; <em>get
hacking!</em>.</p>
]]></content></entry><entry><id>https://blog.pgxn.org/post/4018670551</id><title type="html">Thoughts on Indexing and Documentation</title><link rel="alternate" type="text/html" href="https://blog.pgxn.org/2011/indexing-docs/"/><updated>2026-10-07T16:13:48Z</updated><published>2011-03-22T05:13:00Z</published><author><name>David E. Wheeler</name></author><category scheme="https://blog.pgxn.org/tags" term="indexing" label="Indexing"/><category scheme="https://blog.pgxn.org/tags" term="full-text-search" label="Full Text Search"/><category scheme="https://blog.pgxn.org/tags" term="readme" label="README"/><category scheme="https://blog.pgxn.org/tags" term="documentation" label="Documentation"/><category scheme="https://blog.pgxn.org/tags" term="search-results" label="Search Results"/><category scheme="https://blog.pgxn.org/tags" term="search" label="Search"/><summary type="html"><![CDATA[<p>So I&rsquo;m designing the full text indexing for the PGXN search site. I&rsquo;m modeling
it on <a href="https://http//search.cpan.org">CPAN Search</a>, which has been great. There are four search options:</p>
<ul>
<li>Full documentation search. This is the most common. Includes doc title and
body.</li>
<li>User search. Search on names, nicknames, email addresses, URIs, etc.</li>
<li>Distribution search. Search on distribution name, abstract, description,
tags, and the README.</li>
<li>Extension search. Search on extension name and abstract.</li>
<li>Tag search. Search on tag name only.</li>
</ul>
<p>The documentation search is the one I&rsquo;m perhaps least sure about. It assumes
that each extension in a distribution will have documentation. But so far that
has not really been the practice for PostgreSQL extensions. Most folks seem to
stick the documentation in the README. And even then it can be <a href="https://master.pgxn.org/dist/countnulls/1.0.0/README.txt">almost
nothing</a>. So a search for &ldquo;count nulls&rdquo; probably would not find &ldquo;countnulls&rdquo;
extension, because there is no documentation. What should I do about this? I&rsquo;m
thinking one of:</p>]]></summary><content type="html" xml:base="https://blog.pgxn.org/" xml:space="preserve"><![CDATA[<p>So I&rsquo;m designing the full text indexing for the PGXN search site. I&rsquo;m modeling
it on <a href="https://http//search.cpan.org">CPAN Search</a>, which has been great. There are four search options:</p>
<ul>
<li>Full documentation search. This is the most common. Includes doc title and
body.</li>
<li>User search. Search on names, nicknames, email addresses, URIs, etc.</li>
<li>Distribution search. Search on distribution name, abstract, description,
tags, and the README.</li>
<li>Extension search. Search on extension name and abstract.</li>
<li>Tag search. Search on tag name only.</li>
</ul>
<p>The documentation search is the one I&rsquo;m perhaps least sure about. It assumes
that each extension in a distribution will have documentation. But so far that
has not really been the practice for PostgreSQL extensions. Most folks seem to
stick the documentation in the README. And even then it can be <a href="https://master.pgxn.org/dist/countnulls/1.0.0/README.txt">almost
nothing</a>. So a search for &ldquo;count nulls&rdquo; probably would not find &ldquo;countnulls&rdquo;
extension, because there is no documentation. What should I do about this? I&rsquo;m
thinking one of:</p>
<ul>
<li>
<p>Encourage folks to write documentation. I&rsquo;m going to do this anyway, because
the docs will really help the visibility of an extension on the site. It
looks <a href="https://theory.github.com/pgxn/pgtap.html">like this</a>. If you have no docs for an extension, your extension will
not appear in the search results (or perhaps it might, but link to the
distribution).</p>
</li>
<li>
<p>If there is no documentation for an extension in a distribution, index the
README as the documentation. I&rsquo;m not really keen on this idea, because the
README should describe the distribution, how to install it, etc. I&rsquo;m
planning to use it in the distribution-specific index. Documentation of the
extension should be more about how the extension works, what it&rsquo;s interface
is, etc. Or so it seems to me, at least (I&rsquo;m admittedly biased to this
practice among CPAN modules). But at least with this approach there would be
a link to &ldquo;documentation&rdquo; for an extension on the search site.</p>
</li>
</ul>
<p>Erm, not really thinking of any other options. I feel pretty strongly that
folks should write docs for their extensions, as much as possible, and I&rsquo;ve
set things up so that, from PGXN&rsquo;s point of view, at least, you can write
documentation in whatever format you like (assuming the format is supported by
or added to <a href="https://search.cpan.org/perldoc?Text::Markup">Text::Markup</a>), as long as they&rsquo;re in a <code>doc/</code> or <code>docs</code>
directory. I want it to be as easy as possible. But I also want there to be
decent search results ASAP.</p>
<p>Comments?</p>
]]></content></entry><entry><id>https://blog.pgxn.org/post/1082188310</id><title type="html">Status Update: DB API, Extension Versions RFC</title><link rel="alternate" type="text/html" href="https://blog.pgxn.org/2010/db-status-update/"/><updated>2026-10-07T16:13:48Z</updated><published>2010-09-07T18:46:38Z</published><author><name>David E. Wheeler</name></author><category scheme="https://blog.pgxn.org/tags" term="status-update" label="Status Update"/><category scheme="https://blog.pgxn.org/tags" term="database" label="Database"/><category scheme="https://blog.pgxn.org/tags" term="api" label="API"/><category scheme="https://blog.pgxn.org/tags" term="documentation" label="Documentation"/><category scheme="https://blog.pgxn.org/tags" term="extensions" label="Extensions"/><category scheme="https://blog.pgxn.org/tags" term="versions" label="Versions"/><category scheme="https://blog.pgxn.org/tags" term="rfc" label="RFC"/><summary type="html"><![CDATA[I spent most of the time I had to work on PGXN the last two weeks creating the
database for <a href="https://github.com/theory/pgxn-manager/">PGXN Manager</a>. I had estimated 24 hours of work to design the
database. So far I&rsquo;ve logged 34 hours. But I think that will come out in the
wash, really, because I did a lot of work to generate JSON from database
functions. This is code I had originally expected to do in the app layer. I&rsquo;m
starting work on that this week, with an estimated 40 hours. Hope I can do it
in 30. :-)]]></summary><content type="html" xml:base="https://blog.pgxn.org/" xml:space="preserve"><![CDATA[<p>I spent most of the time I had to work on PGXN the last two weeks creating the
database for <a href="https://github.com/theory/pgxn-manager/">PGXN Manager</a>. I had estimated 24 hours of work to design the
database. So far I&rsquo;ve logged 34 hours. But I think that will come out in the
wash, really, because I did a lot of work to generate JSON from database
functions. This is code I had originally expected to do in the app layer. I&rsquo;m
starting work on that this week, with an estimated 40 hours. Hope I can do it
in 30. :-)</p>
<p>I&rsquo;m pretty happy with how the database API is turning out. See the nifty
<a href="https://github.com/theory/pgxn-manager/wiki/DB-API">database API documentation</a> I whipped up using <a href="https://github.com/theory/pgxn-manager/blob/master/bin/gendoc">gendoc</a> and embedded
<a href="https://fletcherpenney.net/multimarkdown/users_guide/multimarkdown_syntax_guide/">MultiMarkdown</a>. There are still a few tweaks I need to make. I just checked
in a change to eliminate all the <code>ALIAS</code>es I <a href="https://blog.pgxn.org/post/1053165383/alias-in-vogue">blogged about</a> last week. Turns
out that one can just <a href="https://archives.postgresql.org/pgsql-hackers/2010-09/msg00404.php">function-name-qualify</a> the function parameter names.
Who knew? I sure didn&rsquo;t.</p>
<p>But I do have a question for you, dear readers. Right now, the database
requires that extensions have unique version numbers in every distribution. So
if, for example, you uploaded the distribution foo 1.2.2 with the extension
bar 1.2.2, when you next uploaded foo 1.2.3, bar could not be 1.2.2. I
designed this this way by following my own practice of always incrementing the
version numbers of all modules included in my <a href="https://search.cpan.org/~dwheeler/">CPAN distributions</a>. So all
modules have unique version numbers, with never a duplicate.</p>
<p>However, CPAN itself only cares that distributions have unique version
numbers. It doesn&rsquo;t care about the version numbers of included modules. See,
for example, <a href="https://search.cpan.org/dist/HTML-Mason/">HTML::Mason</a>. Note that the various included modules have all
sorts of different version numbers, and many have no version numbers at all.
So while the core module has a version number (1.45 at the time of this
writing), if you click to look at older versions, say <a href="https://search.cpan.org/~drolsky/HTML-Mason-1.44/">Mason 1.44</a>, you&rsquo;ll see
that no other modules have their version numbers changed.</p>
<p>I don&rsquo;t think I want to allow extensions without version numbers on PGXN.
That&rsquo;s been a recipe for many annoyances with CPAN. But maybe I should allow
extension version numbers to repeat? The upside is less maintenance for
multi-extension distribution authors. The downside is potentially less
accuracy in the determination of prerequisites.</p>
<p>For example, say that we have two versions of distribution foo:</p>
<pre tabindex="0"><code>  -----------------------------------------------------------------------------
  Distribution                           Extensions
  -------------------------------------- --------------------------------------
  foo 1.2.2                              foo 1.2.2\
                                         bar 1.2.2
<h2 id="bar-122">foo 1.2.3                              foo 1.2.3<br>
bar 1.2.2</h2>
<p></code></pre><p>Note how the version number of extension bar has not changed between releases.
But if I was a user of both foo and bar, and I specified that I required bar
1.2.2 but was actually using stuff in foo 1.2.3, I could end up with errors
because I would only have foo 1.2.3.</p></p>
<p>This is an issue periodically faced by Perl hackers. I might require
HTML::Mason::ApacheHandler 1.69 but really what I need is HTML::Mason 1.44. Of
course, as a Perl hacker, it&rsquo;s my responsibility to make sure I require
exactly what I need, but sometimes it&rsquo;s not clear what&rsquo;s the primary module in
a distribution. And if I don&rsquo;t realize that the version number of
HTML::Mason::ApacheHandler doesn&rsquo;t change with every release, I might make
mistakes.</p>
<p>Maybe that&rsquo;s okay. Maybe PGXN should be less rigid like this. But I&rsquo;m leaning
toward keeping things as they are and requiring new versions of every
extension in every upload of a distribution. It&rsquo;s a bit tougher for those
(few?) hackers who will create multi-extension distributions, but probably
more reliable for everyone else.</p>
<p>What do you think?</p>
<p>Anyway, I&rsquo;m getting to work on the Web app this week while this issue
percolates. Been studying up on <a href="https://plackperl.org/">Plack</a>. So nice!</p>
]]></content></entry></feed>