Project

General

Profile

Statistics
| Revision:
  • svn:ignore: extern

# Date Author Comment
12299 02/17/2014 05:46 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): implemented the single_row feature

12298 02/17/2014 05:40 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff(text, text): added single_row param (not implemented yet, to make reading the svn diff easier). to view this svn diff, it is helpful to use WinMerge, which offers moved block detection (/README.TXT > WinMerge setup).

12297 02/17/2014 04:54 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: remake_diff_table(): util.diff() call: include explicit types on arguments to ensure that the correct diff() variant is used

12296 02/17/2014 04:32 PM Aaron Marcuse-Kubitza

schemas/util.sql: added has_single_row()

12295 02/17/2014 04:08 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: remake_diff_table(): prepend ~ to the type table so that it sorts at the end, away from the main tables

12294 02/17/2014 03:56 PM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: remake_diff_table(): can't have in_table/out_table inherit from each other, because inheritance also causes the rows of the parent table to be included in the child table. instead, they need to inherit from a common, empty table, as implemented by the new util.remake_diff_table().

12293 02/17/2014 03:55 PM Aaron Marcuse-Kubitza

schemas/util.sql: added remake_diff_table()

12292 02/17/2014 03:51 PM Aaron Marcuse-Kubitza

schemas/util.sql: drop_*(): added force param to use CASCADE mode

12291 02/17/2014 03:28 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: diff(regclass, regclass): usage: col_type_null must actually be a shared base type of the tables

12290 02/17/2014 03:26 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: diff(regclass, regclass): usage: text arguments must be cast to regclass to bind the right variant of diff()

12289 02/17/2014 03:24 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: diff(regclass, regclass): renamed params to *_table because these actually can't be views, since views don't support inheritance

12288 02/17/2014 03:03 PM Aaron Marcuse-Kubitza

schemas/util.sql: added copy_struct()

12287 02/17/2014 02:06 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added remake_diff_table()

12286 02/17/2014 01:58 PM Aaron Marcuse-Kubitza

bugfix: inputs/bien2_traits/validations.sql: _traits_01_count_records: changed column names to match public_validations._traits_01_count_records

12285 02/17/2014 01:54 PM Aaron Marcuse-Kubitza

schemas/util.sql: added inherit()

12284 02/17/2014 01:46 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: diff(): need to explicitly cast each side to the return type because this does not happen automatically even when an implicit cast is available

12283 02/17/2014 01:32 PM Aaron Marcuse-Kubitza

schemas/util.sql: renamed diff_views(), diff_any() to diff(...) because they are overloads of the same operation

12282 02/17/2014 01:22 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff_any(): documented how to run EXPLAIN on the FULL JOIN query

12281 02/17/2014 01:19 PM Aaron Marcuse-Kubitza

schemas/util.sql: removed non-useful diff_queries() (it is not possible to match distinct `record` types to a common return type, so this would not have worked). use diff_views() instead.

12280 02/17/2014 01:14 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: diff_queries(), diff_views(): embed views verbatim as FROM items, so that the type of their corresponding columns is the view's rowtype. this is necessary in order to match the types of the columns to the return type (set by col_type_null).

12279 02/17/2014 12:52 PM Aaron Marcuse-Kubitza

schemas/util.sql: diff_cols(): renamed to diff_queries() because multiple columns are supported

12278 02/17/2014 12:26 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: diff_cols(): don't assume that each side will have one column, as many of our validations queries have multiple columns

12277 02/17/2014 11:45 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: diff_views(): need to use $2, not $1, for the 2nd query

12276 02/17/2014 11:40 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: materialize_query(): remove any extra blank line before the query, to improve readability when newlines are used as a log message separator and are therefore confusing in the middle of a log message

12275 02/17/2014 11:37 AM Aaron Marcuse-Kubitza

schemas/util.sql: added ltrim_nl()

12274 02/17/2014 11:25 AM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: setting search_path locally: also need to set function option search_path, in order to limit the effects of `SET LOCAL search_path` (mk_set_search_path()) to the current function (http://www.postgresql.org/docs/9.1/static/sql-set.html#AEN75423)

12273 02/17/2014 11:14 AM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: setting search_path locally: need to use `SET LOCAL search_path TO` instead of `PERFORM set_config(search_path, ..., is_local := true)` because the meaning of is_local refers to the entire transaction, not just the current function (as for LOCAL)

12272 02/17/2014 11:05 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_set_search_path(VARIADIC schemas text[])

12271 02/17/2014 10:54 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_use_own_schema()

12270 02/17/2014 10:52 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_set_search_path()

12269 02/17/2014 10:17 AM Aaron Marcuse-Kubitza

schemas/util.sql: use builtin string_agg(..., ) instead of concat()

12268 02/17/2014 12:34 AM Aaron Marcuse-Kubitza

schemas/util.sql: added qual_name(type unknown) to avoid needing to explicitly specify the type of an input string

12267 02/17/2014 12:31 AM Aaron Marcuse-Kubitza

schemas/util.sql: qual_name(table_ regclass): use ::text with search_path=pg_temp like qual_name(type regtype), rather than casting to text and then using qual_name(type regtype)

12266 02/17/2014 12:25 AM Aaron Marcuse-Kubitza

schemas/util.sql: type_qual_name(type regtype): renamed to qual_name(type regtype) to match qual_name(table_ regclass)

12265 02/17/2014 12:17 AM Aaron Marcuse-Kubitza

schemas/util.sql: added rematerialize_query()

12264 02/16/2014 11:59 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added rematerialize_in_view()

12263 02/16/2014 11:16 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: rematerialize_out_view(): pass a schema-qualified name to util.rematerialize_view() to avoid depending on the search_path to create it in the right schema

12262 02/16/2014 11:08 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: materialize_query(): support schema-qualified tables. this requires escaping tables in calls to this function.

12261 02/16/2014 10:52 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added rematerialize_out_view(in_view regclass)

12260 02/16/2014 10:45 PM Aaron Marcuse-Kubitza

schemas/util.sql: added qual_name()

12259 02/16/2014 09:47 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added rematerialize_out_view(datasource_schema text, out_view regclass)

12258 02/16/2014 09:39 PM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: source_by_shortname(): added schema_anchor so that it always applies to the schema it's defined in, even if `public` is not in the search_path

12257 02/16/2014 09:20 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: functions with schema_anchors: documented that they must use LANGUAGE plpgsql because LANGUAGE sql does not support runtime changes of search_path (schema elements are bound at inline time rather than runtime)

12256 02/16/2014 09:14 PM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: functions with schema_anchors: must use plpgsql for these because the sql language does not support runtime changes of search_path (the schema elements they use are bound at inline time rather than runtime)

12255 02/16/2014 08:55 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: schema_null param: renamed to schema_anchor to clarify what this is for

12254 02/16/2014 08:52 PM Aaron Marcuse-Kubitza

fix: schemas/vegbien.sql: schema_null: clarified that this should always be left as the default value, not just usually

12253 02/16/2014 08:49 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: schema_null params: use schema_anchor instead of source for this, since it is guaranteed to exist regardless of which tables are in the VegBIEN schema

12252 02/16/2014 08:46 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: public: added schema_anchor (used with schema_null params)

12251 02/16/2014 07:54 PM Aaron Marcuse-Kubitza

schemas/util.sql: use new util.debug_print_sql() instead of `RAISE NOTICE` to improve readability of the debug output (which is used throughout the runscripts)

12250 02/16/2014 07:41 PM Aaron Marcuse-Kubitza

schemas/util.sql: added debug_print_sql()

12249 02/16/2014 07:31 PM Aaron Marcuse-Kubitza

schemas/util.sql: added raise_notice(), to allow NOTICEs to be raised in sql-language functions

12248 02/16/2014 05:56 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: removed no longer used concat() aggregate. use builtin string_agg() instead.

12247 02/16/2014 05:55 PM Aaron Marcuse-Kubitza

schemas/util.sql: added rematerialize_view()

12246 02/16/2014 04:22 PM Aaron Marcuse-Kubitza

bugfix: inputs/bien2_traits/validations.sql: use a wrapper function for util.ifnull() so that the views don't get dropped when the util schema is reinstalled

12245 02/16/2014 03:24 PM Aaron Marcuse-Kubitza

schemas/util.sql: schema(regtype), schema(regclass): use new schema(pg_namespace_oid oid)

12244 02/16/2014 03:22 PM Aaron Marcuse-Kubitza

schemas/util.sql: added schema(pg_namespace_oid oid)

12243 02/16/2014 03:15 PM Aaron Marcuse-Kubitza

schemas/util.sql: schema(regclass): use joins instead of nested SELECTs for consistency with schema(regtype)

12242 02/16/2014 03:08 PM Aaron Marcuse-Kubitza

schemas/util.sql: regenerated from DB, which reorders the functions

12241 02/16/2014 02:44 PM Aaron Marcuse-Kubitza

schemas/util.sql: table_name(): renamed to name(regclass) for consistency with other name(...) functions

12240 02/16/2014 02:28 PM Aaron Marcuse-Kubitza

schemas/util.sql: table_schema(): renamed to schema(regclass) for consistency with other schema(...) functions

12239 02/16/2014 01:29 PM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks: Redmine: added links to the REST API for exporting data. svn: added instructions for using svnsync to export a repository. PostgreSQL: removed duplicate pages that were linked for multiple versions of Postgres.

12238 02/16/2014 06:45 AM Aaron Marcuse-Kubitza

schemas/util.sql: schema_ident(): renamed to schema_esc() for clarity

12237 02/16/2014 06:42 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: added schema_anchor, for use with schema_null params

12236 02/16/2014 06:39 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_search_path()

12235 02/16/2014 02:14 AM Aaron Marcuse-Kubitza

schemas/*.sql: make sure every COMMENT starts and ends on its own line, so that it appears correctly in the formats it's most likely to be read in (ie. in the DDL export, not the COMMENT edit box in pgAdmin)

12234 02/15/2014 03:51 PM Aaron Marcuse-Kubitza

schemas/util.sql: added materialize_view()

12233 02/15/2014 03:46 PM Aaron Marcuse-Kubitza

schemas/util.sql: added table_name()

12232 02/15/2014 03:45 PM Aaron Marcuse-Kubitza

schemas/util.sql: table_schema(): removed unneeded STRICT, which prevents inlining

12231 02/15/2014 03:41 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: fix_array(): removed no longer accurate comment about effects of STRICT, which is no longer used

12230 02/15/2014 03:28 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: materialize_query(): 1st param should be named table_, not view_

12229 02/15/2014 02:50 PM Aaron Marcuse-Kubitza

schemas/util.sql: added drop_view()

12228 02/15/2014 02:46 PM Aaron Marcuse-Kubitza

schemas/util.sql: added materialize_query()

12227 02/15/2014 04:08 AM Aaron Marcuse-Kubitza

/README.TXT: Schema changes: clarified that the staging tables should only be reinstalled if needed

12226 02/15/2014 04:08 AM Aaron Marcuse-Kubitza

/README.TXT: put ... around all uppercased text, for consistency

12225 02/14/2014 04:36 PM Aaron Marcuse-Kubitza

_license/non-open-source/applies_to.txt: clarified that this is an exclusions list, not an inclusions list, in terms of what's open-source

12224 02/14/2014 03:09 PM Aaron Marcuse-Kubitza

validation/aggregating/*/*.sql, schemas/vegbien.sql, lib/runscripts/validations.pg.sql.run, inputs/bien2_traits/validations.sql: added _ to beginning of each view name so the validation views would sort at the top in the datasource's tables list. this will also make the validation result sets easily distinguishable from the data tables.

12223 02/14/2014 02:34 PM Aaron Marcuse-Kubitza

validation/aggregating/*/*.sql: renamed views to match the current naming scheme in the DB. these files still need to be kept up-to-date because there are some queries that haven't been implemented yet, and therefore exist only in these files, not the DB.

12222 02/14/2014 12:39 PM Aaron Marcuse-Kubitza

schemas/util.sql: ifnull(): use COALESCE instead, because it turns out that MySQL's IFNULL is just a special case of this

12221 02/14/2014 12:20 PM Aaron Marcuse-Kubitza

added inputs/bien2_traits/validations.sql, from validation/aggregating/traits/BIEN2_traits/bien3_validations_traits_original_mysql.VegCore.sql

12220 02/14/2014 12:20 PM Aaron Marcuse-Kubitza

inputs/input.Makefile: $(svnFilesGlob): added validations.sql

12219 02/14/2014 12:03 PM Aaron Marcuse-Kubitza

bugfix: validation/aggregating/traits/BIEN2_traits/bien3_validations_traits_original_mysql.VegCore.sql: added util to search_path so that IFNULL would link to util.ifnull()

12218 02/14/2014 11:55 AM Aaron Marcuse-Kubitza

schemas/util.sql: added ifnull(), equivalent to MySQL's IFNULL (Postgres auto-lowercases the name)

12217 02/14/2014 11:40 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): documented that the purpose of not redirecting fd 2 back to fd 2 is to allow log-filtering out an otherwise-confusing benign error

12216 02/14/2014 11:30 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: ignore_err_msg(): documented that unlike `|| true`, this suppresses only errors caused by a particular error message, rather than all error exit statuses

12215 02/14/2014 11:28 AM Aaron Marcuse-Kubitza

bugfix: lib/runscripts/validations.pg.sql.run: updated table match pattern to include the type prefix that validations queries now contain

12214 02/14/2014 11:16 AM Aaron Marcuse-Kubitza

bugfix: lib/runscripts/validations.pg.sql.run: --table: need to include explicit schema so that matching tables from other schemas are not included

12213 02/14/2014 11:00 AM Aaron Marcuse-Kubitza

added inputs/bien2_traits/validations.sql.run

12212 02/14/2014 11:00 AM Aaron Marcuse-Kubitza

added lib/runscripts/validations.pg.sql.run

12211 02/14/2014 10:59 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stdout_contains(): usage: documented that this requires a `{ ... } 41>&1` wrapper

12210 02/14/2014 10:57 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr2stdout(): clarified that fd 2 is not redirected back to fd 2

12209 02/14/2014 10:55 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): need to avoid redirecting stderr and stdout to the same place, because this prevents redirecting stdout back to the original stdout after stderr has been filtered using |

12208 02/14/2014 10:23 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: local_export_array: renamed to just export_array because this was a replacement for export, not local_export

12207 02/14/2014 10:21 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: local_*array: don't need -a because that it's an array is autodetected by the ()

12206 02/14/2014 10:20 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): actually don't need to declare PIPESTATUS_ in a separate command, because local does support arrays

12205 02/14/2014 10:18 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added local_export_array

12204 02/14/2014 10:17 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: local_array: clarified that this is only needed for older versions of bash (the lack of support for arrays has apparently been fixed)

12203 02/14/2014 10:12 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added local_array

12202 02/14/2014 10:07 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: stderr_matches(): usage: documented that now need to manually rethrow any command error, if applicable

12201 02/14/2014 10:04 AM Aaron Marcuse-Kubitza

*{.sh,run}: stderr_matches calls: don't need to wrap the command in `"try"` because stderr_matches now does this

12200 02/14/2014 09:55 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: `shopt -s lastpipe`: suppress error message if not supported