pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Thom Brown <thom@linux.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: SGML on functions
Date: Sun, 29 Aug 2010 11:24:03 -0500
Message-ID: <4C7A43530200002500034DBB@gw.wicourts.gov> (raw)
In-Reply-To: <AANLkTinvqtDHe74rnzzGknJhZ=g++MUc+-65GjYNgO90@mail.gmail.com>
References: <AANLkTi=cLJcfZo_oMFFrRveiOyCVz1DcPhizqgLbJ7rJ@mail.gmail.com>
	<1282948205-sup-3873@alvh.no-ip.org>
	<4C7A34C70200002500034DB5@gw.wicourts.gov>
	<AANLkTinvqtDHe74rnzzGknJhZ=g++MUc+-65GjYNgO90@mail.gmail.com>

Thom Brown <thom@linux.com> wrote:
> Kevin Grittner <Kevin.Grittner@wicourts.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



view thread (10+ messages)  latest in thread

Message-ID: <4C7A43530200002500034DBB@gw.wicourts.gov>
Permalink:  ../4C7A43530200002500034DBB@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4C7A43530200002500034DBB@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, thom@linux.com, alvherre@commandprompt.com
  Subject: Re: SGML on functions
  In-Reply-To: <4C7A43530200002500034DBB@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox