Skip to content
Snippets Groups Projects
Commit bbd56fde authored by Dennis Ahrens's avatar Dennis Ahrens
Browse files

Fixed the library id script.

parent 1077ce5f
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
REMAINNG = $(sudo -u postgres -- psql -qtAX -d hshinfo -c "select (maximum_value::bigint - (SELECT last_value FROM hshinfo.seq_raw_library_id)) from information_schema.sequences where sequence_schema = 'hshinfo' and sequence_name = 'seq_raw_library_id';")
REMAINING=$(sudo -u postgres -- psql -qtAX -d hshinfo -c "select (maximum_value::bigint - (SELECT last_value FROM hshinfo.seq_raw_library_id)) from information_schema.sequences where sequence_schema = 'hshinfo' and sequence_name = 'seq_raw_library_id';")
echo "P remaining_library_ids=$REMAINING;400:;200: That many library IDs are available."
\ No newline at end of file
echo "P watch_lib_ids remaining_library_ids=$REMAINING;400:;200: That many library IDs are available."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment