ADD isntall_deps script

This commit is contained in:
Nathan Dwarshuis 2021-06-12 00:17:52 -04:00
parent d77705b611
commit 049edef5ac
2 changed files with 11 additions and 11 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
!.gitignore !.gitignore
!README.org !README.org
!init.el !init.el
!install_deps
# track versions of installed packages # track versions of installed packages
!straight !straight

View File

@ -16,22 +16,21 @@ RETURNS TABLE(bin_number int, bin_interval text)
AS $func$ AS $func$
BEGIN BEGIN
RETURN QUERY EXECUTE format(' RETURN QUERY EXECUTE format('
with recursive with
no_bins_t as ( bin_numbers as (
select min(get_bin_num(%1$s,%2$s)) as bin_number from %3$s a select
generate_series(
union all min(get_bin_num(%1$s,%2$s)),
max(get_bin_num(%1$s,%2$s))
select bin_number + 1 as bin_number from no_bins_t ) as bin_number
where from %3$s
bin_number < (select max(get_bin_num(%1$s,%2$s)) + 1 from %3$s a)
) )
select select
bin_number, bin_number,
concat(bin_number*%2$s, ''-'', bin_number*%2$s + %2$s - 1) as bin_interval concat(bin_number*%2$s, ''-'', bin_number*%2$s + %2$s - 1) as bin_interval
from no_bins_t from bin_numbers
order by no_bins_t.bin_number;', order by bin_number;',
cname, cname,
width, width,
tname tname