Re: SGML on functions

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Thom Brown" <thom(at)linux(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "pgsql-docs" <pgsql-docs(at)postgresql(dot)org>
Subject: Re: SGML on functions
Date: 2010-08-29 16:24:03
Message-ID: 4C7A43530200002500034DBB@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Thom Brown <thom(at)linux(dot)com> wrote:
> Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:

>> You find examples like this:
>>
>> <funcsynopsis>
>> <funcprototype>
>> <funcdef>void <function>qsort</function></funcdef>
>> <paramdef>void *<parameter>dataptr</parameter>[]</paramdef>
>> <paramdef>int <parameter>left</parameter></paramdef>
>> <paramdef>int <parameter>right</parameter></paramdef>
>> <paramdef>int <parameter>(* comp)</parameter>
>> <funcparams>void *, void *</funcparams></paramdef>
>> </funcprototype>
>> </funcsynopsis>
>>
>
> But that page also says "Using FuncSynopsis for languages that are
> unrelated to C may prove difficult."
>
> Using that syntax will result in a semi-colon being placed at the
> end of the function when parsed.

Yes, but that's the only place I could find an example of function
and parameter together. The parameter tag can be used inside of
function as well as in most of the places function can be used, so
the definition seemed ambiguous to me. I took these examples as
being the best evidence I could find about whether parameter tags
were intended to be inside or outside of the function tag.

I suppose an argument could be made that for functions for which the
identity is totally determined by function name (as in C) the
parameters should be outside the tag, while functions in SQL need
the parameters inside the tag, because they are used to identify a
particular function among many with the same name.

It appears that, technically, either format is allowed.

-Kevin

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2010-08-29 16:28:06 Re: [pgsql-www] Example indenting
Previous Message Joe Conway 2010-08-29 16:20:55 Re: [pgsql-www] Example indenting