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

Re: [PATCH 2/2] Modify upgrade_bibtex.sql: Create function bibtex_debian_pool() which gets references for sources present only in the Debian Package Pool



Hi,

On Thu, Apr 23, 2015 at 6:41 PM, Andreas Tille <andreas@an3as.eu> wrote:
On Thu, Apr 23, 2015 at 05:25:05PM +0530, Akshita Jha wrote:
> Hi,
>
> I created a new function bibtex_debian_pool() which has an INNER JOIN and
> also escapes '#'. So, the query in generate_bibtex.py will change to :
>
>    # create BibTeX file
>       bf = open(self.bibtexfile, 'w')
>
>       if self.all_ref == 1:
>         query = "SELECT * FROM bibtex()"
>       else:
>       query = "SELECT * FROM bibtex_debian_pool()"

Just had another view:  I think the code duplication in
bibtex_debian_pool() is a bit hard do maintain.  Why not defining
it as

   SELECT * FROM bibtex()
     JOIN ...

?

 
I had thought of this but then I realised that bibtex() "RETURNS SETOF TEXT" in the latex syntax. Will join will work on this ?

-- 
Regards,
Akshita Jha

Reply to: