Обсуждение: patch for cleanup protocol

Поиск
Список
Период
Сортировка

patch for cleanup protocol

От
Ludek Finstrle
Дата:
Hello,

  protocol option is no longer used with libpq driver version.
So I clean up the code. I try change both languages (English and Japanese).
I didn't sure how to clean up faq.html so I don't do it.

Please review and comment

Luf

Вложения

Re: patch for cleanup protocol

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Ludek Finstrle
> Sent: 19 December 2005 22:07
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] patch for cleanup protocol
>
> Hello,
>
>   protocol option is no longer used with libpq driver version.
> So I clean up the code. I try change both languages (English
> and Japanese).
> I didn't sure how to clean up faq.html so I don't do it.
>
> Please review and comment

Looks fine to me (haven't tested it though) - however, please add a
prominent note in dlg_specific.c to remind us not to reuse old parameter
names/aliases in the future unless it's for the same purpose they were
originally used for, and list those names of course (well, name in this
first case).

Thanks, Dave.

Re: patch for cleanup protocol

От
tomas@nocrew.org (Tomas Skäre)
Дата:
Ludek Finstrle <luf@pzkagis.cz> writes:

> Hello,
>
>   protocol option is no longer used with libpq driver version.
> So I clean up the code. I try change both languages (English and Japanese).
> I didn't sure how to clean up faq.html so I don't do it.
>
> Please review and comment

I'm not qualified to tell if the changes are correct, but I just
noticed this one thing:

> diff -c psqlodbc.orig\dlg_specific.c psqlodbc.full\dlg_specific.c
> *** psqlodbc.orig\dlg_specific.c    Wed Nov 30 13:44:16 2005
> --- psqlodbc.full\dlg_specific.c    Mon Dec 19 23:33:09 2005
> ***************
> *** 65,72 ****
>
";%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%s;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d",
>                   INI_READONLY,
>                   ci->onlyread,
> -                 INI_PROTOCOL,
> -                 ci->protocol,
>                   INI_FAKEOIDINDEX,
>                   ci->fake_oid_index,
>                   INI_SHOWOIDCOLUMN,
> --- 65,70 ----

If you remove these arguments, you have to remove the corresponding
(second from start) "%s=%s" pair from the format string, otherwise
it'll use the wrong variables for the %d's further on.


Tomas

Re: patch for cleanup protocol

От
Ludek Finstrle
Дата:
> I'm not qualified to tell if the changes are correct, but I just
> noticed this one thing:
>
> >
";%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%s;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d",
> >                   INI_READONLY,
> >                   ci->onlyread,
> > -                 INI_PROTOCOL,
> > -                 ci->protocol,

...

> If you remove these arguments, you have to remove the corresponding
> (second from start) "%s=%s" pair from the format string, otherwise
> it'll use the wrong variables for the %d's further on.

Yes. Very good point. Thank you Tomas.

> Looks fine to me (haven't tested it though) - however, please add a

I test it. It works good for me. But there can be sill bug (I hope there
is no bug).

> prominent note in dlg_specific.c to remind us not to reuse old parameter
> names/aliases in the future unless it's for the same purpose they were
> originally used for, and list those names of course (well, name in this
> first case).

I try add some note but I don't know if it fits you expectation. If it's
not good for you please change it and send me patch which solve it.

Second try ... (I break in this two advices)
I forgot. I made this patch againist CVS head.

Please review and comment

Luf

Вложения

Re: patch for cleanup protocol

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Ludek Finstrle
> Sent: 20 December 2005 10:23
> To: Tomas Skäre
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] patch for cleanup protocol
>
> I try add some note but I don't know if it fits you
> expectation. If it's
> not good for you please change it and send me patch which solve it.

Looks great to me.

Thanks, Dave.