doc:grb_scripts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:grb_scripts [2012/03/23 06:04] – added "Updating by using psql" jtello | doc:grb_scripts [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 53: | Line 53: | ||
===== Updating by using psql ===== | ===== Updating by using psql ===== | ||
//The following is added by someone learning the system and is not official:// | //The following is added by someone learning the system and is not official:// | ||
+ | |||
Since the grb_script table in the stars database is properly set to have the constrain of being UNIQUE, if the method described above is attempted for updating the script psql will refuse to add it again and will output among other things: | Since the grb_script table in the stars database is properly set to have the constrain of being UNIQUE, if the method described above is attempted for updating the script psql will refuse to add it again and will output among other things: | ||
<code bash> | <code bash> | ||
Line 61: | Line 62: | ||
user@host: | user@host: | ||
stars=> UPDATE grb_script SET grb_script_script = ' | stars=> UPDATE grb_script SET grb_script_script = ' | ||
- | stars=> INSERT INTO grb_script VALUES ('C0', '600', ' | + | stars=> INSERT INTO grb_script VALUES ('C5', '300', ' |
+ | stars=> UPDATE grb_script SET grb_script_script = ' | ||
</ | </ | ||
+ | |||
+ | Note that: | ||
+ | - The first command will update what camera C5 will do until 10 minutes | ||
+ | - The second command will insert the previously undefined behaviour for C5 that will happen until 300 seconds | ||
+ | - And the third will update that which will be done after all other defined behaviours. Note that for this case the column is not search by a literal expression like ' |
doc/grb_scripts.1332479079.txt.gz · Last modified: 2012/03/23 00:00 (external edit)