Project

General

Profile

# Date Author Comment
14085 07/16/2014 01:21 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: comment(element oid): need `objsubid = 0` filter so this doesn't use comments for any other objsubids

14083 07/16/2014 12:47 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: rematerialize_view(): also need to handle the target table's dependent views

14082 07/16/2014 12:38 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_drop_from_create(): need to use `IF EXISTS` so that the resulting statement also works if the target object does not yet exist

14081 07/16/2014 12:24 PM Aaron Marcuse-Kubitza

schemas/util.sql: mk_drop_from_create(): also support `SELECT util.drop_*()` statements, in addition to DROP

13962 07/10/2014 08:41 AM Aaron Marcuse-Kubitza

schemas/util.sql: replace_words(): use map_words() to enable inlining the concatenated hstore, so that it doesn't need to be concatenated on each function call

13961 07/10/2014 08:39 AM Aaron Marcuse-Kubitza

schemas/util.sql: added map_words()

13960 07/10/2014 08:16 AM Aaron Marcuse-Kubitza

schemas/util.sql: added date_from_spanish()

13959 07/10/2014 08:13 AM Aaron Marcuse-Kubitza

schemas/util.sql: added replace_words()

13958 07/10/2014 08:09 AM Aaron Marcuse-Kubitza

schemas/util.sql: added words(text)

13957 07/10/2014 08:02 AM Aaron Marcuse-Kubitza

schemas/util.sql: spanish_date_words(): switched to using hstore because this is better for the algorithm that will translate these

13956 07/10/2014 07:20 AM Aaron Marcuse-Kubitza

schemas/util.sql: added spanish_date_words()

13955 07/10/2014 07:19 AM Aaron Marcuse-Kubitza

schemas/util.sql: added `replacement` type

13954 07/10/2014 04:09 AM Aaron Marcuse-Kubitza

bugfix: mk_set_relation_metadata(): need to include col comments as well so that these are re-created properly by recreate()

13953 07/10/2014 04:07 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_set_comments(regclass)

13952 07/10/2014 04:06 AM Aaron Marcuse-Kubitza

schemas/util.sql: show_set_comment(regclass): renamed to mk_set_comment() to match other mk_set_comment() functions

13951 07/10/2014 04:01 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_set_col_comments(regclass)

13950 07/10/2014 03:58 AM Aaron Marcuse-Kubitza

schemas/util.sql: added cols(regclass)

13949 07/10/2014 03:56 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_set_comment(col_ref)

13938 07/09/2014 09:40 AM Aaron Marcuse-Kubitza

schemas/util.sql: mk_set_comment(table_ regclass, comment text): use new util.mk_set_comment(text, text)

13937 07/09/2014 09:38 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_set_comment(col col_ref, comment text)

13936 07/09/2014 09:37 AM Aaron Marcuse-Kubitza

schemas/util.sql: added sql(col_ref)

13935 07/09/2014 09:35 AM Aaron Marcuse-Kubitza

schemas/util.sql: added mk_set_comment(on_ text, comment text)

13934 07/09/2014 07:53 AM Aaron Marcuse-Kubitza

schemas/util.sql: added comment(col_ref)

13933 07/09/2014 07:50 AM Aaron Marcuse-Kubitza

schemas/util.sql: added col_num(col_ref)

13927 07/07/2014 07:33 AM Aaron Marcuse-Kubitza

schemas/util.sql: in_south_america(): optimized by using BETWEEN instead of util.contained_within__no_dateline(). this reduces the filter time for 2014-6-4.Iara_Lacher.reserve_prioritization by about 10%.

13924 07/07/2014 06:55 AM Aaron Marcuse-Kubitza

bugfix: in_south_america(): must use util.contained_within__no_dateline() instead of util.contained_within_approx() to ensure that the more accurate geometry logic is used

13916 07/07/2014 06:14 AM Aaron Marcuse-Kubitza

schemas/util.sql: materialize_view(): use util.copy() instead of util.materialize_query() so that all view metadata is transferred

13909 07/07/2014 04:38 AM Aaron Marcuse-Kubitza

schemas/util.sql: added subspecies()

13907 07/07/2014 03:55 AM Aaron Marcuse-Kubitza

schemas/util.sql: added south_america(), in_south_america()

13906 07/07/2014 03:37 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: OPERATOR ~(geocoord, postgis.geometry): renamed to because this is not an approximate comparison for geometry

13905 07/07/2014 03:35 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: contained_within_approx(geocoord, postgis.geometry): renamed to contained_within__no_dateline(__) because this is not an approximate comparison for geometry

13904 07/07/2014 03:30 AM Aaron Marcuse-Kubitza

schemas/util.sql: lat_long_in_new_world(): renamed to just in_new_world() because the lat/long is implied by the param type

13903 07/07/2014 03:08 AM Aaron Marcuse-Kubitza

schemas/util.sql: lat_long_in_new_world(): take a geocoord param instead of separate lat/long params

13901 07/06/2014 11:08 PM Aaron Marcuse-Kubitza

schemas/util.sql: added contained_within_approx(geocoord, geometry) and corresponding OPERATOR ~@(geocoord, geometry)

13900 07/06/2014 10:39 PM Aaron Marcuse-Kubitza

schemas/util.sql: added OPERATOR ~@(geocoord, geography)

13899 07/06/2014 10:23 PM Aaron Marcuse-Kubitza

schemas/util.sql: lat_long_in_new_world(): use new contained_within_approx(geocoord, geography)

13898 07/06/2014 10:17 PM Aaron Marcuse-Kubitza

schemas/util.sql: added contained_within_approx(geocoord, postgis.geography), which enables specifying just `(lat, long)` without the ::util.geocoord type specifier

13897 07/06/2014 04:04 PM Aaron Marcuse-Kubitza

schemas/util.sql: OPERATOR (postgis.geography, postgis.geography): renamed to ~ because it's approximate

13896 07/06/2014 03:52 PM Aaron Marcuse-Kubitza

schemas/util.sql: contained_within(): renamed to contained_within_approx() because the latitude lines of geography type bounding boxes bulge outward, creating false positives above and below the bounding box

13895 07/06/2014 03:50 PM Aaron Marcuse-Kubitza

schemas/util.sql: added contained_within__no_dateline(geometry, geometry) and corresponding operator @

13894 07/06/2014 02:51 PM Aaron Marcuse-Kubitza

schemas/util.sql: contained_within(): renamed to contained_within_approx() because the latitude lines of geography type bounding boxes bulge outward, creating false positives above and below the bounding box

13893 07/06/2014 05:49 AM Aaron Marcuse-Kubitza

schemas/util.sql: geometry(geocoord): documented that it is not possible to create a cast for this, as a bug in pg_dump prevents the cast from being exported, even when no export filters are applied

13892 07/05/2014 12:40 PM Aaron Marcuse-Kubitza

schemas/util.sql: point(geocoord): renamed to geometry(geocoord) since this is now a cast

13891 07/05/2014 12:03 PM Aaron Marcuse-Kubitza

schemas/util.sql: point(): return geometry instead of geography to support using points with geometry arithmetic

13890 07/05/2014 11:24 AM Aaron Marcuse-Kubitza

schemas/util.sql: point(): take a single util.geocoord param instead of separate lat/long

13889 07/05/2014 10:45 AM Aaron Marcuse-Kubitza

schemas/util.sql: added geocoord type

13887 07/04/2014 08:25 PM Aaron Marcuse-Kubitza

schemas/util.sql: bounding_box(): use bounding_box__no_dateline() to construct the postgis.geometry object

13886 07/04/2014 08:23 PM Aaron Marcuse-Kubitza

schemas/util.sql: added bounding_box__no_dateline(), which is more accurate than util.bounding_box() (latitude lines will be straight), but geocoordinate wraparound is not supported

13841 06/25/2014 04:04 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: view_def_to_orig(): need to handle cases when list of cols from the same table is not an expanded * expression

13840 06/25/2014 03:59 AM Aaron Marcuse-Kubitza

schemas/util.sql: added view_is_subset(view_def text)

13839 06/25/2014 03:58 AM Aaron Marcuse-Kubitza

schemas/util.sql: added view_is_automatically_updatable(view_def text)

13838 06/25/2014 03:23 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: show_create_view(): use the overridden version of pg_get_viewdef(), which supports expanded * expressions. this was possibly being used already whenever util happened to be in the search_path.

13823 06/19/2014 02:27 AM Aaron Marcuse-Kubitza

schemas/util.sql: lat_long_in_new_world(): use function rather than operator+search_path to allow inlining, which enables util.new_world() to only be evaluated once

13822 06/19/2014 02:24 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: operator @(postgis.geography, postgis.geography): must use wrapper function because st_coveredby() needs postgis to be in the search_path

13820 06/19/2014 01:45 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: point(): hide benign "Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY" notices

13817 06/18/2014 08:49 PM Aaron Marcuse-Kubitza

schemas/util.sql: lat_long_in_new_world(): documented that this includes false positives above and below the New World bounding box, as described in util.bounding_box()

13816 06/18/2014 08:44 PM Aaron Marcuse-Kubitza

schemas/util.sql: bounding_box(): documented that the geography type stores all edges as arcs of great circles, resulting in the latitude lines bulging outward from the true bounding box. this will create false positives above and below the bounding box.

13815 06/18/2014 08:38 PM Aaron Marcuse-Kubitza

schemas/util.sql: added lat_long_in_new_world()

13814 06/18/2014 08:35 PM Aaron Marcuse-Kubitza

schemas/util.sql: added operator @(postgis.geography, postgis.geography). can't use && for this because it only compares 2D bounding boxes (which are geometry objects that do not support geocoordinate wraparound).

13813 06/18/2014 08:06 PM Aaron Marcuse-Kubitza

schemas/util.sql: added point()

13812 06/18/2014 08:00 PM Aaron Marcuse-Kubitza

schemas/util.sql: new_world(): removed no longer needed cast to postgis.geography

13811 06/18/2014 07:59 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: bounding_box(): must use postgis.geography (instead of postgis.geometry) because that handles geocoordinate wraparound correctly

13810 06/18/2014 07:52 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: bounding_box(): need to explicitly set SRID to make sure the correct value is used

13809 06/18/2014 07:39 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: bounding_box(): use st_makeenvelope() instead of st_makebox2d() because st_makebox2d() doesn't support geocoordinate wraparound (it is not SRID-aware)

13808 06/18/2014 07:32 PM Aaron Marcuse-Kubitza

schemas/util.sql: new_world(): removed no longer needed cast to postgis.geometry

13807 06/18/2014 07:31 PM Aaron Marcuse-Kubitza

schemas/util.sql: bounding_box(): return postgis.geometry instead of postgis.box2d because box2d is not directly used in postgis functions

13805 06/18/2014 04:43 PM Aaron Marcuse-Kubitza

schemas/util.sql: added new_world()

13804 06/18/2014 04:30 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: bounding_box(): use util.range instead of numrange to support wraparound ranges for geocoordinates

13803 06/18/2014 04:26 PM Aaron Marcuse-Kubitza

schemas/util.sql: range(numeric, numeric): use util.range instead of numrange to support wraparound ranges (which use a modulus system such as geocoordinates)

13802 06/18/2014 04:20 PM Aaron Marcuse-Kubitza

schemas/util.sql: added `range` type (and cast to numrange), which allows wraparound ranges such as for geocoordinates

13801 06/18/2014 03:56 PM Aaron Marcuse-Kubitza

schemas/util.sql: bounding_box(): documented usage

13799 06/18/2014 03:52 PM Aaron Marcuse-Kubitza

schemas/util.sql: added bounding_box()

13795 06/17/2014 04:48 PM Aaron Marcuse-Kubitza

schemas/util.sql: range(numeric, numeric): use simpler numrange() constructor instead of text input syntax

13794 06/17/2014 04:39 PM Aaron Marcuse-Kubitza

schemas/util.sql: operator functions: renamed to plain-text names to follow the Postgres convention of making the function name be the human-readable name of the operator

13790 06/16/2014 06:50 PM Aaron Marcuse-Kubitza

schemas/util.sql: added ~ operator for ranges

13645 06/05/2014 07:15 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: view_def_to_orig(): also need to merge .* expressions resulting from a SELECT * of a join, to avoid duplicated columns

13644 06/05/2014 06:52 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: view_def_to_orig(): require at least 6 cols to avoid false positives in the expansion match pattern

13643 06/05/2014 06:49 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: view_def_to_orig(): 1st col: can't prepend \y because it considers only \w chars, not "

13642 06/05/2014 06:35 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: view_def_to_orig(): don't match whitespace in the middle of a "" identifier, as this could throw off the parser

13641 06/05/2014 06:34 AM Aaron Marcuse-Kubitza

schemas/util.sql: eval(): restore user's intent by running util.view_def_to_orig() on the query to unexpand expanded * expressions

13640 06/05/2014 05:50 AM Aaron Marcuse-Kubitza

schemas/util.sql: pg_get_viewdef(): use util.view_def_to_orig()

13639 06/05/2014 05:50 AM Aaron Marcuse-Kubitza

schemas/util.sql: added view_def_to_orig()

13638 06/05/2014 05:46 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: pg_get_viewdef(): should be STABLE because it references system catalogs

13637 06/05/2014 05:44 AM Aaron Marcuse-Kubitza

schemas/util.sql: added pg_get_viewdef() wrapper, which unexpands expanded * expressions

13608 06/03/2014 10:25 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_drop_from_create(): need to match first rather than last CREATE

13606 06/03/2014 09:52 AM Aaron Marcuse-Kubitza

schemas/util.sql: recreate_view(): support omitting the view_query if the view has already been modified (eg. for public.*_view, which allow changing the view as a separate step)

13604 06/03/2014 08:52 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: recreate(): need to handle case where util.mk_drop_from_create() is NULL

13603 06/03/2014 08:45 AM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_drop_from_create(): only match CREATE if no custom DROP came before it

13601 06/03/2014 08:19 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: explain2notice_msg_if_can(): also need to catch invalid_cursor_definition ("cannot open multi-query plan as cursor")

13599 06/03/2014 07:39 AM Aaron Marcuse-Kubitza

schemas/util.sql: added copy()

13598 06/03/2014 07:36 AM Aaron Marcuse-Kubitza

schemas/util.sql: added copy_data()

13566 05/30/2014 06:22 PM Aaron Marcuse-Kubitza

schemas/util.sql: added seq__reset()

13565 05/30/2014 06:15 PM Aaron Marcuse-Kubitza

schemas/util.sql: added seq__create()

13564 05/30/2014 06:11 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: try_cast(), is_castable(): also catch invalid_schema_name, thrown by `'pg_temp.__'::regclass`

13535 05/27/2014 03:21 AM Aaron Marcuse-Kubitza

fix: schemas/util.sql: mk_drop_from_create(): also support CREATE queries that include the SELECT statement on the same line as the CREATE

13529 05/26/2014 11:41 PM Aaron Marcuse-Kubitza

schemas/util.sql: create_if_not_exists(): print message if already exists, so the function doesn't inexplicably appear not to have run at all

13525 05/23/2014 06:09 PM Aaron Marcuse-Kubitza

schemas/util.sql: added recreate_view(), a special case of util.recreate()

13524 05/23/2014 04:24 PM Aaron Marcuse-Kubitza

fix: schemas/util.sql: recreate(): usage: use `schema` instead of `schemas`

13517 05/21/2014 07:30 PM Aaron Marcuse-Kubitza

schemas/util.sql: recreate(): perform the correct DROP VIEW in the function itself so that the caller does not have to worry about forming it properly

13516 05/21/2014 07:19 PM Aaron Marcuse-Kubitza

bugfix: schemas/util.sql: mk_drop_from_create(): added `DROP`