Project

General

Profile

Statistics
| Revision:
  • svn:ignore: extern

# Date Author Comment
12499 02/26/2014 12:29 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: remake_diff_table(): instructions for how to regenerate the diff table: put these at the beginning of the table comment instead of the end, because they are the most important info about the table that a user needs to know

12498 02/26/2014 11:58 AM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): documented how to write a custom keys() function to match up rows using a subset of the columns (including a sample keys() function template)

12497 02/26/2014 11:37 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: replaced custom %== operators with much simpler custom keys() functions. this avoids both the need to write out an = comparison for each field, and especially, also the need to write both an operator and a function implementing that operator.

12496 02/26/2014 10:42 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: diff(text, text): in the %== comparison, it turns out you do need to cast the values to the same base type, even though this is optional when using a custom %==

12495 02/25/2014 11:51 PM Aaron Marcuse-Kubitza

schemas/util.sql: remake_diff_table(): prepend the "view this table in human-readable form" comment instead of appending because it is more important than the "contents generated from" comment previously added

12494 02/25/2014 11:49 PM Aaron Marcuse-Kubitza

schemas/util.sql: added prepend_comment()

12493 02/25/2014 11:39 PM Aaron Marcuse-Kubitza

schemas/util.sql: removed no longer used mk_set_search_path(VARIADIC schemas text[]). use mk_search_path() instead.

12492 02/25/2014 11:36 PM Aaron Marcuse-Kubitza

schemas/util.sql, vegbien.sql: comment about "function option search_path": don't include `mk_set_search_path()` since that is no longer used

12491 02/25/2014 11:35 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): always use the schema of col_type_null (the common base type) as the search_path, since any custom %== operator for it will always be in the same schema as it

12490 02/25/2014 11:28 PM Aaron Marcuse-Kubitza

schemas/util.sql: use_own_schema(): renamed to use_schema() because this can be used for any type-linked schema

12489 02/25/2014 11:23 PM Aaron Marcuse-Kubitza

bugfix: rematerialize_out_view(): set_search_path() does not take the same arguments as mk_set_search_path() did, so need to use mk_search_path() instead

12488 02/25/2014 11:19 PM Aaron Marcuse-Kubitza

schemas/util.sql: use_own_schema(): auto-append util to the search_path to enable use of util operators

12487 02/25/2014 11:11 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_set_search_path(): no need to debug_print_return_value() anymore because functions now use set_search_path() (or something that calls it), which debug-prints the statement (`EXECUTE util.mk_set_search_path()` did not)

12486 02/25/2014 11:06 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_search_path(), mk_set_search_path(text...): auto-append util to the search_path to enable use of util operators

12485 02/25/2014 10:49 PM Aaron Marcuse-Kubitza

schemas/util.sql: removed no longer used mk_use_own_schema(). use util.use_own_schema() instead.

12484 02/25/2014 10:48 PM Aaron Marcuse-Kubitza

schemas/util.sql, vegbien.sql: use util.use_own_schema()/util.set_search_path() instead of EXECUTE util.mk_use_own_schema()/util.mk_set_search_path()

12483 02/25/2014 10:42 PM Aaron Marcuse-Kubitza

schemas/util.sql: added use_own_schema()

12482 02/25/2014 10:40 PM Aaron Marcuse-Kubitza

schemas/util.sql: added set_search_path()

12481 02/25/2014 10:36 PM Aaron Marcuse-Kubitza

schemas/util.sql: runnable_sql(): don't output search_path before a SET statement

12480 02/25/2014 10:31 PM Aaron Marcuse-Kubitza

schemas/util.sql: added is_set_stmt()

12479 02/25/2014 09:28 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): use mk_diff_query()'s new cols param to avoid a nested SELECT

12478 02/25/2014 09:17 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_diff_query(): parameterized the customizable parts of the query, to allow them to be replaced with their EXPLAIN expansion (which is what we ultimately want, so that the query does not refer to any internal tables or views)

12477 02/25/2014 09:02 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): use util.mk_diff_query(). this splits the complex query-generation code apart from the query-execution code.

12476 02/25/2014 08:51 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: undid r12472 because the command needed to limit the effects of any `SET LOCAL search_path` to the current function will unfortunately also clear any existing search_path, which may be needed for the eval query to execute

12475 02/25/2014 08:25 PM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_diff_query()

12474 02/25/2014 08:13 PM Aaron Marcuse-Kubitza

schemas/util.sql: debug_print_sql(): use runnable_sql()

12473 02/25/2014 08:12 PM Aaron Marcuse-Kubitza

schemas/util.sql: added runnable_sql()

12472 02/25/2014 08:07 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: eval2*(): added search_path function option in order to limit the effects of any `SET LOCAL search_path` in the invoked query to the current function. however, plain eval() is not changed because it is often used to execute a `SET LOCAL search_path` in the calling function.

12471 02/25/2014 06:03 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): removed unnecessary casts to the base type in the join condition and the WHERE filter. these had been presumed necessary due to errors, but the errors turned out to be caused by the operator not being in the search_path. note that the casts in the columns list are still needed, as described in the associated comment.

12470 02/25/2014 05:40 PM Aaron Marcuse-Kubitza

schemas/util.sql: materialize_query(): add a comment on the table with the query it was generated from

12469 02/25/2014 05:39 PM Aaron Marcuse-Kubitza

schemas/util.sql: debug_print_sql(): util.mk_set_search_path(): use for_printing := true to comment out LOCAL

12468 02/25/2014 04:11 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_set_search_path(text): include LOCAL commented out, because the user might want to run it with another statement as a single command, in which case it would be useful because they will be in the same transaction (http://www.postgresql.org/docs/9.3/static/sql-set.html#AEN81154)

12467 02/25/2014 04:09 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_set_search_path(): added for_printing option like for mk_set_search_path(text)

12466 02/25/2014 04:04 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_set_search_path(): support creating a SET search_path statement for display as well, which would exclude LOCAL because it doesn't work as a standalone command (http://www.postgresql.org/docs/9.3/static/sql-set.html#AEN81154)

12465 02/25/2014 02:48 PM Aaron Marcuse-Kubitza

schemas/util.sql: debug_print_sql(): include the search_path in case the query contains search_path-dependent elements (such as operators)

12464 02/25/2014 02:45 PM Aaron Marcuse-Kubitza

schemas/util.sql: util.explain2notice_msg(): add newline before and after to visually separate it from other debug info

12463 02/25/2014 02:30 PM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_set_search_path() (which uses the current search_path)

12462 02/25/2014 02:08 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): in the outputted FULL JOIN query, documented that you should refer to the EXPLAIN output for the expansion of %==

12461 02/25/2014 01:54 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: first_word(): ignore leading whitespace: need to use util.ltrim_nl(), as ltrim() only removes spaces

12460 02/25/2014 01:46 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: first_word(): need to ignore leading whitespace. this applies to many of our queries, which have a leading newline.

12459 02/25/2014 01:44 PM Aaron Marcuse-Kubitza

schemas/util.sql: explain(): don't debug-print the EXPLAIN, to avoid cluttering up the debug output

12458 02/25/2014 01:41 PM Aaron Marcuse-Kubitza

schemas/util.sql: eval2set(): make debug-printing optional, for use with internal statements

12457 02/25/2014 01:28 PM Aaron Marcuse-Kubitza

schemas/util.sql: added is_explain()

12456 02/25/2014 01:25 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: diff(text, text): FULL JOIN SELECT statement: don't put a comment at the very beginning, because this prevents it from being autoexplained (this is the query we particularly want EXPLAIN output for)

12455 02/25/2014 01:22 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: debug_print_sql(): only surround EXPLAIN output with newlines if there is any

12454 02/25/2014 01:19 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: debug_print_sql(): need newline before and after EXPLAIN output to visually separate it from other debug info

12453 02/25/2014 01:06 PM Aaron Marcuse-Kubitza

schemas/util.sql: util.debug_print_sql(): include the EXPLAIN output of applicable queries, for easier query plan debugging (just like lib/sql.py's db.autoexplain)

12452 02/25/2014 01:02 PM Aaron Marcuse-Kubitza

schemas/util.sql: added explain2notice_msg_if_can()

12451 02/25/2014 12:57 PM Aaron Marcuse-Kubitza

schemas/util.sql: added is_explainable(sql)

12450 02/25/2014 12:55 PM Aaron Marcuse-Kubitza

schemas/util.sql: added first_word()

12449 02/25/2014 12:25 PM Aaron Marcuse-Kubitza

schemas/util.sql: explain2notice(): use util.raise_notice()

12448 02/25/2014 12:23 PM Aaron Marcuse-Kubitza

schemas/util.sql: explain2notice(): added helper function explain2notice_msg() which can also be used individually

12447 02/25/2014 12:21 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: schema comment: noted that avoiding use of STRICT also makes functions much easier to troubleshoot, because they won't mysteriously do nothing if called with only NULL arguments, even when you have added debug-print statements

12446 02/25/2014 12:19 PM Aaron Marcuse-Kubitza

schemas/util.sql, vegbien.sql: do not declare any SQL-language functions as STRICT, because this prevents them from being inlined (as documented in the util schema comment). the STRICT qualifier has been preserved where its behavior is necessary, rather than just used for optimization.

12445 02/25/2014 12:09 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: schema comment: indicate that all SQL-language functions should never be declared STRICT, not just IMMUTABLE ones, since inlining is not limited to IMMUTABLE (or STABLE) functions (although constant folding is)

12444 02/25/2014 12:07 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: join_strs_transform(): added back STRICT qualifier because it must be declared STRICT to use the special handling of STRICT aggregating functions

12443 02/25/2014 11:56 AM Aaron Marcuse-Kubitza

schemas/util.sql: %==(anyelement, anyelement): needs to be declared STABLE instead of IMMUTABLE because it depends on the search_path (as described at http://vegpath.org/links/#PostgreSQL:%20Documentation:%209.3:%20Function%20Volatility%20Categories%20**)

12442 02/25/2014 11:49 AM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks: PostgreSQL: difference between STABLE and IMMUTABLE: functions that depend on the search_path: clarified that the confusing effects of using IMMUTABLE for one of these functions are only noticeable if the function is called on only constant values in a PL/pgSQL function (in which case the wrong search_path (the one in effect at create time) will be used)

12441 02/25/2014 11:37 AM Aaron Marcuse-Kubitza

schemas/util.sql, vegbien.sql: do not declare IMMUTABLE SQL-language functions as STRICT, because this prevents them from being inlined (as documented in the util schema comment)

12440 02/25/2014 11:23 AM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks: PostgreSQL: added explanation of the difference between STABLE and IMMUTABLE, and common pitfalls in using IMMUTABLE when you should use STABLE. svn: added troubleshooting steps for running `svn upgrade` after the last Mac system update, which upgrades svn.

12439 02/25/2014 10:55 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: diff(text, text): use util.typeof() instead of pg_typeof() so the outputted query is runnable in any search_path

12438 02/25/2014 10:50 AM Aaron Marcuse-Kubitza

schemas/util.sql: added typeof(), which unlike pg_typeof() uses util.qual_name() to create a search_path-independent name

12437 02/25/2014 10:33 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: quote_typed(): schema-qualify the type so the expression does not depend on the search_path

12436 02/25/2014 10:31 AM Aaron Marcuse-Kubitza

schemas/util.sql: %== : use custom keys() function for the type, so that the user only has to get the keys from their value, not also write the comparison of those keys

12435 02/25/2014 10:29 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: synced from DB, which changes the order of the ~type tables

12434 02/25/2014 10:12 AM Aaron Marcuse-Kubitza

schemas/util.sql: diff(regclass, regclass): support custom %== by including the col_type_null's schema in the search_path

12433 02/25/2014 10:07 AM Aaron Marcuse-Kubitza

schemas/util.sql: debug_print_return_value(): don't '-encode the value by default, because text values usually look better without the '-escaping

12432 02/25/2014 09:55 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_set_search_path(): debug_print_return_value() needs to be on mk_set_search_path(text), not mk_search_path(VARIADIC text[])

12431 02/25/2014 09:45 AM Aaron Marcuse-Kubitza

schemas/util.sql: mk_search_path(): use debug_print_return_value() because this function is used with EXECUTE rather than util.eval() (in order to affect the calling function), so the search_path would not otherwise be printed

12430 02/25/2014 09:39 AM Aaron Marcuse-Kubitza

schemas/util.sql: added debug_print_return_value()

12429 02/25/2014 09:34 AM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): support custom search_path because custom %== operators are usually not in the util schema

12428 02/25/2014 09:28 AM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): renamed IN params to be different from OUT params to support LANGUAGE plpgsql

12427 02/25/2014 09:04 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: diff(*): changed from STABLE to VOLATILE because these functions create tables

12426 02/25/2014 07:56 AM Aaron Marcuse-Kubitza

/README.TXT: use full hostname for jupiter so the commands work outside of the NCEAS network as well

12425 02/25/2014 07:52 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: _plots_04_count_of_plots_in_each_project_in_this_source: added operator %== to match the rows by project_name

12424 02/25/2014 07:42 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: diff(text, text) and types that use its custom FULL JOIN matching: need to use separate operator %== for determining which records to put on the same row, so that the = filter for identical rows only excludes rows that are actually the same, not all rows with the same keys (which would usually remove all rows)

12423 02/25/2014 07:21 AM Aaron Marcuse-Kubitza

schemas/util.sql: added operator %== , which returns whether the map-keys of the compared values are the same

12422 02/25/2014 07:14 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: synced from DB, which changes the order of the ~type tables

12421 02/25/2014 12:24 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: _plots_02_list_of_project_names: added = operator that causes FULL JOIN to only use some columns, so that rows for the same label column are put on the same row in the diff table

12420 02/25/2014 12:16 AM Aaron Marcuse-Kubitza

schemas/util.sql: diff(): support custom = operator for the table type (to FULL JOIN on only some columns). this requires casting to the base type, to avoid an ambiguity with the default = operator for record.

12419 02/24/2014 11:18 PM Aaron Marcuse-Kubitza

schemas/util.sql: remake_diff_table(): use util.quote_typed() instead of hardcoding the type

12418 02/24/2014 11:17 PM Aaron Marcuse-Kubitza

fix: inputs/SALVIAS/validations.sql: _plots_02_list_of_project_names: altered column aliases to match output query

12417 02/24/2014 10:51 PM Aaron Marcuse-Kubitza

fix: inputs/SALVIAS/validations.sql: _plots_02_list_of_project_names: altered column aliases to match output query

12416 02/24/2014 05:16 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: rm_query_group(): schemas/vegbien.sql: util.drop_relations_like(): also need to drop ~type tables, so that they will be re-created for the new queries of that group

12415 02/24/2014 04:52 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added rm_query_group(), which removes all validations queries with a particular group prefix

12414 02/24/2014 04:50 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: generated ~type for _plots_04_count_of_plots_in_each_project_in_this_source

12413 02/24/2014 04:43 PM Aaron Marcuse-Kubitza

schemas/util.sql: added drop_relations_like()

12412 02/24/2014 03:26 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: public_validations._plots_* that use projectname: re-alias to project_name to match input queries. (reexporting apparently changes the relative order of the ~type tables.)

12411 02/24/2014 02:34 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: _plots_03_count_of_all_plots_in_this_source: use top_plot instead of location because the corresponding input query includes just the top-level plots

12410 02/24/2014 02:33 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added ~type tables for plots queries that are able to be run successfully

12409 02/24/2014 11:39 AM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks: Roundtable: virtual collaboration: annotated the linked pages

12408 02/24/2014 11:24 AM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks: Roundtable: added materials for virtual collaboration roundtable. Mac: added steps for customizing screen saver security settings beyond the options supported in the UI.

12407 02/24/2014 08:58 AM Aaron Marcuse-Kubitza

inputs/SALVIAS/validations.sql: added Brad's comments from validation/aggregating/plots/SALVIAS/bien3_validations_salvias_db_original.VegCore.sql

12406 02/24/2014 08:53 AM Aaron Marcuse-Kubitza

added inputs/SALVIAS/validations*.sql

12405 02/24/2014 08:50 AM Aaron Marcuse-Kubitza

bugfix: lib/common.Makefile: `svn add`: need to run with --force because the new version of svn in the latest Mac upgrade errors if the file is already under version control

12404 02/24/2014 08:37 AM Aaron Marcuse-Kubitza

fix: validation/aggregating/plots/SALVIAS/bien3_validations_salvias_db_original.VegCore.sql: renamed truncated views to match the output queries

12403 02/24/2014 12:30 AM Aaron Marcuse-Kubitza

bugfix: validation/aggregating/plots/SALVIAS/bien3_validations_salvias_db_original.VegCore.sql: can't double-JOIN like in MySQL (`JOIN a JOIN b ON a_conds AND b_conds`), so split double-JOIN into two JOINs w/ own ON clauses

12402 02/24/2014 12:28 AM Aaron Marcuse-Kubitza

validation/aggregating/plots/SALVIAS/bien3_validations_salvias_db_original.VegCore.sql: removed `LIMIT 10` to match output queries

12401 02/24/2014 12:26 AM Aaron Marcuse-Kubitza

fix: validation/aggregating/plots/SALVIAS/bien3_validations_salvias_db_original.VegCore.sql: updated table names to match our renamings

12400 02/24/2014 12:25 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: public_validations.remake_diff_table(): put the type table in the public_validations schema to avoid cluttering up the datasource schema with internal tables