Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #121 from citusdata/develop
cstore v1.5
- Loading branch information
Showing
16 changed files
with
311 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* cstore_fdw/cstore_fdw--1.4--1.5.sql */ | ||
|
||
CREATE FUNCTION cstore_clean_table_resources(oid) | ||
RETURNS void | ||
AS 'MODULE_PATHNAME' | ||
LANGUAGE C STRICT; | ||
|
||
CREATE OR REPLACE FUNCTION cstore_drop_trigger() | ||
RETURNS event_trigger | ||
LANGUAGE plpgsql | ||
AS $csdt$ | ||
DECLARE v_obj record; | ||
BEGIN | ||
FOR v_obj IN SELECT * FROM pg_event_trigger_dropped_objects() LOOP | ||
|
||
IF v_obj.object_type NOT IN ('table', 'foreign table') THEN | ||
CONTINUE; | ||
END IF; | ||
|
||
PERFORM cstore_clean_table_resources(v_obj.objid); | ||
|
||
END LOOP; | ||
END; | ||
$csdt$; | ||
|
||
CREATE EVENT TRIGGER cstore_drop_event | ||
ON SQL_DROP | ||
EXECUTE PROCEDURE cstore_drop_trigger(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.