bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Adding OUTER JOIN functionality


From: Jose E. Marchesi
Subject: Re: [PATCH] Adding OUTER JOIN functionality
Date: Sat, 17 Oct 2020 13:43:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Tim.

Thank you very much for the patch!  Outer joins are very useful.

> I've attached the 3-patch series to provide a "-J" option
> ("--outer-join" long option) to do a LEFT OUTER JOIN rather than an
> INNER JOIN.
>
> The first patch adds the functionality and the project should build
> fine with this in place.  It does change the call signature for
> rec_db_join() and rec_db_query()
>
> The second patch adds the --help but when I tried to build with this
> in place, it complained about translation issues regarding the .po
> files.

It just works fine for me.
What error you get, doing what exactly?

> diff --git a/utils/recsel.c b/utils/recsel.c
> index 4a62646..435074d 100644
> --- a/utils/recsel.c
> +++ b/utils/recsel.c
> @@ -152,8 +152,10 @@ Select and print rec data.\n"), stdout);
>  
>    puts ("");
>    recutl_print_help_record_selection ();
> -  fputs (_("\
> -  -j, --join=FIELD                    perform an inner join using the 
> specified field.\n"),
> +  puts ("");
> +  fputs (_("  -j, --join=FIELD, --inner-join=FIELD do an inner join using 
> the specified field.\n"),
> +         stdout);
> +  fputs (_("  -J, --outer-join=FIELD   do an inner join using the specified 
> field.\n"),
>           stdout);


You mean "do an outer join..." there right.

>    puts ("");
> @@ -267,7 +269,7 @@ recsel_parse_args (int argc,
>  
>              if (!rec_field_name_p (optarg))
>                {
> -                recutl_fatal (_("please specify a correct field name to 
> -j|--join.\n"));
> +                recutl_fatal (_("please specify a correct field name to 
> join.\n"));
>                }
>  
>              recsel_join = xstrdup (optarg);
> -- 
> 2.25.1


Other than that, the patch looks ok.

But we are gonna need some tests for this in torture/utils/recsel.sh.
You can look at the existing recsel-join-* tests for a reference on how
to do so.

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]