Thread: BUG #11829: pgcrypto doc bug

BUG #11829: pgcrypto doc bug

From
jeff.janes@gmail.com
Date:
The following bug has been logged on the website:

Bug reference:      11829
Logged by:          Jeff Janes
Email address:      jeff.janes@gmail.com
PostgreSQL version: 9.2.9
Operating system:   Linux
Description:

pgp_sym_encrypt is documented to have an enable-session-key option.

But that option does not seem to exist, and as far as I can tell it never
has existed.

jjanes=# select pgp_sym_encrypt('foo','bar','enable-session-key=1');
ERROR:  Illegal argument to function

Re: BUG #11829: pgcrypto doc bug

From
Tom Lane
Date:
jeff.janes@gmail.com writes:
> pgp_sym_encrypt is documented to have an enable-session-key option.

> But that option does not seem to exist, and as far as I can tell it never
> has existed.

> jjanes=# select pgp_sym_encrypt('foo','bar','enable-session-key=1');
> ERROR:  Illegal argument to function

A look at set_arg() suggests that the spelling of that option is really
"sess-key" ... Marko, is that correct?

I also notice that there are a bunch of undocumented options with
names beginning "expect-".  Should those be documented, and if so
could we get some text for that?

            regards, tom lane

Re: BUG #11829: pgcrypto doc bug

From
Marko Kreen
Date:
On Thu, Oct 30, 2014 at 04:50:44PM -0400, Tom Lane wrote:
> jeff.janes@gmail.com writes:
> > pgp_sym_encrypt is documented to have an enable-session-key option.
>
> > But that option does not seem to exist, and as far as I can tell it never
> > has existed.
>
> > jjanes=# select pgp_sym_encrypt('foo','bar','enable-session-key=1');
> > ERROR:  Illegal argument to function
>
> A look at set_arg() suggests that the spelling of that option is really
> "sess-key" ... Marko, is that correct?

Yes.

> I also notice that there are a bunch of undocumented options with
> names beginning "expect-".  Should those be documented, and if so
> could we get some text for that?

They are mainly meant for regtests, to see if final message structure
is what is expected.  I don't see much value for users.

--
marko

Re: BUG #11829: pgcrypto doc bug

From
Tom Lane
Date:
Marko Kreen <markokr@gmail.com> writes:
> On Thu, Oct 30, 2014 at 04:50:44PM -0400, Tom Lane wrote:
>> A look at set_arg() suggests that the spelling of that option is really
>> "sess-key" ... Marko, is that correct?

> Yes.

Will fix.

>> I also notice that there are a bunch of undocumented options with
>> names beginning "expect-".  Should those be documented, and if so
>> could we get some text for that?

> They are mainly meant for regtests, to see if final message structure
> is what is expected.  I don't see much value for users.

OK, thanks for checking.  I see we're not documenting the "debug"
option either, so this seems sensible, though perhaps a comment in
the code is warranted.

            regards, tom lane