Project

General

Profile

Statistics
| Revision:
  • svn:ignore: extern

# Date Author Comment
12574 03/04/2014 05:18 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_keys_func(regtype, util.col_cast[]): use util.qual_name() to create the function name, for clarity

12573 03/04/2014 04:56 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: public_validations: auto-added values_() functions for all queries

12572 03/04/2014 04:53 PM Aaron Marcuse-Kubitza

schemas/util.sql: util.remake_diff_table(): viewing the table in human-readable form: use just the output side's values_() columns, to avoid repeating columns on both sides that are the same and put just the changed columns side-by-side

12571 03/04/2014 04:45 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_keys_func(regtype): values() function: must be called values_() instead because `values` is a keyword

12570 03/04/2014 04:31 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_keys_func(regtype): also add values() function for use in displaying the diff table

12569 03/04/2014 04:19 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_keys_func(regtype, col_cast[]): allow changing the name of the generated function

12568 03/04/2014 03:55 PM Aaron Marcuse-Kubitza

schemas/util.sql: `RAISE USING ERRCODE = SQLSTATE, MESSAGE = SQLERRM`: use simpler `RAISE` to rethrow error

12567 03/04/2014 03:53 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_keys_func(regtype, util.col_cast[]): use util.create_if_not_exists() to avoid trying to overwrite a custom keys() function the user has written

12566 03/04/2014 03:49 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: public_validations: auto-added keys() functions for all queries

12565 03/04/2014 03:41 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): automatically create a keys() function for the base type. this avoids the need to create keys() functions manually for the numerous queries that need them.

12564 03/04/2014 03:35 PM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_keys_func(regtype)

12563 03/04/2014 03:34 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_keys_func(regtype, util.col_cast[]): need to handle 1-column records specially, because Postgres does not allow returning a 1-column record when there are OUT params

12562 03/04/2014 03:02 PM Aaron Marcuse-Kubitza

schemas/util.sql: added typed_cols(regtype)

12561 03/04/2014 02:29 PM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_keys_func(regtype, col_cast[])

12560 03/04/2014 02:27 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: raise(): need to use $__BODY1$ in case msg contains $BODY1$ (in SQL)

12559 03/04/2014 02:23 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_out_params(): need COALESCE around string_agg()

12558 03/04/2014 02:22 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: eval(): don't declare it STRICT because it should throw an error if you try to execute NULL

12557 03/04/2014 02:20 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: synced with DB, which reorders ~type tables

12556 03/04/2014 01:59 PM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_out_params()

12555 03/04/2014 01:42 AM Aaron Marcuse-Kubitza

schemas/util.sql: mk_diff_query(): indented left_ table to line up vertically with right_, for easier comparison of the left_/right_ table names

12554 03/04/2014 01:40 AM Aaron Marcuse-Kubitza

schemas/util.sql: mk_diff_query(): removed special handling for CROSS JOIN because this is now handled by diff(text, text) using `FULL JOIN ON true`. this simplification allows mk_diff_query() to contain just the template structure of the FULL JOIN, without _if() calls that decrease readability.

12553 03/04/2014 01:34 AM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): handle the CROSS JOIN special case using `FULL JOIN ON true`, to allow mk_diff_query() to support just a straighforward FULL JOIN. this also ensures that all diff queries use the same FULL JOIN template.

12552 02/28/2014 11:17 PM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: public_validations: schema comment: also need to re-create keys() functions after running public_validations.rm_all_queries()

12551 02/28/2014 11:13 PM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: added back keys() matchup functions, which get cascadingly deleted when the queries are re-created to change column names, etc. note that this causes the associated ~type tables to sort before them.

12550 02/28/2014 11:11 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added new ~type tables

12549 02/28/2014 10:45 PM Aaron Marcuse-Kubitza

fix: lib/phpPgAdmin.login.php.diff: "For user public_, leave password blank" instruction: moved this to right under the Password field and increased the font size so people would be more likely to see it

12548 02/28/2014 10:28 PM Aaron Marcuse-Kubitza

/Makefile: added separate phppgadmin-Linux target to avoid needing to run the entire postgres-Linux target whenever http://vegbiendev.nceas.ucsb.edu/phppgadmin/ goes down (after some system updates)

12547 02/28/2014 10:03 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: rm_all_queries(schema): documented this function's unexpected behavior when schema = public_validations (it removes in all schemas, not just public_validations). this is because this uses rm_query_view().

12546 02/28/2014 09:49 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: use plot (which includes only outer plots) instead of location, to match the input queries

12545 02/28/2014 08:15 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: rm_query_group(): support removing all validations as well as just those with a particular group prefix (and renamed to rm_output_queries())

12544 02/28/2014 07:57 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: public_validations: schema comment: removed incorrect "" in `SET search_path = "public_validations", pg_catalog;` now that they are no longer auto-added

12543 02/28/2014 07:56 PM Aaron Marcuse-Kubitza

bugfix: schemas/Makefile: `%/install: vegbien.sql`: don't enclose public_validations in "" because this causes a comment that says to search for `SET search_path = public_validations, pg_catalog;` to become mangled

12542 02/28/2014 07:51 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: synced with DB, which reorders ~type tables

12541 02/28/2014 07:34 PM Aaron Marcuse-Kubitza

fix: schemas/Makefile: moved comment about publishing a schema to %/publish

12540 02/28/2014 05:27 PM Aaron Marcuse-Kubitza

lib/Firefox_bookmarks.reformat.csv: "page's description": changed to "page's own description" to clarify that this is a description provided by the page itself

12539 02/28/2014 05:25 PM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks: PostgreSQL: added links for error reporting levels and how to hide stack traces in psql. SQL: added links for recursive queries, which can be used to traverse hierarchical (parent-pointer) tables.

12538 02/27/2014 07:56 PM Aaron Marcuse-Kubitza

fix: inputs/SALVIAS/validations.sql: renamed SiteCode to plot_code to match output queries

12537 02/27/2014 07:53 PM Aaron Marcuse-Kubitza

schemas/util.sql: raise_error_notice(): raise a WARNING instead because this is for errors, and rename to raise_error_warning() to match

12536 02/27/2014 07:49 PM Aaron Marcuse-Kubitza

schemas/util.sql: raise_error_notice(): raise a WARNING instead because this is for errors, and rename to raise_error_warning() to match

12535 02/27/2014 07:45 PM Aaron Marcuse-Kubitza

schemas/util.sql: removed no longer used raise_notice(). use util.raise(NOTICE, ...) instead.

12534 02/27/2014 07:41 PM Aaron Marcuse-Kubitza

schemas/util.sql: use util.raise(NOTICE, ...) instead of util.raise_notice()

12533 02/27/2014 07:37 PM Aaron Marcuse-Kubitza

schemas/util.sql: raise(type text, msg text): documented the possible options for the type param

12532 02/27/2014 07:34 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: raise(): util.eval(): turn off verbose_ mode to avoid printing debug statements about debug statements

12531 02/27/2014 07:32 PM Aaron Marcuse-Kubitza

schemas/util.sql: eval(): added verbose_ option like for eval2set()

12530 02/27/2014 07:28 PM Aaron Marcuse-Kubitza

schemas/util.sql: added raise(type text, msg text)

12529 02/27/2014 07:09 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: plots* validation queries: renamed plot_code columns (with names plotcode, plotCode, SiteCode) to match the input queries (plot_code)

12528 02/27/2014 07:08 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: added back traits* ~type tables

12527 02/27/2014 07:02 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: plots* validation queries: renamed plot_code columns (with names plotcode, plotCode, SiteCode) to match the input queries (plot_code)

12526 02/27/2014 06:58 PM Aaron Marcuse-Kubitza

inputs/SALVIAS/validations.sql: use plot_code instead of plotcode for easier readability

12525 02/27/2014 06:42 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: rm_all_queries(): all-schemas mode: also remove queries that are only present on the input side, so that the input side can also be re-created from the DDL file

12524 02/27/2014 06:36 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: rm_all_queries(): documented that this actually does remove queries in all schemas when schema is NULL, because rm_query_view(public_validations.view) searches all schemas

12523 02/27/2014 04:37 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: top_plot view: renamed to plot, as requested by Brad (wiki.vegpath.org/2014-02-27_conference_call#schema-changes)

12522 02/27/2014 04:12 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: location.top_plot: renamed to plot_location_id, as requested by Brad (wiki.vegpath.org/2014-02-27_conference_call#schema-changes)

12521 02/27/2014 03:51 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: location.top_plot: renamed to plot_location_id, as requested by Brad (wiki.vegpath.org/2014-02-27_conference_call#schema-changes)

12520 02/27/2014 02:20 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: source_by_shortname(): documented exact time that the slow query ran for (5013s = ~1.5 hours)

12519 02/27/2014 02:07 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: public_validations: schema comment: documented how to sync the queries with schemas/vegbien.sql

12518 02/27/2014 02:05 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: public_validations.rm_all_queries(): when called with no args, operate on public_validations instead of all schemas, since this is the more common use case (replacing just the output queries, not both input and output)

12517 02/27/2014 01:49 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: rm_query_group(): documented that this only removes validations output queries (in public_validations), as it is designed for use in updating all output queries at once from the testing DB

12516 02/27/2014 01:27 PM Aaron Marcuse-Kubitza

bugfix: *.sql: public.source_by_shortname(): need to wrap it in a nested SELECT because Postgres incorrectly does not constant-fold (inline) it, leading to a slowdown when it is therefore run many times. this is done using the steps at wiki.vegpath.org/Postgres_queries#wrap-function-call-in-nested-SELECT .

12515 02/27/2014 12:43 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: source_by_shortname(): documented that it must be run as a nested SELECT, because otherwise Postgres will not inline it. not inlining causes the query to be run for each row in a table of potentially millions, and creates a significant slowdown (eg. >1.5 hours for SALVIAS._plots_06_list_of_plots_with_stem_measurements)

12514 02/27/2014 07:59 AM Aaron Marcuse-Kubitza

schemas/util.sql: eval2val(): made it STABLE so that functions that use it can themselves be inlined. (Postgres apparently ignores the STABLE qualifier, without warning, if the function contains any VOLATILE statements.)

12513 02/27/2014 06:51 AM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: source_by_shortname(): needs to be declared STABLE so it can be constant-folded and only run once per query. (it had previously been VOLATILE because of constraints imposed on functions that run `SET LOCAL search_path`.)

12512 02/27/2014 01:11 AM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: location: added index on top_plot

12511 02/27/2014 01:11 AM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: location: added index on top_plot

12510 02/27/2014 01:06 AM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: _plots_06_list_of_plots_with_stem_measurements: changed columns to match input query

12509 02/27/2014 01:04 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added more ~type tables for plots queries

12508 02/26/2014 11:58 PM Aaron Marcuse-Kubitza

fix: inputs/SALVIAS/validations.sql: plotMetadata.SiteCode: need to match types with the output query column

12507 02/26/2014 11:44 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added public_validations.rm_all_queries(schema), which removes all validations queries in a schema, or in all schemas (useful when recreating validations queries from the DDL export file)

12506 02/26/2014 11:29 PM Aaron Marcuse-Kubitza

schemas/util.sql: validation_views(): moved filtering out of _validations schemas to validatable_datasources() so that calling this function with no args gives the validation views in *all schemas as one would expect

12505 02/26/2014 10:58 PM Aaron Marcuse-Kubitza

schemas/util.sql: query_relations(): support passing in an input query instead of an output query, which will remove only in the datasource's schema. (note that it was not clear that passing in an input-side query was not previously supported.)

12504 02/26/2014 10:50 PM Aaron Marcuse-Kubitza

schemas/util.sql: added schema_regexp(regclass)

12503 02/26/2014 10:30 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: schema_anchor: clarified that this identifies this function's schema (for use in locating helper functions), but is not necessarily the schema operated on, as the comment implied

12502 02/26/2014 10:05 PM Aaron Marcuse-Kubitza

schemas/util.sql: drop_relations_like(): use util.schema_regexp()

12501 02/26/2014 10:02 PM Aaron Marcuse-Kubitza

schemas/util.sql: added schema_regexp(schema_anchor)

12500 02/26/2014 01:16 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: _plots_04_count_of_plots_in_each_project_in_this_source: count top-level plots to match the input query

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()