schemas/util.sql: show_views_like(): take a schema regexp like util.show_relations_like(), to allow matching views in all schemas
schemas/util.sql: added str_equality_regexp(literal text)
schemas/util.sql: util.remake_diff_table(): don't force-re-create type_table. this allows type_table to be shared between multiple diff tables.
schemas/util.sql: added curr_func(func text, schema_anchor anyelement)
schemas/util.sql: removed unneeded regproc(regprocedure), regprocedure(regproc) because these can actually be directly cast to one another, not just via oid
schemas/util.sql: added quote_func_call()
schemas/util.sql: added regprocedure(text)
schemas/util.sql: func2regproc*(): removed func2* so that this has the format of a cast function (which it is)
schemas/util.sql: added func2regproc(regprocedure)
schemas/util.sql: added func2regprocedure(regproc)
schemas/util.sql: added quote_typed()
schemas/util.sql: remake_diff_table(): use util.append_comment() instead of util.set_comment() to allow other functions to add comments to the diff table
schemas/util.sql: added append_comment(regclass)
schemas/util.sql: added comment(oid)
fix: schemas/util.sql: drop_relation(text), rename_relation(text, text): appended _esc to params that should be passed in escaped, and _name to those that shouldn't
bugfix: schemas/util.sql: rename_relation(): need quote_ident() around to_
bugfix: schemas/util.sql: truncated_prefixed_name_regexp(): need to match the entire string, so that the regexp can be used with util.replace_suffix()
bugfix: schemas/util.sql: truncated_prefixed_name_regexp(): need to pass max_prefix_len to util.name_was_truncated() because although the name itself might not have been truncated, it might become truncated once prefixed
schemas/util.sql: name_was_truncated(): support max_prefix_len param to determine truncation of something that will be prefixed
fix: name_was_truncated(): should use util.namedatalen() instead of hardcoding the value
schemas/util.sql: replace_suffix(): support strings that have been truncated (eg. as a table name) due to the prepending of a prefix
schemas/util.sql: added truncated_prefixed_name_regexp()
schemas/util.sql: added rtrim_n()
schemas/util.sql: added name_was_truncated()
schemas/util.sql: added namedatalen()
schemas/util.sql: drop_relation(regclass), rename_relation(regclass): use util.qual_name() instead of ::text so that the schema qualifier is always included in the debug SQL
schemas/util.sql: added replace_suffix()
schemas/util.sql: added rename_relation(regclass/text, text)
fix: schemas/util.sql: drop_relation(): documented that it is actually not idempotent, because the regclass will not be valid after the relation is dropped
schemas/util.sql: drop_relation(relation text, type text): put type param first because it is usually constant
schemas/util.sql: drop_table(), drop_view(): use drop_relation(relation text, type text)
schemas/util.sql: drop_relation(regclass): use simpler drop_relation(relation text, type text)
schemas/util.sql: added relation_type(regclass)
schemas/util.sql: added drop_relation(relation text, type text)
bugfix: schemas/util.sql: drop_relation(): need to pass force param to util.drop_*()
schemas/util.sql: added relation_type_char(regclass)
bugfix: schemas/util.sql: relation_type(character): must use "char" type for single character, as character actually allows multiple characters. corrected return type.
schemas/util.sql: added relation_type(character)
schemas/util.sql: schema_matches(): should be IMMUTABLE, not STABLE, because it uses only parameter values
schemas/util.sql: added regexp_quote()
fix: schemas/util.sql: is_table(), is_view(): should be STABLE, not IMMUTABLE, because they reference tables
schemas/util.sql: added drop_relation()
schemas/util.sql: added is_table()
schemas/util.sql: added is_view()
bugfix: schemas/util.sql: show_views_like(): need to match the schema exactly, not via regexp like util.show_relations_like() does
schemas/util.sql: show_views_like(): use util.show_relations_like()
schemas/util.sql: show_views_like(): reversed argument order to match show_relations_like()
schemas/util.sql: added show_relations_like()
schemas/util.sql: added schema_matches()
schemas/util.sql: materialize_query(): ANALYZE the created table so that it has the correct estimated rowcount
schemas/util.sql: added analyze_()
schemas/util.sql: added raise_error_notice()
bugfix: schemas/util.sql: diff(text, text): also need to include only different rows when comparing single-row tables
schemas/util.sql: show_views_like(): added predictable ordering
schemas/util.sql: added show_views_like()
schemas/util.sql: added schema_oid()
schemas/util.sql: remake_diff_table(): add comment on the diff table showing how to view it in human-readable form. (the table unfortunately cannot be materialized in human-readable form, because this would create column name collisions between the two sides.)
schemas/util.sql: added set_comment()
schemas/util.sql: added eval2records()
fix: schemas/util.sql: diff(regclass, regclass): display single row tables side-by-side
schemas/util.sql: diff(text, text): implemented the single_row feature
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).
fix: schemas/util.sql: remake_diff_table(): util.diff() call: include explicit types on arguments to ensure that the correct diff() variant is used
schemas/util.sql: added has_single_row()
schemas/util.sql: added remake_diff_table()
schemas/util.sql: drop_*(): added force param to use CASCADE mode
fix: schemas/util.sql: diff(regclass, regclass): usage: col_type_null must actually be a shared base type of the tables
fix: schemas/util.sql: diff(regclass, regclass): usage: text arguments must be cast to regclass to bind the right variant of diff()
fix: schemas/util.sql: diff(regclass, regclass): renamed params to *_table because these actually can't be views, since views don't support inheritance
schemas/util.sql: added copy_struct()
schemas/util.sql: added inherit()
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
schemas/util.sql: renamed diff_views(), diff_any() to diff(...) because they are overloads of the same operation
schemas/util.sql: diff_any(): documented how to run EXPLAIN on the FULL JOIN query
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.
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).
schemas/util.sql: diff_cols(): renamed to diff_queries() because multiple columns are supported
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
bugfix: schemas/util.sql: diff_views(): need to use $2, not $1, for the 2nd query
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
schemas/util.sql: added ltrim_nl()
schemas/util.sql: added mk_set_search_path(VARIADIC schemas text[])
schemas/util.sql: added mk_use_own_schema()
schemas/util.sql: added mk_set_search_path()
schemas/util.sql: use builtin string_agg(..., ) instead of concat()
schemas/util.sql: added qual_name(type unknown) to avoid needing to explicitly specify the type of an input string
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)
schemas/util.sql: type_qual_name(type regtype): renamed to qual_name(type regtype) to match qual_name(table_ regclass)
schemas/util.sql: added rematerialize_query()
schemas/vegbien.sql: materialize_query(): support schema-qualified tables. this requires escaping tables in calls to this function.
schemas/util.sql: added qual_name()
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)
schemas/util.sql: added debug_print_sql()
schemas/util.sql: added raise_notice(), to allow NOTICEs to be raised in sql-language functions
schemas/util.sql: added rematerialize_view()
schemas/util.sql: schema(regtype), schema(regclass): use new schema(pg_namespace_oid oid)
schemas/util.sql: added schema(pg_namespace_oid oid)
schemas/util.sql: schema(regclass): use joins instead of nested SELECTs for consistency with schema(regtype)
schemas/util.sql: regenerated from DB, which reorders the functions
schemas/util.sql: table_name(): renamed to name(regclass) for consistency with other name(...) functions