sql
stringlengths
6
1.05M
<filename>library/src/test/resources/find_top_users.sql SELECT * FROM users ORDER BY karma LIMIT 5
<reponame>luizgribeiro/airbyte {{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} -- SQL model to build a hash column based on the values of this record select *, {{ dbt_utils.surrogate_key([ '_AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID', array_to_string('DOUBLE_ARRAY_DATA'), array_to_string('DATA'), array_to_string(adapter.quote('column`_\'with""_quotes')), ]) }} as _AIRBYTE_PARTITION_HASHID from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2') }} -- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition
<gh_stars>1-10 USE adventureworks; -- the table -- columns SELECT * FROM Person.Person; -- only the columns we want SeLeCt FirstName, LastName from Person.Person; -- only the columns i want, only the rows i want SELECT FirstName, LastName FROM Person.Person WHERE LastName = 'Adams'; SELECT FirstName, LastName FROM Person.Person WHERE LastName >= 'A' and LastName < 'D'; -- SELECT FirstName, LastName FROM Person.Person WHERE LastName like '[AB]%'; SELECT COUNT(*) FROM Person.Person WHERE LastName = 'Adams'; SELECT * FROM Sales.SalesOrderDetail; -- total number of product 776 ordered ever SELECT SUM(OrderQty) FROM Sales.SalesOrderDetail WHERE ProductID = 776; SELECT COUNT(FirstName) as [dupe-count], FirstName, LastName FROM Person.Person WHERE LastName < 'B' GROUP BY LastName, FirstName HAVING COUNT(FirstName) > 1; -- SELECT statement execution order -- from -- where -- group by -- having -- select -- order by SELECT * FROM Person.Person ORDER BY LastName DESC;
<filename>src/database/database.sql /** * SQL file * Schemas and most used querys for test database * */ CREATE TABLE Users ( id INT UNSIGNED AUTO_INCREMENT, name VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, email VARCHAR(50) NOT NULL, password VARCHAR(50) NOT NULL, createdAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, updatedAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY ( id ) ); INSERT INTO Users ( name, lastname, email, password, createdAt, updatedAt ) VALUES ( 'Todd', 'Davis', '<EMAIL>', '<PASSWORD>', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP ); SHOW TABLES; SELECT * FROM Users; DROP TABLE Users;
-- file:tstypes.sql ln:57 expect:true SELECT E'1&(''2''&('' 4''&(\\|5 | ''6 \\'' !|&'')))'::tsquery
CREATE TABLE SIDECAR ( URL varchar NOT NULL PRIMARY KEY, PARENT_URL varchar NOT NULL, LAST_MODIFIED_TIME datetime NOT NULL, LIBRARY_ID varchar NOT NULL );
SET current refresh age 0; CREATE summary TABLE ?SCHEMA?.storesum as ( SELECT store, quarter, item, sum(sales) as total, count(*) as qty FROM ?SCHEMA?.transactions GROUP BY store, quarter, item ) data initially deferred refresh deferred not logged initially;
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50717 Source Host : 127.0.0.1:3306 Source Database : news Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2018-03-08 21:21:07 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for admin -- ---------------------------- DROP TABLE IF EXISTS `admin`; CREATE TABLE `admin` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `uname` varchar(20) DEFAULT NULL, `pass` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; -- ---------------------------- -- Records of admin -- ---------------------------- INSERT INTO `admin` VALUES ('1', 'yetong', '<PASSWORD>'); -- ---------------------------- -- Table structure for comment -- ---------------------------- DROP TABLE IF EXISTS `comment`; CREATE TABLE `comment` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `a_id` int(11) DEFAULT NULL, `u_id` int(11) DEFAULT NULL, `uname` varchar(20) DEFAULT NULL, `content` varchar(500) DEFAULT NULL, `c_time` int(11) unsigned DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4; -- ---------------------------- -- Records of comment -- ---------------------------- INSERT INTO `comment` VALUES ('8', '1', '3', '青石渔者', '杨欢杨欢欢', '1519975341'); INSERT INTO `comment` VALUES ('9', '1', '3', '青石渔者', '这是啥', '1519976782'); INSERT INTO `comment` VALUES ('10', '1', '3', '青石渔者', '阿斯顿发士大夫', '1519976885'); INSERT INTO `comment` VALUES ('11', '1', '3', '青石渔者', '阿斯顿发士大夫', null); INSERT INTO `comment` VALUES ('12', '1', '3', '青石渔者', 'sdfasdf', null); INSERT INTO `comment` VALUES ('13', '1', '3', '青石渔者', 'dddddddddddddd', null); INSERT INTO `comment` VALUES ('14', '1', '3', '青石渔者', 'asdfa', null); INSERT INTO `comment` VALUES ('15', '1', '3', '青石渔者', 'adsf', null); INSERT INTO `comment` VALUES ('16', '1', '3', '青石渔者', 'afds', null); INSERT INTO `comment` VALUES ('17', '1', '3', '青石渔者', 'afdsas', null); INSERT INTO `comment` VALUES ('18', '2', '3', '青石渔者', 'asf', null); INSERT INTO `comment` VALUES ('19', '16', '3', '青石渔者', '我怎么知道', null); INSERT INTO `comment` VALUES ('20', '4', '3', '青石渔者', '我怎么知道', null); -- ---------------------------- -- Table structure for message -- ---------------------------- DROP TABLE IF EXISTS `message`; CREATE TABLE `message` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `user` varchar(255) DEFAULT NULL, `method` varchar(255) DEFAULT NULL, `content` text, `status` enum('-1','0') DEFAULT '0' COMMENT '0:默认, 1删除', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; -- ---------------------------- -- Records of message -- ---------------------------- INSERT INTO `message` VALUES ('1', 'dfg', 'df', 'sdfg', '-1'); -- ---------------------------- -- Table structure for news -- ---------------------------- DROP TABLE IF EXISTS `news`; CREATE TABLE `news` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) DEFAULT NULL COMMENT '新闻标题', `img` varchar(255) DEFAULT NULL COMMENT '展示图路径', `content` text COMMENT '详情', `create_time` int(11) unsigned DEFAULT NULL COMMENT '创建时间/更新时间', `publish_time` int(11) unsigned DEFAULT NULL COMMENT '发布时间', `status` enum('-1','1','0') DEFAULT '0' COMMENT '0:待审查(未发布), 1:发布中; -1:删除/关闭', `clicked` int(10) unsigned DEFAULT '0' COMMENT '点击率', `praise` int(10) unsigned DEFAULT '0' COMMENT '点赞量', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4; -- ---------------------------- -- Records of news -- ---------------------------- INSERT INTO `news` VALUES ('1', '为什么前端工程师多不愿意用 Bootstrap 框架?15', null, '<p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 14px; white-space: normal;\">本文通过设置&nbsp;<span style=\"box-sizing: border-box; font-weight: 600;\">Access-Control-Allow-Origin</span>&nbsp;来实现跨域。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 14px; white-space: normal;\">例如:<a href=\"http://xn--client-2h6jl6wv5ip7qnjkom3cc9l.runoob.com/\" style=\"box-sizing: border-box; color: rgb(3, 102, 214); text-decoration-line: none;\">客户端的域名是client.runoob.com</a>,<a href=\"http://xn--server-2h6jl6why8ahymlt0aslzil8a.runoob.com/\" style=\"box-sizing: border-box; color: rgb(3, 102, 214); text-decoration-line: none;\">而请求的域名是server.runoob.com</a>。</p><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 14px; white-space: normal;\">如果直接使用ajax访问,会有以下错误:</p><pre style=\"box-sizing: border-box; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 16px; font-stretch: normal; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(246, 248, 250); border-radius: 3px; color: rgb(36, 41, 46);\">XMLHttpRequest&nbsp;cannot&nbsp;load&nbsp;http://server.runoob.com/server.php.&nbsp;\nNo&nbsp;&#39;Access-Control-Allow-Origin&#39;&nbsp;header&nbsp;is&nbsp;present&nbsp;on&nbsp;the&nbsp;requested&nbsp;resource.\nOrigin&nbsp;&#39;http://client.runoob.com&#39;&nbsp;is&nbsp;therefore&nbsp;not&nbsp;allowed&nbsp;access.</pre><h4 style=\"box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; font-size: 1.25em; line-height: 1.25; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; white-space: normal;\"><a class=\"markdownIt-Anchor\" href=\"https://note.youdao.com/md/preview/preview.html?file=%2Fyws%2Fapi%2Fpersonal%2Ffile%2FD2C2FCB3B6064571825A289FA82EF1CA%3Fmethod%3Ddownload%26read%3Dtrue%26shareKey%3Dcbf1312b340d1f2bef8afafd9b1a312c#1-允许单个域名访问\" style=\"box-sizing: border-box; color: rgb(3, 102, 214); text-decoration-line: none;\"></a>1、允许单个域名访问</h4><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 14px; white-space: normal;\">指定某域名(<a href=\"http://client.runoob.com/\" style=\"box-sizing: border-box; color: rgb(3, 102, 214); text-decoration-line: none;\">http://client.runoob.com</a>)跨域访问,则只需在http://server.runoob.com/server.php文件头部添加如下代码:</p><pre style=\"box-sizing: border-box; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 16px; font-stretch: normal; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(246, 248, 250); border-radius: 3px; color: rgb(36, 41, 46);\">header(&#39;Access-Control-Allow-Origin:http://client.runoob.com&#39;);</pre><h4 style=\"box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; font-size: 1.25em; line-height: 1.25; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; white-space: normal;\"><a class=\"markdownIt-Anchor\" href=\"https://note.youdao.com/md/preview/preview.html?file=%2Fyws%2Fapi%2Fpersonal%2Ffile%2FD2C2FCB3B6064571825A289FA82EF1CA%3Fmethod%3Ddownload%26read%3Dtrue%26shareKey%3Dcbf1312b340d1f2bef8afafd9b1a312c#2-允许多个域名访问\" style=\"box-sizing: border-box; color: rgb(3, 102, 214); text-decoration-line: none;\"></a>2、允许多个域名访问</h4><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 14px; white-space: normal;\">指定多个域名(<a href=\"http://client1.runoob.com/\" style=\"box-sizing: border-box; color: rgb(3, 102, 214); text-decoration-line: none;\">http://client1.runoob.com</a>、<a href=\"http://client2.runoob.xn--com-pw6h/\" style=\"box-sizing: border-box; color: rgb(3, 102, 214); text-decoration-line: none;\">http://client2.runoob.com等</a>)跨域访问,则只需在http://server.runoob.com/server.php文件头部添加如下代码:</p><pre style=\"box-sizing: border-box; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 16px; font-stretch: normal; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(246, 248, 250); border-radius: 3px; color: rgb(36, 41, 46);\">$origin&nbsp;=&nbsp;isset($_SERVER[&#39;HTTP_ORIGIN&#39;])?&nbsp;$_SERVER[&#39;HTTP_ORIGIN&#39;]&nbsp;:&nbsp;&#39;&#39;;&nbsp;&nbsp;\n&nbsp;&nbsp;\n$allow_origin&nbsp;=&nbsp;array(&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&#39;http://client1.runoob.com&#39;,&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&#39;http://client2.runoob.com&#39;&nbsp;&nbsp;);&nbsp;&nbsp;\n&nbsp;&nbsp;\nif(in_array($origin,&nbsp;$allow_origin)){&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;header(&#39;Access-Control-Allow-Origin:&#39;.$origin);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n}</pre><h4 style=\"box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; font-size: 1.25em; line-height: 1.25; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; white-space: normal;\"><a class=\"markdownIt-Anchor\" href=\"https://note.youdao.com/md/preview/preview.html?file=%2Fyws%2Fapi%2Fpersonal%2Ffile%2FD2C2FCB3B6064571825A289FA82EF1CA%3Fmethod%3Ddownload%26read%3Dtrue%26shareKey%3Dcbf1312b340d1f2bef8afafd9b1a312c#3-允许所有域名访问\" style=\"box-sizing: border-box; color: rgb(3, 102, 214); text-decoration-line: none;\"></a>3、允许所有域名访问</h4><p style=\"box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 微软雅黑, &quot;PingFang SC&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 14px; white-space: normal;\">允许所有域名访问则只需在http://server.runoob.com/server.php文件头部添加如下代码:</p><pre style=\"box-sizing: border-box; font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; font-size: 11.9px; margin-top: 0px; font-stretch: normal; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(246, 248, 250); border-radius: 3px; color: rgb(36, 41, 46); margin-bottom: 0px !important;\">header(&#39;Access-Control-Allow-Origin:*&#39;);</pre><p><br/></p>', '1519869163', '1519869166', '-1', '103', '2'); INSERT INTO `news` VALUES ('2', 'layui 更适合哪些开发者?16', null, 'halkshfaslfklf', '1519869263', '1519869266', '-1', '131', '4'); INSERT INTO `news` VALUES ('3', '贤心是男是女?', null, '<p>阿法士大夫</p>', '1520249344', '1519869366', '0', '0', '3'); INSERT INTO `news` VALUES ('4', '为什么前端工程师多不愿意用 Bootstrap 框架?1', null, null, '1519869163', '1519869166', '1', '6', '2'); INSERT INTO `news` VALUES ('5', '为什么前端工程师多不愿意用 Bootstrap 框架?2', null, null, '1519869163', '1519869166', '1', '5', '4'); INSERT INTO `news` VALUES ('6', '为什么前端工程师多不愿意用 Bootstrap 框架?3', null, null, '1519869163', '1519869166', '1', '5', '9'); INSERT INTO `news` VALUES ('7', '为什么前端工程师多不愿意用 Bootstrap 框架?4', null, null, '1519869163', '1519869166', '1', '3', '5'); INSERT INTO `news` VALUES ('8', '为什么前端工程师多不愿意用 Bootstrap 框架?5', null, null, '1519869163', '1519869166', '1', '260', '4'); INSERT INTO `news` VALUES ('9', '为什么前端工程师多不愿意用 Bootstrap 框架?6', null, null, '1519869163', '1519869166', '1', '3', '6'); INSERT INTO `news` VALUES ('10', '为什么前端工程师多不愿意用 Bootstrap 框架?7', null, null, '1519869163', '1519869166', '1', '3', '5'); INSERT INTO `news` VALUES ('11', '为什么前端工程师多不愿意用 Bootstrap 框架?8', null, null, '1519869163', '1519869166', '1', '3', '7'); INSERT INTO `news` VALUES ('12', '为什么前端工程师多不愿意用 Bootstrap 框架?9', null, null, '1519869163', '1519869166', '1', '3', '5'); INSERT INTO `news` VALUES ('13', '为什么前端工程师多不愿意用 Bootstrap 框架?10', null, null, '1519869163', '1519869166', '1', '3', '6'); INSERT INTO `news` VALUES ('14', '为什么前端工程师多不愿意用 Bootstrap 框架?11', null, null, '1519869163', '1519869166', '1', '3', '8'); INSERT INTO `news` VALUES ('15', '为什么前端工程师多不愿意用 Bootstrap 框架?12', null, null, '1519869163', '1519869166', '1', '3', '8'); INSERT INTO `news` VALUES ('16', '为什么前端工程师多不愿意用 Bootstrap 框架?13', null, null, '1519869163', '1519869166', '1', '801', '7'); INSERT INTO `news` VALUES ('17', '为什么前端工程师多不愿意用 Bootstrap 框架?17', null, null, '1519869163', '1519869166', '-1', '3', '9'); INSERT INTO `news` VALUES ('18', '为什么前端工程师多不愿意用 Bootstrap 框架?18', null, null, '1519869163', '1519869166', '-1', '3', '7'); INSERT INTO `news` VALUES ('19', '为什么前端工程师多不愿意用 Bootstrap 框架?19', null, null, '1519869163', '1519869166', '-1', '3', '22'); INSERT INTO `news` VALUES ('20', '特特殊14', null, '<p>你好啊好&nbsp;</p>', '1520251065', null, '1', '0', '0'); -- ---------------------------- -- Table structure for user -- ---------------------------- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `uname` varchar(20) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `pass` varchar(255) DEFAULT NULL, `head_img` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4; -- ---------------------------- -- Records of user -- ---------------------------- INSERT INTO `user` VALUES ('2', null, '<EMAIL>', '$2y$10$bk41KBha93nL36rcfa1fveDjvNZTNpdOtU4iwQrSBvwktiuvb6pXy', null); INSERT INTO `user` VALUES ('3', '青石渔者', '<EMAIL>', '$2y$10$gI4JBwpjeJbKDknedLxLq.vylyehm7qTRk0hZpxPdaewfMc0kBaV2', null); INSERT INTO `user` VALUES ('4', null, '<EMAIL>', '$2y$10$cYcPEpSSu9YqmLngF2q0EuOfvp.p5r/CBOIOICXYv14RZQsmODvpG', null); INSERT INTO `user` VALUES ('5', null, '<EMAIL>', '$2y$10$waWPKaGUTA7BjpYLzSOojO2zaJudLbzIKcgnSLJc0QrfhPmJc1jIm', null); INSERT INTO `user` VALUES ('6', 'yetong1', '<EMAIL>', '$2y$10$wiSP5NTJa8D7WkcPZV8hCORiMJP2jaG16jFjVJtWuHwzKj8mcipk2', null); INSERT INTO `user` VALUES ('7', 'nimei', '<EMAIL>', '$2y$10$C/3IcRiinkbAajOwfSPcLOCv7dJEEfrgrRPbPchUoslqJ6N49dwAe', null);
begin; select plan(<%- 18 + nonAdminRoles.length * 6 + 4%>); select has_table('<%- schemaName %>', '<%- userTable %>', 'table <%- schemaName %>.<%- userTable %> exists'); select has_column('<%- schemaName %>', '<%- userTable %>', 'id', 'table <%- schemaName %>.<%- userTable %> has id column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'first_name', 'table <%- schemaName %>.<%- userTable %> has first_name column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'last_name', 'table <%- schemaName %>.<%- userTable %> has last_name column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'email_address', 'table <%- schemaName %>.<%- userTable %> has email_address column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'uuid', 'table <%- schemaName %>.<%- userTable %> has uuid column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'created_at', 'table <%- schemaName %>.<%- userTable %> has created_at column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'updated_at', 'table <%- schemaName %>.<%- userTable %> has updated_at column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'deleted_at', 'table <%- schemaName %>.<%- userTable %> has deleted_at column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'created_by', 'table <%- schemaName %>.<%- userTable %> has created_by column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'updated_by', 'table <%- schemaName %>.<%- userTable %> has updated_by column'); select has_column('<%- schemaName %>', '<%- userTable %>', 'deleted_by', 'table <%- schemaName %>.<%- userTable %> has deleted_by column'); insert into <%- schemaName %>.<%- userTable %> (first_name, last_name, email_address, uuid) values ('foo1', 'bar', '<EMAIL>', '11111111-1111-1111-1111-111111111112'), ('foo2', 'bar', '<EMAIL>', '11111111-1111-1111-1111-111111111113'), ('foo3', 'bar', '<EMAIL>', '11111111-1111-1111-1111-111111111114'); -- Row level security tests -- -- Test setup set jwt.claims.sub to '11111111-1111-1111-1111-111111111111'; -- <%- adminRole %> set role <%- adminRole %>; select concat('current user is: ', (select current_user)); select lives_ok( $$ select * from <%- schemaName %>.<%- userTable %> $$, '<%- adminRole %> can view all data in <%- userTable %> table' ); select lives_ok( $$ insert into <%- schemaName %>.<%- userTable %> (uuid, first_name, last_name) values ('11111111-1111-1111-1111-111111111111'::uuid, 'test', 'testerson'); $$, '<%- adminRole %> can insert data in <%- userTable %> table' ); select lives_ok( $$ update <%- schemaName %>.<%- userTable %> set first_name = 'changed by admin' where uuid='11111111-1111-1111-1111-111111111111'::uuid; $$, '<%- adminRole %> can change data in <%- userTable %> table' ); select results_eq( $$ select count(uuid) from <%- schemaName %>.<%- userTable %> where first_name = 'changed by admin' $$, ARRAY[1::bigint], 'Data was changed by <%- adminRole %>' ); select throws_like( $$ update <%- schemaName %>.<%- userTable %> set uuid = 'ca716545-a8d3-4034-819c-5e45b0e775c9' where uuid = '11111111-1111-1111-1111-111111111111'::uuid; $$, 'permission denied%', '<%- adminRole %> can not change data in the uuid column in <%- userTable %> table' ); select throws_like( $$ delete from <%- schemaName %>.<%- userTable %> where id=1 $$, 'permission denied%', 'Administrator cannot delete rows from table <%- userTable %>' ); <% nonAdminRoles.forEach(function(role) { %> -- <%- role %> set role <%- role %>; select concat('current user is: ', (select current_user)); select results_eq( $$ select count(*) from <%- schemaName %>.<%- userTable %> $$, ARRAY['4'::bigint], '<%- role %> can view all data from <%- userTable %>' ); select lives_ok( $$ update <%- schemaName %>.<%- userTable %> set first_name = 'doood' where uuid=(select sub from <%- schemaName %>.session()) $$, '<%- role %> can update data if their uuid matches the uuid of the row' ); select results_eq( $$ select first_name from <%- schemaName %>.<%- userTable %> where uuid=(select sub from <%- schemaName %>.session()) $$, ARRAY['doood'::varchar(1000)], 'Data was changed by <%- role %>' ); select throws_like( $$ update <%- schemaName %>.<%- userTable %> set uuid = 'ca716545-a8d3-4034-819c-5e45b0e775c9' where uuid!=(select sub from <%- schemaName %>.session()) $$, 'permission denied%', '<%- role %> cannot update their uuid' ); select throws_like( $$ delete from <%- schemaName %>.<%- userTable %> where id=1 $$, 'permission denied%', '<%- role %> cannot delete rows from table_<%- userTable %>' ); -- Try to update user data where uuid does not match update <%- schemaName %>.<%- userTable %> set first_name = 'buddy' where uuid!=(select sub from <%- schemaName %>.session()); select is_empty( $$ select * from <%- schemaName %>.<%- userTable %> where first_name='buddy' $$, '<%- role %> cannot update data if their uuid does not match the uuid of the row' ); <% }); %> -- <%- guestRole %> set role <%- guestRole %>; select concat('current user is: ', (select current_user)); select results_eq( $$ select uuid from <%- schemaName %>.<%- userTable %> $$, ARRAY['11111111-1111-1111-1111-111111111111'::uuid], '<%- guestRole %> can only select their own user' ); select throws_like( $$ update <%- schemaName %>.<%- userTable %> set uuid = 'ca716545-a8d3-4034-819c-5e45b0e775c9' where uuid!=(select sub from <%- schemaName %>.session()) $$, 'permission denied%', '<%- guestRole %> cannot update their uuid' ); select throws_like( $$ insert into <%- schemaName %>.<%- userTable %> (uuid, first_name, last_name) values ('21111111-1111-1111-1111-111111111111'::uuid, 'test', 'testerson'); $$, 'permission denied%', '<%- guestRole %> cannot insert' ); select throws_like( $$ delete from <%- schemaName %>.<%- userTable %> where id=1 $$, 'permission denied%', '<%- guestRole %> cannot delete rows from table_<%- userTable %>' ); select finish(); rollback;
<filename>db/test/src/main/resources/create-db.sql<gh_stars>0 DROP TABLE IF EXISTS employee; DROP TABLE IF EXISTS department; CREATE TABLE department ( department_id int NOT NULL auto_increment, department_name varchar(50) NOT NULL UNIQUE, CONSTRAINT department_pk PRIMARY KEY (department_id) ); CREATE TABLE employee ( employee_id int NOT NULL auto_increment, firstname varchar(255) NOT NULL, lastname varchar(255) NOT NULL, email varchar(255) NOT NULL UNIQUE, salary int NOT NULL, department_id int NOT NULL, CONSTRAINT employee_pk PRIMARY KEY (employee_id), CONSTRAINT employee_department_fk FOREIGN KEY (department_id) REFERENCES department (department_id) );
/* Warnings: - You are about to drop the column `name` on the `Application` table. All the data in the column will be lost. - Added the required column `age` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationDRRegionStored` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationHostingEntity` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationHostingManagement` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationHostingType` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationId` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationName` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationOwner` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationRegionStored` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `applicationType` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `billingHistory` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `biometricData` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `birthdate` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `civilJusticeInfo` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `comments` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `connectionType` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `criminalInfo` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `dataRetentionReq` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `description` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `driversLicenceNumber` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `emailAddress` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `encryptedDataTransfer` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `ethnicOrigin` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `financialInfo` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `gender` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `hasDRHosting` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `hasNameAndInitials` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `healthInfo` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `homeAddress` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `householdInfo` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `idNumbers` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `location` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `maritalStatus` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `medicalInfo` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `minorInfo` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `mobileNumber` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `nationality` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `physicalCharacteristics` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `religiousPhilosophicalPoliticalBeliefs` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `sexualBehaviour` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `socialMedia` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `studentInfo` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `technologyOwner` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `telephoneNumber` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `tradeUnionMembershio` to the `Application` table without a default value. This is not possible if the table is not empty. - Added the required column `uniqueDeviceId` to the `Application` table without a default value. This is not possible if the table is not empty. */ -- AlterTable ALTER TABLE "Application" DROP COLUMN "name", ADD COLUMN "age" BOOLEAN NOT NULL, ADD COLUMN "applicableRegulations" TEXT[], ADD COLUMN "applicationDRRegionStored" TEXT NOT NULL, ADD COLUMN "applicationHostingEntity" TEXT NOT NULL, ADD COLUMN "applicationHostingManagement" TEXT NOT NULL, ADD COLUMN "applicationHostingType" TEXT NOT NULL, ADD COLUMN "applicationId" TEXT NOT NULL, ADD COLUMN "applicationName" TEXT NOT NULL, ADD COLUMN "applicationOwner" TEXT NOT NULL, ADD COLUMN "applicationRegionStored" TEXT NOT NULL, ADD COLUMN "applicationType" TEXT NOT NULL, ADD COLUMN "billingHistory" BOOLEAN NOT NULL, ADD COLUMN "biometricData" BOOLEAN NOT NULL, ADD COLUMN "birthdate" BOOLEAN NOT NULL, ADD COLUMN "civilJusticeInfo" BOOLEAN NOT NULL, ADD COLUMN "comments" TEXT NOT NULL, ADD COLUMN "connectionType" TEXT NOT NULL, ADD COLUMN "criminalInfo" BOOLEAN NOT NULL, ADD COLUMN "dataRetentionReq" TEXT NOT NULL, ADD COLUMN "description" TEXT NOT NULL, ADD COLUMN "driversLicenceNumber" BOOLEAN NOT NULL, ADD COLUMN "emailAddress" BOOLEAN NOT NULL, ADD COLUMN "encryptedDataTransfer" BOOLEAN NOT NULL, ADD COLUMN "ethnicOrigin" BOOLEAN NOT NULL, ADD COLUMN "financialInfo" BOOLEAN NOT NULL, ADD COLUMN "gender" BOOLEAN NOT NULL, ADD COLUMN "hasDRHosting" BOOLEAN NOT NULL, ADD COLUMN "hasNameAndInitials" BOOLEAN NOT NULL, ADD COLUMN "healthInfo" BOOLEAN NOT NULL, ADD COLUMN "homeAddress" BOOLEAN NOT NULL, ADD COLUMN "householdInfo" BOOLEAN NOT NULL, ADD COLUMN "idNumbers" BOOLEAN NOT NULL, ADD COLUMN "location" BOOLEAN NOT NULL, ADD COLUMN "maritalStatus" BOOLEAN NOT NULL, ADD COLUMN "medicalInfo" BOOLEAN NOT NULL, ADD COLUMN "minorInfo" BOOLEAN NOT NULL, ADD COLUMN "mobileNumber" BOOLEAN NOT NULL, ADD COLUMN "nationality" BOOLEAN NOT NULL, ADD COLUMN "physicalCharacteristics" BOOLEAN NOT NULL, ADD COLUMN "religiousPhilosophicalPoliticalBeliefs" BOOLEAN NOT NULL, ADD COLUMN "sexualBehaviour" BOOLEAN NOT NULL, ADD COLUMN "socialMedia" BOOLEAN NOT NULL, ADD COLUMN "studentInfo" BOOLEAN NOT NULL, ADD COLUMN "technologyOwner" TEXT NOT NULL, ADD COLUMN "telephoneNumber" BOOLEAN NOT NULL, ADD COLUMN "tradeUnionMembershio" BOOLEAN NOT NULL, ADD COLUMN "uniqueDeviceId" BOOLEAN NOT NULL; -- AddForeignKey ALTER TABLE "Application" ADD FOREIGN KEY ("applicationId") REFERENCES "Application"("id") ON DELETE CASCADE ON UPDATE CASCADE;
<filename>scripts/get-q25-stat.sql<gh_stars>0 use tpcds_5000_parquet; drop table if exists tpcds_q25_groupcount; create table tpcds_q25_groupcount stored as parquet as select i_item_id ,i_item_desc ,s_store_id ,s_store_name, count(*) as groupsize from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 4 and d1.d_year = 2000 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 10 and d2.d_year = 2000 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_moy between 4 and 10 and d3.d_year = 2000 group by i_item_id ,i_item_desc ,s_store_id ,s_store_name;
<reponame>vightel/FloodMapsWorkshop<filename>sql/public.sql /* Navicat Premium Data Transfer Source Server : AWS MENA Source Server Type : PostgreSQL Source Server Version : 90303 Source Host : osmdb.crcholi0be4z.us-east-1.rds.amazonaws.com Source Database : osmdb Source Schema : public Target Server Type : PostgreSQL Target Server Version : 90303 File Encoding : utf-8 Date: 09/17/2014 14:37:53 PM */ -- ---------------------------- -- Sequence structure for app_seq -- ---------------------------- DROP SEQUENCE IF EXISTS "public"."app_seq"; CREATE SEQUENCE "public"."app_seq" INCREMENT 1 START 4 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1; ALTER TABLE "public"."app_seq" OWNER TO "osm_admin"; -- ---------------------------- -- Sequence structure for id_seq -- ---------------------------- DROP SEQUENCE IF EXISTS "public"."id_seq"; CREATE SEQUENCE "public"."id_seq"; ALTER TABLE "public"."id_seq" OWNER TO "nodepg"; -- ---------------------------- -- Sequence structure for radarsat2_seq -- ---------------------------- DROP SEQUENCE IF EXISTS "public"."radarsat2_seq"; CREATE SEQUENCE "public"."radarsat2_seq" INCREMENT 1 START 3 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1; ALTER TABLE "public"."radarsat2_seq" OWNER TO "osm_admin"; -- ---------------------------- -- Sequence structure for user_seq -- ---------------------------- DROP SEQUENCE IF EXISTS "public"."user_seq"; CREATE SEQUENCE "public"."user_seq" INCREMENT 1 START 4 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1; ALTER TABLE "public"."user_seq" OWNER TO "osm_admin"; -- ---------------------------- -- Table structure for spatial_ref_sys -- ---------------------------- DROP TABLE IF EXISTS "public"."spatial_ref_sys"; CREATE TABLE "public"."spatial_ref_sys" ( "srid" int4 NOT NULL, "auth_name" varchar(256) COLLATE "default", "auth_srid" int4, "srtext" varchar(2048) COLLATE "default", "proj4text" varchar(2048) COLLATE "default" ) WITH (OIDS=FALSE); ALTER TABLE "public"."spatial_ref_sys" OWNER TO "rdsadmin"; -- ---------------------------- -- Table structure for planet_osm_roads -- ---------------------------- DROP TABLE IF EXISTS "public"."planet_osm_roads"; CREATE TABLE "public"."planet_osm_roads" ( "osm_id" int8, "bridge" text COLLATE "default", "boundary" text COLLATE "default", "building" text COLLATE "default", "disused" text COLLATE "default", "embankment" text COLLATE "default", "harbour" text COLLATE "default", "intermittent" text COLLATE "default", "junction" text COLLATE "default", "landuse" text COLLATE "default", "leisure" text COLLATE "default", "lock" text COLLATE "default", "man_made" text COLLATE "default", "name" text COLLATE "default", "natural" text COLLATE "default", "oneway" text COLLATE "default", "tunnel" text COLLATE "default", "water" text COLLATE "default", "waterway" text COLLATE "default", "wetland" text COLLATE "default", "width" text COLLATE "default", "z_order" int4, "way_area" float4, "way" "public"."geometry" ) WITH (OIDS=FALSE); ALTER TABLE "public"."planet_osm_roads" OWNER TO "osm_admin"; -- ---------------------------- -- Table structure for planet_osm_line -- ---------------------------- DROP TABLE IF EXISTS "public"."planet_osm_line"; CREATE TABLE "public"."planet_osm_line" ( "osm_id" int8, "bridge" text COLLATE "default", "boundary" text COLLATE "default", "building" text COLLATE "default", "disused" text COLLATE "default", "embankment" text COLLATE "default", "harbour" text COLLATE "default", "intermittent" text COLLATE "default", "junction" text COLLATE "default", "landuse" text COLLATE "default", "leisure" text COLLATE "default", "lock" text COLLATE "default", "man_made" text COLLATE "default", "name" text COLLATE "default", "natural" text COLLATE "default", "oneway" text COLLATE "default", "tunnel" text COLLATE "default", "water" text COLLATE "default", "waterway" text COLLATE "default", "wetland" text COLLATE "default", "width" text COLLATE "default", "z_order" int4, "way_area" float4, "way" "public"."geometry" ) WITH (OIDS=FALSE); ALTER TABLE "public"."planet_osm_line" OWNER TO "osm_admin"; -- ---------------------------- -- Table structure for planet_osm_polygon -- ---------------------------- DROP TABLE IF EXISTS "public"."planet_osm_polygon"; CREATE TABLE "public"."planet_osm_polygon" ( "osm_id" int8, "bridge" text COLLATE "default", "boundary" text COLLATE "default", "building" text COLLATE "default", "disused" text COLLATE "default", "embankment" text COLLATE "default", "harbour" text COLLATE "default", "intermittent" text COLLATE "default", "junction" text COLLATE "default", "landuse" text COLLATE "default", "leisure" text COLLATE "default", "lock" text COLLATE "default", "man_made" text COLLATE "default", "name" text COLLATE "default", "natural" text COLLATE "default", "oneway" text COLLATE "default", "tunnel" text COLLATE "default", "water" text COLLATE "default", "waterway" text COLLATE "default", "wetland" text COLLATE "default", "width" text COLLATE "default", "z_order" int4, "way_area" float4, "way" "public"."geometry" ) WITH (OIDS=FALSE); ALTER TABLE "public"."planet_osm_polygon" OWNER TO "osm_admin"; -- ---------------------------- -- Table structure for applications -- ---------------------------- DROP TABLE IF EXISTS "public"."applications"; CREATE TABLE "public"."applications" ( "id" int4 NOT NULL DEFAULT nextval('app_seq'::regclass), "name" text COLLATE "default", "description" text COLLATE "default", "link" text COLLATE "default", "icon_url" text COLLATE "default", "logo_url" text COLLATE "default", "company" text COLLATE "default", "secret" text COLLATE "default", "created_at" timestamp(6) NULL, "updated_at" timestamp(6) NULL, "status" text COLLATE "default", "fbappid" text COLLATE "default" ) WITH (OIDS=FALSE); ALTER TABLE "public"."applications" OWNER TO "osm_admin"; -- ---------------------------- -- Table structure for users -- ---------------------------- DROP TABLE IF EXISTS "public"."users"; CREATE TABLE "public"."users" ( "id" int4 NOT NULL DEFAULT nextval('user_seq'::regclass), "name" varchar NOT NULL COLLATE "default", "email" varchar COLLATE "default", "organization" varchar COLLATE "default", "created_at" timestamp(6) NULL, "updated_at" timestamp(6) NULL, "is_admin" bool, "is_banned" bool, "gravatar" varchar COLLATE "default", "cat_src" varchar COLLATE "default", "latitude" float4, "longitude" float4, "lang" varchar COLLATE "default", "region" varchar COLLATE "default" ) WITH (OIDS=FALSE); ALTER TABLE "public"."users" OWNER TO "osm_admin"; -- ---------------------------- -- Table structure for eo1_ali -- ---------------------------- DROP TABLE IF EXISTS "public"."eo1_ali"; CREATE TABLE "public"."eo1_ali" ( "id" int8, "scene" text COLLATE "default", "date" date, "center_lat" float4, "center_lon" float4, "geom" "public"."geometry" ) WITH (OIDS=FALSE); ALTER TABLE "public"."eo1_ali" OWNER TO "osm_admin"; -- ---------------------------- -- Table structure for l8 -- ---------------------------- DROP TABLE IF EXISTS "public"."l8"; CREATE TABLE "public"."l8" ( "id" int8, "scene" text COLLATE "default", "date" date, "center_lat" float4, "center_lon" float4, "geom" "public"."geometry" ) WITH (OIDS=FALSE); ALTER TABLE "public"."l8" OWNER TO "osm_admin"; -- ---------------------------- -- Table structure for radarsat2 -- ---------------------------- DROP TABLE IF EXISTS "public"."radarsat2"; CREATE TABLE "public"."radarsat2" ( "id" int8 DEFAULT nextval('radarsat2_seq'::regclass), "scene" text NOT NULL COLLATE "default", "date" date, "center_lat" float4, "center_lon" float4, "geom" "public"."geometry" ) WITH (OIDS=FALSE); ALTER TABLE "public"."radarsat2" OWNER TO "osm_admin"; -- ---------------------------- -- View structure for geography_columns -- ---------------------------- DROP VIEW IF EXISTS "public"."geography_columns"; CREATE VIEW "public"."geography_columns" AS SELECT current_database() AS f_table_catalog, n.nspname AS f_table_schema, c.relname AS f_table_name, a.attname AS f_geography_column, postgis_typmod_dims(a.atttypmod) AS coord_dimension, postgis_typmod_srid(a.atttypmod) AS srid, postgis_typmod_type(a.atttypmod) AS type FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE (((((((t.typname = 'geography'::name) AND (a.attisdropped = false)) AND (a.atttypid = t.oid)) AND (a.attrelid = c.oid)) AND (c.relnamespace = n.oid)) AND (NOT pg_is_other_temp_schema(c.relnamespace))) AND has_table_privilege(c.oid, 'SELECT'::text)); -- ---------------------------- -- View structure for geometry_columns -- ---------------------------- DROP VIEW IF EXISTS "public"."geometry_columns"; CREATE VIEW "public"."geometry_columns" AS SELECT (current_database())::character varying(256) AS f_table_catalog, (n.nspname)::character varying(256) AS f_table_schema, (c.relname)::character varying(256) AS f_table_name, (a.attname)::character varying(256) AS f_geometry_column, COALESCE(NULLIF(postgis_typmod_dims(a.atttypmod), 2), postgis_constraint_dims((n.nspname)::text, (c.relname)::text, (a.attname)::text), 2) AS coord_dimension, COALESCE(NULLIF(postgis_typmod_srid(a.atttypmod), 0), postgis_constraint_srid((n.nspname)::text, (c.relname)::text, (a.attname)::text), 0) AS srid, (replace(replace(COALESCE(NULLIF(upper(postgis_typmod_type(a.atttypmod)), 'GEOMETRY'::text), (postgis_constraint_type((n.nspname)::text, (c.relname)::text, (a.attname)::text))::text, 'GEOMETRY'::text), 'ZM'::text, ''::text), 'Z'::text, ''::text))::character varying(30) AS type FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE (((((((((t.typname = 'geometry'::name) AND (a.attisdropped = false)) AND (a.atttypid = t.oid)) AND (a.attrelid = c.oid)) AND (c.relnamespace = n.oid)) AND ((c.relkind = 'r'::"char") OR (c.relkind = 'v'::"char"))) AND (NOT pg_is_other_temp_schema(c.relnamespace))) AND (NOT ((n.nspname = 'public'::name) AND (c.relname = 'raster_columns'::name)))) AND has_table_privilege(c.oid, 'SELECT'::text)); CREATE OR REPLACE RULE "geometry_columns_delete" AS ON DELETE TO "public"."geometry_columns" DO INSTEAD NOTHING; CREATE OR REPLACE RULE "geometry_columns_insert" AS ON INSERT TO "public"."geometry_columns" DO INSTEAD NOTHING; CREATE OR REPLACE RULE "geometry_columns_update" AS ON UPDATE TO "public"."geometry_columns" DO INSTEAD NOTHING; -- ---------------------------- -- View structure for raster_columns -- ---------------------------- DROP VIEW IF EXISTS "public"."raster_columns"; CREATE VIEW "public"."raster_columns" AS SELECT current_database() AS r_table_catalog, n.nspname AS r_table_schema, c.relname AS r_table_name, a.attname AS r_raster_column, COALESCE(_raster_constraint_info_srid(n.nspname, c.relname, a.attname), ( SELECT st_srid('010100000000000000000000000000000000000000'::geometry) AS st_srid)) AS srid, _raster_constraint_info_scale(n.nspname, c.relname, a.attname, 'x'::bpchar) AS scale_x, _raster_constraint_info_scale(n.nspname, c.relname, a.attname, 'y'::bpchar) AS scale_y, _raster_constraint_info_blocksize(n.nspname, c.relname, a.attname, 'width'::text) AS blocksize_x, _raster_constraint_info_blocksize(n.nspname, c.relname, a.attname, 'height'::text) AS blocksize_y, COALESCE(_raster_constraint_info_alignment(n.nspname, c.relname, a.attname), false) AS same_alignment, COALESCE(_raster_constraint_info_regular_blocking(n.nspname, c.relname, a.attname), false) AS regular_blocking, _raster_constraint_info_num_bands(n.nspname, c.relname, a.attname) AS num_bands, _raster_constraint_info_pixel_types(n.nspname, c.relname, a.attname) AS pixel_types, _raster_constraint_info_nodata_values(n.nspname, c.relname, a.attname) AS nodata_values, _raster_constraint_info_out_db(n.nspname, c.relname, a.attname) AS out_db, _raster_constraint_info_extent(n.nspname, c.relname, a.attname) AS extent FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE (((((((t.typname = 'raster'::name) AND (a.attisdropped = false)) AND (a.atttypid = t.oid)) AND (a.attrelid = c.oid)) AND (c.relnamespace = n.oid)) AND ((c.relkind = 'r'::"char") OR (c.relkind = 'v'::"char"))) AND (NOT pg_is_other_temp_schema(c.relnamespace))); -- ---------------------------- -- View structure for raster_overviews -- ---------------------------- DROP VIEW IF EXISTS "public"."raster_overviews"; CREATE VIEW "public"."raster_overviews" AS SELECT current_database() AS o_table_catalog, n.nspname AS o_table_schema, c.relname AS o_table_name, a.attname AS o_raster_column, current_database() AS r_table_catalog, (split_part(split_part(s.consrc, '''::name'::text, 1), ''''::text, 2))::name AS r_table_schema, (split_part(split_part(s.consrc, '''::name'::text, 2), ''''::text, 2))::name AS r_table_name, (split_part(split_part(s.consrc, '''::name'::text, 3), ''''::text, 2))::name AS r_raster_column, (btrim(split_part(s.consrc, ','::text, 2)))::integer AS overview_factor FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n, pg_constraint s WHERE ((((((((((t.typname = 'raster'::name) AND (a.attisdropped = false)) AND (a.atttypid = t.oid)) AND (a.attrelid = c.oid)) AND (c.relnamespace = n.oid)) AND ((c.relkind = 'r'::"char") OR (c.relkind = 'v'::"char"))) AND (s.connamespace = n.oid)) AND (s.conrelid = c.oid)) AND (s.consrc ~~ '%_overview_constraint(%'::text)) AND (NOT pg_is_other_temp_schema(c.relnamespace))); -- ---------------------------- -- Function structure for public._postgis_deprecate(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_postgis_deprecate"(text, text, text); CREATE FUNCTION "public"."_postgis_deprecate"(IN oldname text, IN newname text, IN "version" text) RETURNS "void" AS $BODY$ BEGIN RAISE WARNING '% signature was deprecated in %. Please use %', oldname, version, newname; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_postgis_deprecate"(IN oldname text, IN newname text, IN "version" text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.spheroid_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."spheroid_in"(cstring); CREATE FUNCTION "public"."spheroid_in"(IN cstring) RETURNS "public"."spheroid" AS '$libdir/postgis-2.1','ellipsoid_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."spheroid_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.spheroid_out("public"."spheroid") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."spheroid_out"("public"."spheroid"); CREATE FUNCTION "public"."spheroid_out"(IN "public"."spheroid") RETURNS "cstring" AS '$libdir/postgis-2.1','ellipsoid_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."spheroid_out"(IN "public"."spheroid") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_in"(cstring); CREATE FUNCTION "public"."geometry_in"(IN cstring) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_out("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_out"("public"."geometry"); CREATE FUNCTION "public"."geometry_out"(IN "public"."geometry") RETURNS "cstring" AS '$libdir/postgis-2.1','LWGEOM_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_out"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_typmod_in(_cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_typmod_in"(_cstring); CREATE FUNCTION "public"."geometry_typmod_in"(IN _cstring) RETURNS "int4" AS '$libdir/postgis-2.1','geometry_typmod_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_typmod_in"(IN _cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_typmod_out(int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_typmod_out"(int4); CREATE FUNCTION "public"."geometry_typmod_out"(IN int4) RETURNS "cstring" AS '$libdir/postgis-2.1','postgis_typmod_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_typmod_out"(IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_analyze(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_analyze"(internal); CREATE FUNCTION "public"."geometry_analyze"(IN internal) RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_analyze_nd' LANGUAGE c COST 1 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_analyze"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_recv(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_recv"(internal); CREATE FUNCTION "public"."geometry_recv"(IN internal) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_recv' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_recv"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_send("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_send"("public"."geometry"); CREATE FUNCTION "public"."geometry_send"(IN "public"."geometry") RETURNS "bytea" AS '$libdir/postgis-2.1','LWGEOM_send' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_send"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry("public"."geometry", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"("public"."geometry", int4, bool); CREATE FUNCTION "public"."geometry"(IN "public"."geometry", IN int4, IN bool) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','geometry_enforce_typmod' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN "public"."geometry", IN int4, IN bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry(point) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"(point); CREATE FUNCTION "public"."geometry"(IN point) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','point_to_geometry' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN point) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.point("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."point"("public"."geometry"); CREATE FUNCTION "public"."point"(IN "public"."geometry") RETURNS "point" AS '$libdir/postgis-2.1','geometry_to_point' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."point"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry(path) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"(path); CREATE FUNCTION "public"."geometry"(IN path) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','path_to_geometry' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN path) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.path("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."path"("public"."geometry"); CREATE FUNCTION "public"."path"(IN "public"."geometry") RETURNS "path" AS '$libdir/postgis-2.1','geometry_to_path' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."path"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry(polygon) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"(polygon); CREATE FUNCTION "public"."geometry"(IN polygon) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','polygon_to_geometry' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN polygon) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.polygon("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."polygon"("public"."geometry"); CREATE FUNCTION "public"."polygon"(IN "public"."geometry") RETURNS "polygon" AS '$libdir/postgis-2.1','geometry_to_polygon' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."polygon"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_x("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_x"("public"."geometry"); CREATE FUNCTION "public"."st_x"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_x_point' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_x"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_x"(IN "public"."geometry") IS 'args: a_point - Return the X coordinate of the point, or NULL if not available. Input must be a point.'; -- ---------------------------- -- Function structure for public.st_y("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_y"("public"."geometry"); CREATE FUNCTION "public"."st_y"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_y_point' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_y"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_y"(IN "public"."geometry") IS 'args: a_point - Return the Y coordinate of the point, or NULL if not available. Input must be a point.'; -- ---------------------------- -- Function structure for public.st_z("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_z"("public"."geometry"); CREATE FUNCTION "public"."st_z"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_z_point' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_z"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_z"(IN "public"."geometry") IS 'args: a_point - Return the Z coordinate of the point, or NULL if not available. Input must be a point.'; -- ---------------------------- -- Function structure for public.st_m("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_m"("public"."geometry"); CREATE FUNCTION "public"."st_m"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_m_point' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_m"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_m"(IN "public"."geometry") IS 'args: a_point - Return the M coordinate of the point, or NULL if not available. Input must be a point.'; -- ---------------------------- -- Function structure for public.box3d_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box3d_in"(cstring); CREATE FUNCTION "public"."box3d_in"(IN cstring) RETURNS "public"."box3d" AS '$libdir/postgis-2.1','BOX3D_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box3d_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box3d_out("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box3d_out"("public"."box3d"); CREATE FUNCTION "public"."box3d_out"(IN "public"."box3d") RETURNS "cstring" AS '$libdir/postgis-2.1','BOX3D_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box3d_out"(IN "public"."box3d") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box2d_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box2d_in"(cstring); CREATE FUNCTION "public"."box2d_in"(IN cstring) RETURNS "public"."box2d" AS '$libdir/postgis-2.1','BOX2D_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box2d_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box2d_out("public"."box2d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box2d_out"("public"."box2d"); CREATE FUNCTION "public"."box2d_out"(IN "public"."box2d") RETURNS "cstring" AS '$libdir/postgis-2.1','BOX2D_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box2d_out"(IN "public"."box2d") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box2df_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box2df_in"(cstring); CREATE FUNCTION "public"."box2df_in"(IN cstring) RETURNS "public"."box2df" AS '$libdir/postgis-2.1','box2df_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box2df_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box2df_out("public"."box2df") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box2df_out"("public"."box2df"); CREATE FUNCTION "public"."box2df_out"(IN "public"."box2df") RETURNS "cstring" AS '$libdir/postgis-2.1','box2df_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box2df_out"(IN "public"."box2df") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gidx_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gidx_in"(cstring); CREATE FUNCTION "public"."gidx_in"(IN cstring) RETURNS "public"."gidx" AS '$libdir/postgis-2.1','gidx_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."gidx_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gidx_out("public"."gidx") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gidx_out"("public"."gidx"); CREATE FUNCTION "public"."gidx_out"(IN "public"."gidx") RETURNS "cstring" AS '$libdir/postgis-2.1','gidx_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."gidx_out"(IN "public"."gidx") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_lt("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_lt"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_lt"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','lwgeom_lt' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_lt"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_le("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_le"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_le"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','lwgeom_le' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_le"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gt("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gt"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_gt"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','lwgeom_gt' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_gt"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_ge("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_ge"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_ge"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','lwgeom_ge' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_ge"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_eq("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_eq"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_eq"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','lwgeom_eq' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_eq"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_cmp("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_cmp"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_cmp"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','lwgeom_cmp' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_cmp"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_distance_2d(internal, "public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_distance_2d"(internal, "public"."geometry", int4); CREATE FUNCTION "public"."geometry_gist_distance_2d"(IN internal, IN "public"."geometry", IN int4) RETURNS "float8" AS '$libdir/postgis-2.1','gserialized_gist_distance_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_distance_2d"(IN internal, IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_consistent_2d(internal, "public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_consistent_2d"(internal, "public"."geometry", int4); CREATE FUNCTION "public"."geometry_gist_consistent_2d"(IN internal, IN "public"."geometry", IN int4) RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_gist_consistent_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_consistent_2d"(IN internal, IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_compress_2d(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_compress_2d"(internal); CREATE FUNCTION "public"."geometry_gist_compress_2d"(IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_compress_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_compress_2d"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_penalty_2d(internal, internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_penalty_2d"(internal, internal, internal); CREATE FUNCTION "public"."geometry_gist_penalty_2d"(IN internal, IN internal, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_penalty_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_penalty_2d"(IN internal, IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_picksplit_2d(internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_picksplit_2d"(internal, internal); CREATE FUNCTION "public"."geometry_gist_picksplit_2d"(IN internal, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_picksplit_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_picksplit_2d"(IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_union_2d(bytea, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_union_2d"(bytea, internal); CREATE FUNCTION "public"."geometry_gist_union_2d"(IN bytea, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_union_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_union_2d"(IN bytea, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_same_2d("public"."geometry", "public"."geometry", internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_same_2d"("public"."geometry", "public"."geometry", internal); CREATE FUNCTION "public"."geometry_gist_same_2d"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_same_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_same_2d"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_decompress_2d(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_decompress_2d"(internal); CREATE FUNCTION "public"."geometry_gist_decompress_2d"(IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_decompress_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_decompress_2d"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._postgis_selectivity(regclass, text, "public"."geometry", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_postgis_selectivity"(regclass, text, "public"."geometry", text); CREATE FUNCTION "public"."_postgis_selectivity"(IN tbl regclass, IN att_name text, IN geom "public"."geometry", IN "mode" text DEFAULT '2'::text) RETURNS "float8" AS '$libdir/postgis-2.1','_postgis_gserialized_sel' LANGUAGE c COST 1 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_postgis_selectivity"(IN tbl regclass, IN att_name text, IN geom "public"."geometry", IN "mode" text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._postgis_join_selectivity(regclass, text, regclass, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_postgis_join_selectivity"(regclass, text, regclass, text, text); CREATE FUNCTION "public"."_postgis_join_selectivity"(IN regclass, IN text, IN regclass, IN text, IN text DEFAULT '2'::text) RETURNS "float8" AS '$libdir/postgis-2.1','_postgis_gserialized_joinsel' LANGUAGE c COST 1 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_postgis_join_selectivity"(IN regclass, IN text, IN regclass, IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._postgis_stats(regclass, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_postgis_stats"(regclass, text, text); CREATE FUNCTION "public"."_postgis_stats"(IN tbl regclass, IN att_name text, IN text DEFAULT '2'::text) RETURNS "text" AS '$libdir/postgis-2.1','_postgis_gserialized_stats' LANGUAGE c COST 1 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_postgis_stats"(IN tbl regclass, IN att_name text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gserialized_gist_sel_2d(internal, oid, internal, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gserialized_gist_sel_2d"(internal, oid, internal, int4); CREATE FUNCTION "public"."gserialized_gist_sel_2d"(IN internal, IN oid, IN internal, IN int4) RETURNS "float8" AS '$libdir/postgis-2.1','gserialized_gist_sel_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."gserialized_gist_sel_2d"(IN internal, IN oid, IN internal, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gserialized_gist_sel_nd(internal, oid, internal, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gserialized_gist_sel_nd"(internal, oid, internal, int4); CREATE FUNCTION "public"."gserialized_gist_sel_nd"(IN internal, IN oid, IN internal, IN int4) RETURNS "float8" AS '$libdir/postgis-2.1','gserialized_gist_sel_nd' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."gserialized_gist_sel_nd"(IN internal, IN oid, IN internal, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gserialized_gist_joinsel_2d(internal, oid, internal, int2) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gserialized_gist_joinsel_2d"(internal, oid, internal, int2); CREATE FUNCTION "public"."gserialized_gist_joinsel_2d"(IN internal, IN oid, IN internal, IN int2) RETURNS "float8" AS '$libdir/postgis-2.1','gserialized_gist_joinsel_2d' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."gserialized_gist_joinsel_2d"(IN internal, IN oid, IN internal, IN int2) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gserialized_gist_joinsel_nd(internal, oid, internal, int2) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gserialized_gist_joinsel_nd"(internal, oid, internal, int2); CREATE FUNCTION "public"."gserialized_gist_joinsel_nd"(IN internal, IN oid, IN internal, IN int2) RETURNS "float8" AS '$libdir/postgis-2.1','gserialized_gist_joinsel_nd' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."gserialized_gist_joinsel_nd"(IN internal, IN oid, IN internal, IN int2) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_overlaps("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_overlaps"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_overlaps"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_overlaps_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_overlaps"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_same("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_same"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_same"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_same_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_same"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_distance_centroid("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_distance_centroid"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_distance_centroid"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','gserialized_distance_centroid_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_distance_centroid"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_distance_box("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_distance_box"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_distance_box"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','gserialized_distance_box_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_distance_box"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_contains("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_contains"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_contains"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_contains_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_contains"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_within("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_within"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_within"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_within_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_within"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_left("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_left"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_left"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_left_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_left"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_overleft("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_overleft"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_overleft"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_overleft_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_overleft"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_below("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_below"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_below"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_below_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_below"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_overbelow("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_overbelow"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_overbelow"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_overbelow_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_overbelow"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_overright("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_overright"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_overright"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_overright_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_overright"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_right("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_right"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_right"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_right_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_right"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_overabove("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_overabove"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_overabove"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_overabove_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_overabove"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_above("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_above"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_above"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_above_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_above"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_consistent_nd(internal, "public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_consistent_nd"(internal, "public"."geometry", int4); CREATE FUNCTION "public"."geometry_gist_consistent_nd"(IN internal, IN "public"."geometry", IN int4) RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_gist_consistent' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_consistent_nd"(IN internal, IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_compress_nd(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_compress_nd"(internal); CREATE FUNCTION "public"."geometry_gist_compress_nd"(IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_compress' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_compress_nd"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_penalty_nd(internal, internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_penalty_nd"(internal, internal, internal); CREATE FUNCTION "public"."geometry_gist_penalty_nd"(IN internal, IN internal, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_penalty' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_penalty_nd"(IN internal, IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_picksplit_nd(internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_picksplit_nd"(internal, internal); CREATE FUNCTION "public"."geometry_gist_picksplit_nd"(IN internal, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_picksplit' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_picksplit_nd"(IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_union_nd(bytea, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_union_nd"(bytea, internal); CREATE FUNCTION "public"."geometry_gist_union_nd"(IN bytea, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_union' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_union_nd"(IN bytea, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_same_nd("public"."geometry", "public"."geometry", internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_same_nd"("public"."geometry", "public"."geometry", internal); CREATE FUNCTION "public"."geometry_gist_same_nd"(IN "public"."geometry", IN "public"."geometry", IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_same' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_same_nd"(IN "public"."geometry", IN "public"."geometry", IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_gist_decompress_nd(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_gist_decompress_nd"(internal); CREATE FUNCTION "public"."geometry_gist_decompress_nd"(IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_decompress' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geometry_gist_decompress_nd"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_overlaps_nd("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_overlaps_nd"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."geometry_overlaps_nd"(IN "public"."geometry", IN "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_overlaps' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_overlaps_nd"(IN "public"."geometry", IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_affine("public"."geometry", float8, float8, float8, float8, float8, float8, float8, float8, float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_affine"("public"."geometry", float8, float8, float8, float8, float8, float8, float8, float8, float8, float8, float8, float8); CREATE FUNCTION "public"."st_affine"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_affine' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_affine"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_affine"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8, IN float8) IS 'args: geomA, a, b, c, d, e, f, g, h, i, xoff, yoff, zoff - Applies a 3d affine transformation to the geometry to do things like translate, rotate, scale in one step.'; -- ---------------------------- -- Function structure for public.st_affine("public"."geometry", float8, float8, float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_affine"("public"."geometry", float8, float8, float8, float8, float8, float8); CREATE FUNCTION "public"."st_affine"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_affine"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_affine"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8, IN float8, IN float8) IS 'args: geomA, a, b, d, e, xoff, yoff - Applies a 3d affine transformation to the geometry to do things like translate, rotate, scale in one step.'; -- ---------------------------- -- Function structure for public.st_rotate("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rotate"("public"."geometry", float8); CREATE FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, 0, 0, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8) IS 'args: geomA, rotRadians - Rotate a geometry rotRadians counter-clockwise about an origin.'; -- ---------------------------- -- Function structure for public.st_rotate("public"."geometry", float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rotate"("public"."geometry", float8, float8, float8); CREATE FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, $3 - cos($2) * $3 + sin($2) * $4, $4 - sin($2) * $3 - cos($2) * $4, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8, IN float8, IN float8) IS 'args: geomA, rotRadians, x0, y0 - Rotate a geometry rotRadians counter-clockwise about an origin.'; -- ---------------------------- -- Function structure for public.st_rotate("public"."geometry", float8, "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rotate"("public"."geometry", float8, "public"."geometry"); CREATE FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8, IN "public"."geometry") RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, ST_X($3) - cos($2) * ST_X($3) + sin($2) * ST_Y($3), ST_Y($3) - sin($2) * ST_X($3) - cos($2) * ST_Y($3), 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8, IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rotate"(IN "public"."geometry", IN float8, IN "public"."geometry") IS 'args: geomA, rotRadians, pointOrigin - Rotate a geometry rotRadians counter-clockwise about an origin.'; -- ---------------------------- -- Function structure for public.st_rotatez("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rotatez"("public"."geometry", float8); CREATE FUNCTION "public"."st_rotatez"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Rotate($1, $2)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rotatez"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rotatez"(IN "public"."geometry", IN float8) IS 'args: geomA, rotRadians - Rotate a geometry rotRadians about the Z axis.'; -- ---------------------------- -- Function structure for public.st_rotatex("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rotatex"("public"."geometry", float8); CREATE FUNCTION "public"."st_rotatex"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rotatex"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rotatex"(IN "public"."geometry", IN float8) IS 'args: geomA, rotRadians - Rotate a geometry rotRadians about the X axis.'; -- ---------------------------- -- Function structure for public.st_rotatey("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rotatey"("public"."geometry", float8); CREATE FUNCTION "public"."st_rotatey"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, cos($2), 0, sin($2), 0, 1, 0, -sin($2), 0, cos($2), 0, 0, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rotatey"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rotatey"(IN "public"."geometry", IN float8) IS 'args: geomA, rotRadians - Rotate a geometry rotRadians about the Y axis.'; -- ---------------------------- -- Function structure for public.st_translate("public"."geometry", float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_translate"("public"."geometry", float8, float8, float8); CREATE FUNCTION "public"."st_translate"(IN "public"."geometry", IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_translate"(IN "public"."geometry", IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_translate"(IN "public"."geometry", IN float8, IN float8, IN float8) IS 'args: g1, deltax, deltay, deltaz - Translates the geometry to a new location using the numeric parameters as offsets. Ie: ST_Translate(geom, X, Y) or ST_Translate(geom, X, Y,Z).'; -- ---------------------------- -- Function structure for public.st_translate("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_translate"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_translate"(IN "public"."geometry", IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Translate($1, $2, $3, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_translate"(IN "public"."geometry", IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_translate"(IN "public"."geometry", IN float8, IN float8) IS 'args: g1, deltax, deltay - Translates the geometry to a new location using the numeric parameters as offsets. Ie: ST_Translate(geom, X, Y) or ST_Translate(geom, X, Y,Z).'; -- ---------------------------- -- Function structure for public.st_scale("public"."geometry", float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_scale"("public"."geometry", float8, float8, float8); CREATE FUNCTION "public"."st_scale"(IN "public"."geometry", IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, $2, 0, 0, 0, $3, 0, 0, 0, $4, 0, 0, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_scale"(IN "public"."geometry", IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_scale"(IN "public"."geometry", IN float8, IN float8, IN float8) IS 'args: geomA, XFactor, YFactor, ZFactor - Scales the geometry to a new size by multiplying the ordinates with the parameters. Ie: ST_Scale(geom, Xfactor, Yfactor, Zfactor).'; -- ---------------------------- -- Function structure for public.st_scale("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_scale"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_scale"(IN "public"."geometry", IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Scale($1, $2, $3, 1)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_scale"(IN "public"."geometry", IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_scale"(IN "public"."geometry", IN float8, IN float8) IS 'args: geomA, XFactor, YFactor - Scales the geometry to a new size by multiplying the ordinates with the parameters. Ie: ST_Scale(geom, Xfactor, Yfactor, Zfactor).'; -- ---------------------------- -- Function structure for public.st_transscale("public"."geometry", float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_transscale"("public"."geometry", float8, float8, float8, float8); CREATE FUNCTION "public"."st_transscale"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_Affine($1, $4, 0, 0, 0, $5, 0, 0, 0, 1, $2 * $4, $3 * $5, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_transscale"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_transscale"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8) IS 'args: geomA, deltaX, deltaY, XFactor, YFactor - Translates the geometry using the deltaX and deltaY args, then scales it using the XFactor, YFactor args, working in 2D only.'; -- ---------------------------- -- Function structure for public.st_shift_longitude("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_shift_longitude"("public"."geometry"); CREATE FUNCTION "public"."st_shift_longitude"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_longitude_shift' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_shift_longitude"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_shift_longitude"(IN "public"."geometry") IS 'args: geomA - Reads every point/vertex in every component of every feature in a geometry, and if the longitude coordinate is <0, adds 360 to it. The result would be a 0-360 version of the data to be plotted in a 180 centric map'; -- ---------------------------- -- Function structure for public.st_xmin("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_xmin"("public"."box3d"); CREATE FUNCTION "public"."st_xmin"(IN "public"."box3d") RETURNS "float8" AS '$libdir/postgis-2.1','BOX3D_xmin' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_xmin"(IN "public"."box3d") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_xmin"(IN "public"."box3d") IS 'args: aGeomorBox2DorBox3D - Returns X minima of a bounding box 2d or 3d or a geometry.'; -- ---------------------------- -- Function structure for public.st_ymin("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_ymin"("public"."box3d"); CREATE FUNCTION "public"."st_ymin"(IN "public"."box3d") RETURNS "float8" AS '$libdir/postgis-2.1','BOX3D_ymin' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_ymin"(IN "public"."box3d") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_ymin"(IN "public"."box3d") IS 'args: aGeomorBox2DorBox3D - Returns Y minima of a bounding box 2d or 3d or a geometry.'; -- ---------------------------- -- Function structure for public.st_zmin("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_zmin"("public"."box3d"); CREATE FUNCTION "public"."st_zmin"(IN "public"."box3d") RETURNS "float8" AS '$libdir/postgis-2.1','BOX3D_zmin' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_zmin"(IN "public"."box3d") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_zmin"(IN "public"."box3d") IS 'args: aGeomorBox2DorBox3D - Returns Z minima of a bounding box 2d or 3d or a geometry.'; -- ---------------------------- -- Function structure for public.st_xmax("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_xmax"("public"."box3d"); CREATE FUNCTION "public"."st_xmax"(IN "public"."box3d") RETURNS "float8" AS '$libdir/postgis-2.1','BOX3D_xmax' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_xmax"(IN "public"."box3d") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_xmax"(IN "public"."box3d") IS 'args: aGeomorBox2DorBox3D - Returns X maxima of a bounding box 2d or 3d or a geometry.'; -- ---------------------------- -- Function structure for public.st_ymax("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_ymax"("public"."box3d"); CREATE FUNCTION "public"."st_ymax"(IN "public"."box3d") RETURNS "float8" AS '$libdir/postgis-2.1','BOX3D_ymax' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_ymax"(IN "public"."box3d") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_ymax"(IN "public"."box3d") IS 'args: aGeomorBox2DorBox3D - Returns Y maxima of a bounding box 2d or 3d or a geometry.'; -- ---------------------------- -- Function structure for public.st_zmax("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_zmax"("public"."box3d"); CREATE FUNCTION "public"."st_zmax"(IN "public"."box3d") RETURNS "float8" AS '$libdir/postgis-2.1','BOX3D_zmax' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_zmax"(IN "public"."box3d") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_zmax"(IN "public"."box3d") IS 'args: aGeomorBox2DorBox3D - Returns Z minima of a bounding box 2d or 3d or a geometry.'; -- ---------------------------- -- Function structure for public.st_expand("public"."box2d", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_expand"("public"."box2d", float8); CREATE FUNCTION "public"."st_expand"(IN "public"."box2d", IN float8) RETURNS "public"."box2d" AS '$libdir/postgis-2.1','BOX2D_expand' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_expand"(IN "public"."box2d", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_expand"(IN "public"."box2d", IN float8) IS 'args: g1, units_to_expand - Returns bounding box expanded in all directions from the bounding box of the input geometry. Uses double-precision'; -- ---------------------------- -- Function structure for public.postgis_getbbox("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_getbbox"("public"."geometry"); CREATE FUNCTION "public"."postgis_getbbox"(IN "public"."geometry") RETURNS "public"."box2d" AS '$libdir/postgis-2.1','LWGEOM_to_BOX2D' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_getbbox"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_makebox2d("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makebox2d"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_makebox2d"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."box2d" AS '$libdir/postgis-2.1','BOX2D_construct' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makebox2d"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makebox2d"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: pointLowLeft, pointUpRight - Creates a BOX2D defined by the given point geometries.'; -- ---------------------------- -- Function structure for public.st_combine_bbox("public"."box2d", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_combine_bbox"("public"."box2d", "public"."geometry"); CREATE FUNCTION "public"."st_combine_bbox"(IN "public"."box2d", IN "public"."geometry") RETURNS "public"."box2d" AS '$libdir/postgis-2.1','BOX2D_combine' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_combine_bbox"(IN "public"."box2d", IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_estimatedextent(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_estimatedextent"(text, text, text); CREATE FUNCTION "public"."st_estimatedextent"(IN text, IN text, IN text) RETURNS "public"."box2d" AS '$libdir/postgis-2.1','gserialized_estimated_extent' LANGUAGE c COST 1 STRICT SECURITY DEFINER IMMUTABLE; ALTER FUNCTION "public"."st_estimatedextent"(IN text, IN text, IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_estimatedextent"(IN text, IN text, IN text) IS 'args: schema_name, table_name, geocolumn_name - Return the estimated extent of the given spatial table. The estimated is taken from the geometry columns statistics. The current schema will be used if not specified.'; -- ---------------------------- -- Function structure for public.st_estimated_extent(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_estimated_extent"(text, text, text); CREATE FUNCTION "public"."st_estimated_extent"(IN text, IN text, IN text) RETURNS "public"."box2d" AS $BODY$ SELECT _postgis_deprecate('ST_Estimated_Extent', 'ST_EstimatedExtent', '2.1.0'); -- We use security invoker instead of security definer -- to prevent malicious injection of a different same named function SELECT ST_EstimatedExtent($1, $2, $3); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_estimated_extent"(IN text, IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_estimatedextent(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_estimatedextent"(text, text); CREATE FUNCTION "public"."st_estimatedextent"(IN text, IN text) RETURNS "public"."box2d" AS '$libdir/postgis-2.1','gserialized_estimated_extent' LANGUAGE c COST 1 STRICT SECURITY DEFINER IMMUTABLE; ALTER FUNCTION "public"."st_estimatedextent"(IN text, IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_estimatedextent"(IN text, IN text) IS 'args: table_name, geocolumn_name - Return the estimated extent of the given spatial table. The estimated is taken from the geometry columns statistics. The current schema will be used if not specified.'; -- ---------------------------- -- Function structure for public.st_estimated_extent(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_estimated_extent"(text, text); CREATE FUNCTION "public"."st_estimated_extent"(IN text, IN text) RETURNS "public"."box2d" AS $BODY$ SELECT _postgis_deprecate('ST_Estimated_Extent', 'ST_EstimatedExtent', '2.1.0'); -- We use security invoker instead of security definer -- to prevent malicious injection of a same named different function -- that would be run under elevated permissions SELECT ST_EstimatedExtent($1, $2); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_estimated_extent"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_find_extent(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_find_extent"(text, text, text); CREATE FUNCTION "public"."st_find_extent"(IN text, IN text, IN text) RETURNS "public"."box2d" AS $BODY$ DECLARE schemaname alias for $1; tablename alias for $2; columnname alias for $3; myrec RECORD; BEGIN FOR myrec IN EXECUTE 'SELECT ST_Extent("' || columnname || '") As extent FROM "' || schemaname || '"."' || tablename || '"' LOOP return myrec.extent; END LOOP; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_find_extent"(IN text, IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_find_extent(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_find_extent"(text, text); CREATE FUNCTION "public"."st_find_extent"(IN text, IN text) RETURNS "public"."box2d" AS $BODY$ DECLARE tablename alias for $1; columnname alias for $2; myrec RECORD; BEGIN FOR myrec IN EXECUTE 'SELECT ST_Extent("' || columnname || '") As extent FROM "' || tablename || '"' LOOP return myrec.extent; END LOOP; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_find_extent"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_addbbox("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_addbbox"("public"."geometry"); CREATE FUNCTION "public"."postgis_addbbox"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_addBBOX' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_addbbox"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_addbbox"(IN "public"."geometry") IS 'args: geomA - Add bounding box to the geometry.'; -- ---------------------------- -- Function structure for public.postgis_dropbbox("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_dropbbox"("public"."geometry"); CREATE FUNCTION "public"."postgis_dropbbox"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_dropBBOX' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_dropbbox"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_dropbbox"(IN "public"."geometry") IS 'args: geomA - Drop the bounding box cache from the geometry.'; -- ---------------------------- -- Function structure for public.postgis_hasbbox("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_hasbbox"("public"."geometry"); CREATE FUNCTION "public"."postgis_hasbbox"(IN "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_hasBBOX' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_hasbbox"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_hasbbox"(IN "public"."geometry") IS 'args: geomA - Returns TRUE if the bbox of this geometry is cached, FALSE otherwise.'; -- ---------------------------- -- Function structure for public.st_mem_size("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mem_size"("public"."geometry"); CREATE FUNCTION "public"."st_mem_size"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_mem_size' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mem_size"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_mem_size"(IN "public"."geometry") IS 'args: geomA - Returns the amount of space (in bytes) the geometry takes.'; -- ---------------------------- -- Function structure for public.st_summary("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_summary"("public"."geometry"); CREATE FUNCTION "public"."st_summary"(IN "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_summary' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_summary"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_summary"(IN "public"."geometry") IS 'args: g - Returns a text summary of the contents of the geometry.'; -- ---------------------------- -- Function structure for public.st_npoints("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_npoints"("public"."geometry"); CREATE FUNCTION "public"."st_npoints"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_npoints' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_npoints"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_npoints"(IN "public"."geometry") IS 'args: g1 - Return the number of points (vertexes) in a geometry.'; -- ---------------------------- -- Function structure for public.st_nrings("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_nrings"("public"."geometry"); CREATE FUNCTION "public"."st_nrings"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_nrings' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_nrings"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_nrings"(IN "public"."geometry") IS 'args: geomA - If the geometry is a polygon or multi-polygon returns the number of rings.'; -- ---------------------------- -- Function structure for public.st_3dlength("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dlength"("public"."geometry"); CREATE FUNCTION "public"."st_3dlength"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_length_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dlength"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dlength"(IN "public"."geometry") IS 'args: a_3dlinestring - Returns the 3-dimensional or 2-dimensional length of the geometry if it is a linestring or multi-linestring.'; -- ---------------------------- -- Function structure for public.st_length2d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_length2d"("public"."geometry"); CREATE FUNCTION "public"."st_length2d"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_length2d_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_length2d"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_length2d"(IN "public"."geometry") IS 'args: a_2dlinestring - Returns the 2-dimensional length of the geometry if it is a linestring or multi-linestring. This is an alias for ST_Length'; -- ---------------------------- -- Function structure for public.st_length("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_length"("public"."geometry"); CREATE FUNCTION "public"."st_length"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_length2d_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_length"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_length"(IN "public"."geometry") IS 'args: a_2dlinestring - Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)'; -- ---------------------------- -- Function structure for public.st_3dlength_spheroid("public"."geometry", "public"."spheroid") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dlength_spheroid"("public"."geometry", "public"."spheroid"); CREATE FUNCTION "public"."st_3dlength_spheroid"(IN "public"."geometry", IN "public"."spheroid") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_length_ellipsoid_linestring' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dlength_spheroid"(IN "public"."geometry", IN "public"."spheroid") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dlength_spheroid"(IN "public"."geometry", IN "public"."spheroid") IS 'args: a_linestring, a_spheroid - Calculates the length of a geometry on an ellipsoid, taking the elevation into account. This is just an alias for ST_Length_Spheroid.'; -- ---------------------------- -- Function structure for public.st_length_spheroid("public"."geometry", "public"."spheroid") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_length_spheroid"("public"."geometry", "public"."spheroid"); CREATE FUNCTION "public"."st_length_spheroid"(IN "public"."geometry", IN "public"."spheroid") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_length_ellipsoid_linestring' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_length_spheroid"(IN "public"."geometry", IN "public"."spheroid") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_length_spheroid"(IN "public"."geometry", IN "public"."spheroid") IS 'args: a_linestring, a_spheroid - Calculates the 2D or 3D length of a linestring/multilinestring on an ellipsoid. This is useful if the coordinates of the geometry are in longitude/latitude and a length is desired without reprojection.'; -- ---------------------------- -- Function structure for public.st_length2d_spheroid("public"."geometry", "public"."spheroid") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_length2d_spheroid"("public"."geometry", "public"."spheroid"); CREATE FUNCTION "public"."st_length2d_spheroid"(IN "public"."geometry", IN "public"."spheroid") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_length2d_ellipsoid' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_length2d_spheroid"(IN "public"."geometry", IN "public"."spheroid") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_length2d_spheroid"(IN "public"."geometry", IN "public"."spheroid") IS 'args: a_linestring, a_spheroid - Calculates the 2D length of a linestring/multilinestring on an ellipsoid. This is useful if the coordinates of the geometry are in longitude/latitude and a length is desired without reprojection.'; -- ---------------------------- -- Function structure for public.st_3dperimeter("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dperimeter"("public"."geometry"); CREATE FUNCTION "public"."st_3dperimeter"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_perimeter_poly' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dperimeter"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dperimeter"(IN "public"."geometry") IS 'args: geomA - Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon.'; -- ---------------------------- -- Function structure for public.st_perimeter2d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_perimeter2d"("public"."geometry"); CREATE FUNCTION "public"."st_perimeter2d"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_perimeter2d_poly' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_perimeter2d"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_perimeter2d"(IN "public"."geometry") IS 'args: geomA - Returns the 2-dimensional perimeter of the geometry, if it is a polygon or multi-polygon. This is currently an alias for ST_Perimeter.'; -- ---------------------------- -- Function structure for public.st_perimeter("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_perimeter"("public"."geometry"); CREATE FUNCTION "public"."st_perimeter"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_perimeter2d_poly' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_perimeter"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_perimeter"(IN "public"."geometry") IS 'args: g1 - Return the length measurement of the boundary of an ST_Surface or ST_MultiSurface geometry or geography. (Polygon, Multipolygon). geometry measurement is in units of spatial reference and geography is in meters.'; -- ---------------------------- -- Function structure for public.st_area2d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_area2d"("public"."geometry"); CREATE FUNCTION "public"."st_area2d"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_area_polygon' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_area2d"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_area("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_area"("public"."geometry"); CREATE FUNCTION "public"."st_area"(IN "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','area' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_area"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_area"(IN "public"."geometry") IS 'args: g1 - Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.'; -- ---------------------------- -- Function structure for public.st_distance_spheroid("public"."geometry", "public"."geometry", "public"."spheroid") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_distance_spheroid"("public"."geometry", "public"."geometry", "public"."spheroid"); CREATE FUNCTION "public"."st_distance_spheroid"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN "public"."spheroid") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_distance_ellipsoid' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_distance_spheroid"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN "public"."spheroid") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_distance_spheroid"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN "public"."spheroid") IS 'args: geomlonlatA, geomlonlatB, measurement_spheroid - Returns the minimum distance between two lon/lat geometries given a particular spheroid. PostGIS versions prior to 1.5 only support points.'; -- ---------------------------- -- Function structure for public.st_distance("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_distance"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_distance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','distance' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_distance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_distance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters.'; -- ---------------------------- -- Function structure for public.st_point_inside_circle("public"."geometry", float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_point_inside_circle"("public"."geometry", float8, float8, float8); CREATE FUNCTION "public"."st_point_inside_circle"(IN "public"."geometry", IN float8, IN float8, IN float8) RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_inside_circle_point' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_point_inside_circle"(IN "public"."geometry", IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_point_inside_circle"(IN "public"."geometry", IN float8, IN float8, IN float8) IS 'args: a_point, center_x, center_y, radius - Is the point geometry insert circle defined by center_x, center_y, radius'; -- ---------------------------- -- Function structure for public.st_azimuth("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_azimuth"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_azimuth"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_azimuth' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_azimuth"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_azimuth"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: pointA, pointB - Returns the north-based azimuth as the angle in radians measured clockwise from the vertical on pointA to pointB.'; -- ---------------------------- -- Function structure for public.st_force2d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force2d"("public"."geometry"); CREATE FUNCTION "public"."st_force2d"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force2d"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_force2d"(IN "public"."geometry") IS 'args: geomA - Forces the geometries into a "2-dimensional mode" so that all output representations will only have the X and Y coordinates.'; -- ---------------------------- -- Function structure for public.st_force_2d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force_2d"("public"."geometry"); CREATE FUNCTION "public"."st_force_2d"(IN "public"."geometry") RETURNS "public"."geometry" AS $BODY$ SELECT _postgis_deprecate('ST_Force_2d', 'ST_Force2D', '2.1.0'); SELECT ST_Force2D($1); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force_2d"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_force3dz("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force3dz"("public"."geometry"); CREATE FUNCTION "public"."st_force3dz"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_3dz' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force3dz"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_force3dz"(IN "public"."geometry") IS 'args: geomA - Forces the geometries into XYZ mode. This is a synonym for ST_Force3D.'; -- ---------------------------- -- Function structure for public.st_force_3dz("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force_3dz"("public"."geometry"); CREATE FUNCTION "public"."st_force_3dz"(IN "public"."geometry") RETURNS "public"."geometry" AS $BODY$ SELECT _postgis_deprecate('ST_Force_3dz', 'ST_Force3DZ', '2.1.0'); SELECT ST_Force3DZ($1); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force_3dz"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_force3d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force3d"("public"."geometry"); CREATE FUNCTION "public"."st_force3d"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_3dz' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force3d"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_force3d"(IN "public"."geometry") IS 'args: geomA - Forces the geometries into XYZ mode. This is an alias for ST_Force3DZ.'; -- ---------------------------- -- Function structure for public.st_force_3d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force_3d"("public"."geometry"); CREATE FUNCTION "public"."st_force_3d"(IN "public"."geometry") RETURNS "public"."geometry" AS $BODY$ SELECT _postgis_deprecate('ST_Force_3d', 'ST_Force3D', '2.1.0'); SELECT ST_Force3D($1); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force_3d"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_force3dm("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force3dm"("public"."geometry"); CREATE FUNCTION "public"."st_force3dm"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_3dm' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force3dm"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_force3dm"(IN "public"."geometry") IS 'args: geomA - Forces the geometries into XYM mode.'; -- ---------------------------- -- Function structure for public.st_force_3dm("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force_3dm"("public"."geometry"); CREATE FUNCTION "public"."st_force_3dm"(IN "public"."geometry") RETURNS "public"."geometry" AS $BODY$ SELECT _postgis_deprecate('ST_Force_3dm', 'ST_Force3DM', '2.1.0'); SELECT ST_Force3DM($1); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force_3dm"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_force4d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force4d"("public"."geometry"); CREATE FUNCTION "public"."st_force4d"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_4d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force4d"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_force4d"(IN "public"."geometry") IS 'args: geomA - Forces the geometries into XYZM mode.'; -- ---------------------------- -- Function structure for public.st_force_4d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force_4d"("public"."geometry"); CREATE FUNCTION "public"."st_force_4d"(IN "public"."geometry") RETURNS "public"."geometry" AS $BODY$ SELECT _postgis_deprecate('ST_Force_4d', 'ST_Force4D', '2.1.0'); SELECT ST_Force4D($1); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force_4d"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_forcecollection("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_forcecollection"("public"."geometry"); CREATE FUNCTION "public"."st_forcecollection"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_collection' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_forcecollection"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_forcecollection"(IN "public"."geometry") IS 'args: geomA - Converts the geometry into a GEOMETRYCOLLECTION.'; -- ---------------------------- -- Function structure for public.st_force_collection("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_force_collection"("public"."geometry"); CREATE FUNCTION "public"."st_force_collection"(IN "public"."geometry") RETURNS "public"."geometry" AS $BODY$ SELECT _postgis_deprecate('ST_Force_Collection', 'ST_ForceCollection', '2.1.0'); SELECT ST_ForceCollection($1); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_force_collection"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_collectionextract("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_collectionextract"("public"."geometry", int4); CREATE FUNCTION "public"."st_collectionextract"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_CollectionExtract' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_collectionextract"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_collectionextract"(IN "public"."geometry", IN int4) IS 'args: collection, type - Given a (multi)geometry, returns a (multi)geometry consisting only of elements of the specified type.'; -- ---------------------------- -- Function structure for public.st_collectionhomogenize("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_collectionhomogenize"("public"."geometry"); CREATE FUNCTION "public"."st_collectionhomogenize"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_CollectionHomogenize' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_collectionhomogenize"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_collectionhomogenize"(IN "public"."geometry") IS 'args: collection - Given a geometry collection, returns the "simplest" representation of the contents.'; -- ---------------------------- -- Function structure for public.st_multi("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multi"("public"."geometry"); CREATE FUNCTION "public"."st_multi"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_multi' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multi"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_multi"(IN "public"."geometry") IS 'args: g1 - Returns the geometry as a MULTI* geometry. If the geometry is already a MULTI*, it is returned unchanged.'; -- ---------------------------- -- Function structure for public.st_forcesfs("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_forcesfs"("public"."geometry"); CREATE FUNCTION "public"."st_forcesfs"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_sfs' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_forcesfs"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_forcesfs"(IN "public"."geometry") IS 'args: geomA - Forces the geometries to use SFS 1.1 geometry types only.'; -- ---------------------------- -- Function structure for public.st_forcesfs("public"."geometry", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_forcesfs"("public"."geometry", text); CREATE FUNCTION "public"."st_forcesfs"(IN "public"."geometry", IN "version" text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_sfs' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_forcesfs"(IN "public"."geometry", IN "version" text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_forcesfs"(IN "public"."geometry", IN "version" text) IS 'args: geomA, version - Forces the geometries to use SFS 1.1 geometry types only.'; -- ---------------------------- -- Function structure for public.st_expand("public"."box3d", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_expand"("public"."box3d", float8); CREATE FUNCTION "public"."st_expand"(IN "public"."box3d", IN float8) RETURNS "public"."box3d" AS '$libdir/postgis-2.1','BOX3D_expand' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_expand"(IN "public"."box3d", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_expand"(IN "public"."box3d", IN float8) IS 'args: g1, units_to_expand - Returns bounding box expanded in all directions from the bounding box of the input geometry. Uses double-precision'; -- ---------------------------- -- Function structure for public.st_expand("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_expand"("public"."geometry", float8); CREATE FUNCTION "public"."st_expand"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_expand' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_expand"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_expand"(IN "public"."geometry", IN float8) IS 'args: g1, units_to_expand - Returns bounding box expanded in all directions from the bounding box of the input geometry. Uses double-precision'; -- ---------------------------- -- Function structure for public.st_envelope("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_envelope"("public"."geometry"); CREATE FUNCTION "public"."st_envelope"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_envelope' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_envelope"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_envelope"(IN "public"."geometry") IS 'args: g1 - Returns a geometry representing the double precision (float8) bounding box of the supplied geometry.'; -- ---------------------------- -- Function structure for public.st_reverse("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_reverse"("public"."geometry"); CREATE FUNCTION "public"."st_reverse"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_reverse' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_reverse"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_reverse"(IN "public"."geometry") IS 'args: g1 - Returns the geometry with vertex order reversed.'; -- ---------------------------- -- Function structure for public.st_forcerhr("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_forcerhr"("public"."geometry"); CREATE FUNCTION "public"."st_forcerhr"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_force_clockwise_poly' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_forcerhr"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_forcerhr"(IN "public"."geometry") IS 'args: g - Forces the orientation of the vertices in a polygon to follow the Right-Hand-Rule.'; -- ---------------------------- -- Function structure for public.postgis_noop("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_noop"("public"."geometry"); CREATE FUNCTION "public"."postgis_noop"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_noop' LANGUAGE c COST 1 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."postgis_noop"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_zmflag("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_zmflag"("public"."geometry"); CREATE FUNCTION "public"."st_zmflag"(IN "public"."geometry") RETURNS "int2" AS '$libdir/postgis-2.1','LWGEOM_zmflag' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_zmflag"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_zmflag"(IN "public"."geometry") IS 'args: geomA - Returns ZM (dimension semantic) flag of the geometries as a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d.'; -- ---------------------------- -- Function structure for public.st_ndims("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_ndims"("public"."geometry"); CREATE FUNCTION "public"."st_ndims"(IN "public"."geometry") RETURNS "int2" AS '$libdir/postgis-2.1','LWGEOM_ndims' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_ndims"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_ndims"(IN "public"."geometry") IS 'args: g1 - Returns coordinate dimension of the geometry as a small int. Values are: 2,3 or 4.'; -- ---------------------------- -- Function structure for public.st_asewkt("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asewkt"("public"."geometry"); CREATE FUNCTION "public"."st_asewkt"(IN "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asEWKT' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asewkt"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asewkt"(IN "public"."geometry") IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.'; -- ---------------------------- -- Function structure for public.st_asewkb("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asewkb"("public"."geometry"); CREATE FUNCTION "public"."st_asewkb"(IN "public"."geometry") RETURNS "bytea" AS '$libdir/postgis-2.1','WKBFromLWGEOM' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asewkb"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asewkb"(IN "public"."geometry") IS 'args: g1 - Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.'; -- ---------------------------- -- Function structure for public.st_ashexewkb("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_ashexewkb"("public"."geometry"); CREATE FUNCTION "public"."st_ashexewkb"(IN "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asHEXEWKB' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_ashexewkb"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_ashexewkb"(IN "public"."geometry") IS 'args: g1 - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.'; -- ---------------------------- -- Function structure for public.st_ashexewkb("public"."geometry", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_ashexewkb"("public"."geometry", text); CREATE FUNCTION "public"."st_ashexewkb"(IN "public"."geometry", IN text) RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asHEXEWKB' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_ashexewkb"(IN "public"."geometry", IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_ashexewkb"(IN "public"."geometry", IN text) IS 'args: g1, NDRorXDR - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.'; -- ---------------------------- -- Function structure for public.st_asewkb("public"."geometry", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asewkb"("public"."geometry", text); CREATE FUNCTION "public"."st_asewkb"(IN "public"."geometry", IN text) RETURNS "bytea" AS '$libdir/postgis-2.1','WKBFromLWGEOM' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asewkb"(IN "public"."geometry", IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asewkb"(IN "public"."geometry", IN text) IS 'args: g1, NDR_or_XDR - Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.'; -- ---------------------------- -- Function structure for public.st_aslatlontext("public"."geometry", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aslatlontext"("public"."geometry", text); CREATE FUNCTION "public"."st_aslatlontext"(IN "public"."geometry", IN text) RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_to_latlon' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aslatlontext"(IN "public"."geometry", IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_aslatlontext"(IN "public"."geometry", IN text) IS 'args: pt, format - Return the Degrees, Minutes, Seconds representation of the given point.'; -- ---------------------------- -- Function structure for public.st_aslatlontext("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aslatlontext"("public"."geometry"); CREATE FUNCTION "public"."st_aslatlontext"(IN "public"."geometry") RETURNS "text" AS $BODY$ SELECT ST_AsLatLonText($1, '') $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aslatlontext"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_aslatlontext"(IN "public"."geometry") IS 'args: pt - Return the Degrees, Minutes, Seconds representation of the given point.'; -- ---------------------------- -- Function structure for public.geomfromewkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geomfromewkb"(bytea); CREATE FUNCTION "public"."geomfromewkb"(IN bytea) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOMFromWKB' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geomfromewkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_geomfromewkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromewkb"(bytea); CREATE FUNCTION "public"."st_geomfromewkb"(IN bytea) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOMFromWKB' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromewkb"(IN bytea) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromewkb"(IN bytea) IS 'args: EWKB - Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).'; -- ---------------------------- -- Function structure for public.geomfromewkt(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geomfromewkt"(text); CREATE FUNCTION "public"."geomfromewkt"(IN text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','parse_WKT_lwgeom' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geomfromewkt"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_geomfromewkt(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromewkt"(text); CREATE FUNCTION "public"."st_geomfromewkt"(IN text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','parse_WKT_lwgeom' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromewkt"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromewkt"(IN text) IS 'args: EWKT - Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).'; -- ---------------------------- -- Function structure for public.st_makepoint(float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makepoint"(float8, float8); CREATE FUNCTION "public"."st_makepoint"(IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makepoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makepoint"(IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makepoint"(IN float8, IN float8) IS 'args: x, y - Creates a 2D,3DZ or 4D point geometry.'; -- ---------------------------- -- Function structure for public.st_makepoint(float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makepoint"(float8, float8, float8); CREATE FUNCTION "public"."st_makepoint"(IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makepoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makepoint"(IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makepoint"(IN float8, IN float8, IN float8) IS 'args: x, y, z - Creates a 2D,3DZ or 4D point geometry.'; -- ---------------------------- -- Function structure for public.st_makepoint(float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makepoint"(float8, float8, float8, float8); CREATE FUNCTION "public"."st_makepoint"(IN float8, IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makepoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makepoint"(IN float8, IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makepoint"(IN float8, IN float8, IN float8, IN float8) IS 'args: x, y, z, m - Creates a 2D,3DZ or 4D point geometry.'; -- ---------------------------- -- Function structure for public.st_makepointm(float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makepointm"(float8, float8, float8); CREATE FUNCTION "public"."st_makepointm"(IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makepoint3dm' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makepointm"(IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makepointm"(IN float8, IN float8, IN float8) IS 'args: x, y, m - Creates a point geometry with an x y and m coordinate.'; -- ---------------------------- -- Function structure for public.st_3dmakebox("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dmakebox"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_3dmakebox"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."box3d" AS '$libdir/postgis-2.1','BOX3D_construct' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dmakebox"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dmakebox"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: point3DLowLeftBottom, point3DUpRightTop - Creates a BOX3D defined by the given 3d point geometries.'; -- ---------------------------- -- Function structure for public.st_makeline("public"."_geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makeline"("public"."_geometry"); CREATE FUNCTION "public"."st_makeline"(IN "public"."_geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makeline_garray' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makeline"(IN "public"."_geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makeline"(IN "public"."_geometry") IS 'args: geoms_array - Creates a Linestring from point or line geometries.'; -- ---------------------------- -- Function structure for public.st_linefrommultipoint("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linefrommultipoint"("public"."geometry"); CREATE FUNCTION "public"."st_linefrommultipoint"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_line_from_mpoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linefrommultipoint"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linefrommultipoint"(IN "public"."geometry") IS 'args: aMultiPoint - Creates a LineString from a MultiPoint geometry.'; -- ---------------------------- -- Function structure for public.st_makeline("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makeline"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_makeline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makeline' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makeline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makeline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geom1, geom2 - Creates a Linestring from point or line geometries.'; -- ---------------------------- -- Function structure for public.st_addpoint("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addpoint"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_addpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_addpoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: linestring, point - Adds a point to a LineString before point <position> (0-based index).'; -- ---------------------------- -- Function structure for public.st_addpoint("public"."geometry", "public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addpoint"("public"."geometry", "public"."geometry", int4); CREATE FUNCTION "public"."st_addpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_addpoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN int4) IS 'args: linestring, point, position - Adds a point to a LineString before point <position> (0-based index).'; -- ---------------------------- -- Function structure for public.st_removepoint("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_removepoint"("public"."geometry", int4); CREATE FUNCTION "public"."st_removepoint"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_removepoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_removepoint"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_removepoint"(IN "public"."geometry", IN int4) IS 'args: linestring, offset - Removes point from a linestring. Offset is 0-based.'; -- ---------------------------- -- Function structure for public.st_setpoint("public"."geometry", int4, "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setpoint"("public"."geometry", int4, "public"."geometry"); CREATE FUNCTION "public"."st_setpoint"(IN "public"."geometry", IN int4, IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_setpoint_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setpoint"(IN "public"."geometry", IN int4, IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setpoint"(IN "public"."geometry", IN int4, IN "public"."geometry") IS 'args: linestring, zerobasedposition, point - Replace point N of linestring with given point. Index is 0-based.'; -- ---------------------------- -- Function structure for public.st_makeenvelope(float8, float8, float8, float8, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makeenvelope"(float8, float8, float8, float8, int4); CREATE FUNCTION "public"."st_makeenvelope"(IN float8, IN float8, IN float8, IN float8, IN int4 DEFAULT 0) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_MakeEnvelope' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makeenvelope"(IN float8, IN float8, IN float8, IN float8, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makeenvelope"(IN float8, IN float8, IN float8, IN float8, IN int4) IS 'args: xmin, ymin, xmax, ymax, srid=unknown - Creates a rectangular Polygon formed from the given minimums and maximums. Input values must be in SRS specified by the SRID.'; -- ---------------------------- -- Function structure for public.st_makepolygon("public"."geometry", "public"."_geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makepolygon"("public"."geometry", "public"."_geometry"); CREATE FUNCTION "public"."st_makepolygon"(IN "public"."geometry", IN "public"."_geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makepoly' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makepolygon"(IN "public"."geometry", IN "public"."_geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makepolygon"(IN "public"."geometry", IN "public"."_geometry") IS 'args: outerlinestring, interiorlinestrings - Creates a Polygon formed by the given shell. Input geometries must be closed LINESTRINGS.'; -- ---------------------------- -- Function structure for public.st_makepolygon("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makepolygon"("public"."geometry"); CREATE FUNCTION "public"."st_makepolygon"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makepoly' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makepolygon"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makepolygon"(IN "public"."geometry") IS 'args: linestring - Creates a Polygon formed by the given shell. Input geometries must be closed LINESTRINGS.'; -- ---------------------------- -- Function structure for public.st_buildarea("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_buildarea"("public"."geometry"); CREATE FUNCTION "public"."st_buildarea"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_BuildArea' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_buildarea"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_buildarea"(IN "public"."geometry") IS 'args: A - Creates an areal geometry formed by the constituent linework of given geometry'; -- ---------------------------- -- Function structure for public.st_polygonize("public"."_geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polygonize"("public"."_geometry"); CREATE FUNCTION "public"."st_polygonize"(IN "public"."_geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','polygonize_garray' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polygonize"(IN "public"."_geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_polygonize"(IN "public"."_geometry") IS 'args: geom_array - Aggregate. Creates a GeometryCollection containing possible polygons formed from the constituent linework of a set of geometries.'; -- ---------------------------- -- Function structure for public.st_linemerge("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linemerge"("public"."geometry"); CREATE FUNCTION "public"."st_linemerge"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','linemerge' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linemerge"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linemerge"(IN "public"."geometry") IS 'args: amultilinestring - Returns a (set of) LineString(s) formed by sewing together a MULTILINESTRING.'; -- ---------------------------- -- Function structure for public.st_dump("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dump"("public"."geometry"); CREATE FUNCTION "public"."st_dump"(IN "public"."geometry") RETURNS SETOF "public"."geometry_dump" AS '$libdir/postgis-2.1','LWGEOM_dump' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dump"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dump"(IN "public"."geometry") IS 'args: g1 - Returns a set of geometry_dump (geom,path) rows, that make up a geometry g1.'; -- ---------------------------- -- Function structure for public.st_dumprings("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dumprings"("public"."geometry"); CREATE FUNCTION "public"."st_dumprings"(IN "public"."geometry") RETURNS SETOF "public"."geometry_dump" AS '$libdir/postgis-2.1','LWGEOM_dump_rings' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dumprings"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dumprings"(IN "public"."geometry") IS 'args: a_polygon - Returns a set of geometry_dump rows, representing the exterior and interior rings of a polygon.'; -- ---------------------------- -- Function structure for public._st_dumppoints("public"."geometry", _int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_dumppoints"("public"."geometry", _int4); CREATE FUNCTION "public"."_st_dumppoints"(IN the_geom "public"."geometry", IN cur_path _int4) RETURNS SETOF "public"."geometry_dump" AS $BODY$ DECLARE tmp geometry_dump; tmp2 geometry_dump; nb_points integer; nb_geom integer; i integer; j integer; g geometry; BEGIN -- RAISE DEBUG '%,%', cur_path, ST_GeometryType(the_geom); -- Special case collections : iterate and return the DumpPoints of the geometries IF (ST_IsCollection(the_geom)) THEN i = 1; FOR tmp2 IN SELECT (ST_Dump(the_geom)).* LOOP FOR tmp IN SELECT * FROM _ST_DumpPoints(tmp2.geom, cur_path || tmp2.path) LOOP RETURN NEXT tmp; END LOOP; i = i + 1; END LOOP; RETURN; END IF; -- Special case (POLYGON) : return the points of the rings of a polygon IF (ST_GeometryType(the_geom) = 'ST_Polygon') THEN FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_ExteriorRing(the_geom), cur_path || ARRAY[1]) LOOP RETURN NEXT tmp; END LOOP; j := ST_NumInteriorRings(the_geom); FOR i IN 1..j LOOP FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_InteriorRingN(the_geom, i), cur_path || ARRAY[i+1]) LOOP RETURN NEXT tmp; END LOOP; END LOOP; RETURN; END IF; -- Special case (TRIANGLE) : return the points of the external rings of a TRIANGLE IF (ST_GeometryType(the_geom) = 'ST_Triangle') THEN FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_ExteriorRing(the_geom), cur_path || ARRAY[1]) LOOP RETURN NEXT tmp; END LOOP; RETURN; END IF; -- Special case (POINT) : return the point IF (ST_GeometryType(the_geom) = 'ST_Point') THEN tmp.path = cur_path || ARRAY[1]; tmp.geom = the_geom; RETURN NEXT tmp; RETURN; END IF; -- Use ST_NumPoints rather than ST_NPoints to have a NULL value if the_geom isn't -- a LINESTRING, CIRCULARSTRING. SELECT ST_NumPoints(the_geom) INTO nb_points; -- This should never happen IF (nb_points IS NULL) THEN RAISE EXCEPTION 'Unexpected error while dumping geometry %', ST_AsText(the_geom); END IF; FOR i IN 1..nb_points LOOP tmp.path = cur_path || ARRAY[i]; tmp.geom := ST_PointN(the_geom, i); RETURN NEXT tmp; END LOOP; END $BODY$ LANGUAGE plpgsql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_st_dumppoints"(IN the_geom "public"."geometry", IN cur_path _int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_dumppoints("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dumppoints"("public"."geometry"); CREATE FUNCTION "public"."st_dumppoints"(IN "public"."geometry") RETURNS SETOF "public"."geometry_dump" AS '$libdir/postgis-2.1','LWGEOM_dumppoints' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dumppoints"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dumppoints"(IN "public"."geometry") IS 'args: geom - Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.'; -- ---------------------------- -- Function structure for public.box2d("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box2d"("public"."box3d"); CREATE FUNCTION "public"."box2d"(IN "public"."box3d") RETURNS "public"."box2d" AS '$libdir/postgis-2.1','BOX3D_to_BOX2D' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box2d"(IN "public"."box3d") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box3d("public"."box2d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box3d"("public"."box2d"); CREATE FUNCTION "public"."box3d"(IN "public"."box2d") RETURNS "public"."box3d" AS '$libdir/postgis-2.1','BOX2D_to_BOX3D' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box3d"(IN "public"."box2d") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box"("public"."box3d"); CREATE FUNCTION "public"."box"(IN "public"."box3d") RETURNS "box" AS '$libdir/postgis-2.1','BOX3D_to_BOX' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box"(IN "public"."box3d") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.populate_geometry_columns(bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."populate_geometry_columns"(bool); CREATE FUNCTION "public"."populate_geometry_columns"(IN use_typmod bool DEFAULT true) RETURNS "text" AS $BODY$ DECLARE inserted integer; oldcount integer; probed integer; stale integer; gcs RECORD; gc RECORD; gsrid integer; gndims integer; gtype text; query text; gc_is_valid boolean; BEGIN SELECT count(*) INTO oldcount FROM geometry_columns; inserted := 0; -- Count the number of geometry columns in all tables and views SELECT count(DISTINCT c.oid) INTO probed FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE (c.relkind = 'r' OR c.relkind = 'v') AND t.typname = 'geometry' AND a.attisdropped = false AND a.atttypid = t.oid AND a.attrelid = c.oid AND c.relnamespace = n.oid AND n.nspname NOT ILIKE 'pg_temp%' AND c.relname != 'raster_columns' ; -- Iterate through all non-dropped geometry columns RAISE DEBUG 'Processing Tables.....'; FOR gcs IN SELECT DISTINCT ON (c.oid) c.oid, n.nspname, c.relname FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE c.relkind = 'r' AND t.typname = 'geometry' AND a.attisdropped = false AND a.atttypid = t.oid AND a.attrelid = c.oid AND c.relnamespace = n.oid AND n.nspname NOT ILIKE 'pg_temp%' AND c.relname != 'raster_columns' LOOP inserted := inserted + populate_geometry_columns(gcs.oid, use_typmod); END LOOP; IF oldcount > inserted THEN stale = oldcount-inserted; ELSE stale = 0; END IF; RETURN 'probed:' ||probed|| ' inserted:'||inserted; END $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."populate_geometry_columns"(IN use_typmod bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."populate_geometry_columns"(IN use_typmod bool) IS 'args: use_typmod=true - Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints This ensures they will be registered correctly in geometry_columns view. By default will convert all geometry columns with no type modifier to ones with type modifiers. To get old behavior set use_typmod=false'; -- ---------------------------- -- Function structure for public.populate_geometry_columns(oid, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."populate_geometry_columns"(oid, bool); CREATE FUNCTION "public"."populate_geometry_columns"(IN tbl_oid oid, IN use_typmod bool DEFAULT true) RETURNS "int4" AS $BODY$ DECLARE gcs RECORD; gc RECORD; gc_old RECORD; gsrid integer; gndims integer; gtype text; query text; gc_is_valid boolean; inserted integer; constraint_successful boolean := false; BEGIN inserted := 0; -- Iterate through all geometry columns in this table FOR gcs IN SELECT n.nspname, c.relname, a.attname FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE c.relkind = 'r' AND t.typname = 'geometry' AND a.attisdropped = false AND a.atttypid = t.oid AND a.attrelid = c.oid AND c.relnamespace = n.oid AND n.nspname NOT ILIKE 'pg_temp%' AND c.oid = tbl_oid LOOP RAISE DEBUG 'Processing column %.%.%', gcs.nspname, gcs.relname, gcs.attname; gc_is_valid := true; -- Find the srid, coord_dimension, and type of current geometry -- in geometry_columns -- which is now a view SELECT type, srid, coord_dimension INTO gc_old FROM geometry_columns WHERE f_table_schema = gcs.nspname AND f_table_name = gcs.relname AND f_geometry_column = gcs.attname; IF upper(gc_old.type) = 'GEOMETRY' THEN -- This is an unconstrained geometry we need to do something -- We need to figure out what to set the type by inspecting the data EXECUTE 'SELECT st_srid(' || quote_ident(gcs.attname) || ') As srid, GeometryType(' || quote_ident(gcs.attname) || ') As type, ST_NDims(' || quote_ident(gcs.attname) || ') As dims ' || ' FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1;' INTO gc; IF gc IS NULL THEN -- there is no data so we can not determine geometry type RAISE WARNING 'No data in table %.%, so no information to determine geometry type and srid', gcs.nspname, gcs.relname; RETURN 0; END IF; gsrid := gc.srid; gtype := gc.type; gndims := gc.dims; IF use_typmod THEN BEGIN EXECUTE 'ALTER TABLE ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' ALTER COLUMN ' || quote_ident(gcs.attname) || ' TYPE geometry(' || postgis_type_name(gtype, gndims, true) || ', ' || gsrid::text || ') '; inserted := inserted + 1; EXCEPTION WHEN invalid_parameter_value OR feature_not_supported THEN RAISE WARNING 'Could not convert ''%'' in ''%.%'' to use typmod with srid %, type %: %', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), gsrid, postgis_type_name(gtype, gndims, true), SQLERRM; gc_is_valid := false; END; ELSE -- Try to apply srid check to column constraint_successful = false; IF (gsrid > 0 AND postgis_constraint_srid(gcs.nspname, gcs.relname,gcs.attname) IS NULL ) THEN BEGIN EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' ADD CONSTRAINT ' || quote_ident('enforce_srid_' || gcs.attname) || ' CHECK (st_srid(' || quote_ident(gcs.attname) || ') = ' || gsrid || ')'; constraint_successful := true; EXCEPTION WHEN check_violation THEN RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (st_srid(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gsrid; gc_is_valid := false; END; END IF; -- Try to apply ndims check to column IF (gndims IS NOT NULL AND postgis_constraint_dims(gcs.nspname, gcs.relname,gcs.attname) IS NULL ) THEN BEGIN EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' ADD CONSTRAINT ' || quote_ident('enforce_dims_' || gcs.attname) || ' CHECK (st_ndims(' || quote_ident(gcs.attname) || ') = '||gndims||')'; constraint_successful := true; EXCEPTION WHEN check_violation THEN RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (st_ndims(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gndims; gc_is_valid := false; END; END IF; -- Try to apply geometrytype check to column IF (gtype IS NOT NULL AND postgis_constraint_type(gcs.nspname, gcs.relname,gcs.attname) IS NULL ) THEN BEGIN EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' ADD CONSTRAINT ' || quote_ident('enforce_geotype_' || gcs.attname) || ' CHECK ((geometrytype(' || quote_ident(gcs.attname) || ') = ' || quote_literal(gtype) || ') OR (' || quote_ident(gcs.attname) || ' IS NULL))'; constraint_successful := true; EXCEPTION WHEN check_violation THEN -- No geometry check can be applied. This column contains a number of geometry types. RAISE WARNING 'Could not add geometry type check (%) to table column: %.%.%', gtype, quote_ident(gcs.nspname),quote_ident(gcs.relname),quote_ident(gcs.attname); END; END IF; --only count if we were successful in applying at least one constraint IF constraint_successful THEN inserted := inserted + 1; END IF; END IF; END IF; END LOOP; RETURN inserted; END $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."populate_geometry_columns"(IN tbl_oid oid, IN use_typmod bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."populate_geometry_columns"(IN tbl_oid oid, IN use_typmod bool) IS 'args: relation_oid, use_typmod=true - Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints This ensures they will be registered correctly in geometry_columns view. By default will convert all geometry columns with no type modifier to ones with type modifiers. To get old behavior set use_typmod=false'; -- ---------------------------- -- Function structure for public.addgeometrycolumn(varchar, varchar, varchar, varchar, int4, varchar, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addgeometrycolumn"(varchar, varchar, varchar, varchar, int4, varchar, int4, bool); CREATE FUNCTION "public"."addgeometrycolumn"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid_in int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool DEFAULT true) RETURNS "text" AS $BODY$ DECLARE rec RECORD; sr varchar; real_schema name; sql text; new_srid integer; BEGIN -- Verify geometry type IF (postgis_type_name(new_type,new_dim) IS NULL ) THEN RAISE EXCEPTION 'Invalid type name "%(%)" - valid ones are: POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE, CURVEPOLYGON, MULTISURFACE, GEOMETRY, GEOMETRYCOLLECTION, POINTM, MULTIPOINTM, LINESTRINGM, MULTILINESTRINGM, POLYGONM, MULTIPOLYGONM, CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM CURVEPOLYGONM, MULTISURFACEM, TRIANGLE, TRIANGLEM, POLYHEDRALSURFACE, POLYHEDRALSURFACEM, TIN, TINM or GEOMETRYCOLLECTIONM', new_type, new_dim; RETURN 'fail'; END IF; -- Verify dimension IF ( (new_dim >4) OR (new_dim <2) ) THEN RAISE EXCEPTION 'invalid dimension'; RETURN 'fail'; END IF; IF ( (new_type LIKE '%M') AND (new_dim!=3) ) THEN RAISE EXCEPTION 'TypeM needs 3 dimensions'; RETURN 'fail'; END IF; -- Verify SRID IF ( new_srid_in > 0 ) THEN IF new_srid_in > 998999 THEN RAISE EXCEPTION 'AddGeometryColumn() - SRID must be <= %', 998999; END IF; new_srid := new_srid_in; SELECT SRID INTO sr FROM spatial_ref_sys WHERE SRID = new_srid; IF NOT FOUND THEN RAISE EXCEPTION 'AddGeometryColumn() - invalid SRID'; RETURN 'fail'; END IF; ELSE new_srid := ST_SRID('POINT EMPTY'::geometry); IF ( new_srid_in != new_srid ) THEN RAISE NOTICE 'SRID value % converted to the officially unknown SRID value %', new_srid_in, new_srid; END IF; END IF; -- Verify schema IF ( schema_name IS NOT NULL AND schema_name != '' ) THEN sql := 'SELECT nspname FROM pg_namespace ' || 'WHERE text(nspname) = ' || quote_literal(schema_name) || 'LIMIT 1'; RAISE DEBUG '%', sql; EXECUTE sql INTO real_schema; IF ( real_schema IS NULL ) THEN RAISE EXCEPTION 'Schema % is not a valid schemaname', quote_literal(schema_name); RETURN 'fail'; END IF; END IF; IF ( real_schema IS NULL ) THEN RAISE DEBUG 'Detecting schema'; sql := 'SELECT n.nspname AS schemaname ' || 'FROM pg_catalog.pg_class c ' || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' || 'WHERE c.relkind = ' || quote_literal('r') || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ')' || ' AND pg_catalog.pg_table_is_visible(c.oid)' || ' AND c.relname = ' || quote_literal(table_name); RAISE DEBUG '%', sql; EXECUTE sql INTO real_schema; IF ( real_schema IS NULL ) THEN RAISE EXCEPTION 'Table % does not occur in the search_path', quote_literal(table_name); RETURN 'fail'; END IF; END IF; -- Add geometry column to table IF use_typmod THEN sql := 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD COLUMN ' || quote_ident(column_name) || ' geometry(' || postgis_type_name(new_type, new_dim) || ', ' || new_srid::text || ')'; RAISE DEBUG '%', sql; ELSE sql := 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD COLUMN ' || quote_ident(column_name) || ' geometry '; RAISE DEBUG '%', sql; END IF; EXECUTE sql; IF NOT use_typmod THEN -- Add table CHECKs sql := 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' || quote_ident('enforce_srid_' || column_name) || ' CHECK (st_srid(' || quote_ident(column_name) || ') = ' || new_srid::text || ')' ; RAISE DEBUG '%', sql; EXECUTE sql; sql := 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' || quote_ident('enforce_dims_' || column_name) || ' CHECK (st_ndims(' || quote_ident(column_name) || ') = ' || new_dim::text || ')' ; RAISE DEBUG '%', sql; EXECUTE sql; IF ( NOT (new_type = 'GEOMETRY')) THEN sql := 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' || quote_ident('enforce_geotype_' || column_name) || ' CHECK (GeometryType(' || quote_ident(column_name) || ')=' || quote_literal(new_type) || ' OR (' || quote_ident(column_name) || ') is null)'; RAISE DEBUG '%', sql; EXECUTE sql; END IF; END IF; RETURN real_schema || '.' || table_name || '.' || column_name || ' SRID:' || new_srid::text || ' TYPE:' || new_type || ' DIMS:' || new_dim::text || ' '; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addgeometrycolumn"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid_in int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."addgeometrycolumn"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid_in int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool) IS 'args: catalog_name, schema_name, table_name, column_name, srid, type, dimension, use_typmod=true - Adds a geometry column to an existing table of attributes. By default uses type modifier to define rather than constraints. Pass in false for use_typmod to get old check constraint based behavior'; -- ---------------------------- -- Function structure for public.addgeometrycolumn(varchar, varchar, varchar, int4, varchar, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addgeometrycolumn"(varchar, varchar, varchar, int4, varchar, int4, bool); CREATE FUNCTION "public"."addgeometrycolumn"(IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool DEFAULT true) RETURNS "text" AS $BODY$ DECLARE ret text; BEGIN SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6,$7) into ret; RETURN ret; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."addgeometrycolumn"(IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."addgeometrycolumn"(IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool) IS 'args: schema_name, table_name, column_name, srid, type, dimension, use_typmod=true - Adds a geometry column to an existing table of attributes. By default uses type modifier to define rather than constraints. Pass in false for use_typmod to get old check constraint based behavior'; -- ---------------------------- -- Function structure for public.addgeometrycolumn(varchar, varchar, int4, varchar, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addgeometrycolumn"(varchar, varchar, int4, varchar, int4, bool); CREATE FUNCTION "public"."addgeometrycolumn"(IN "table_name" varchar, IN "column_name" varchar, IN new_srid int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool DEFAULT true) RETURNS "text" AS $BODY$ DECLARE ret text; BEGIN SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5, $6) into ret; RETURN ret; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addgeometrycolumn"(IN "table_name" varchar, IN "column_name" varchar, IN new_srid int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."addgeometrycolumn"(IN "table_name" varchar, IN "column_name" varchar, IN new_srid int4, IN new_type varchar, IN new_dim int4, IN use_typmod bool) IS 'args: table_name, column_name, srid, type, dimension, use_typmod=true - Adds a geometry column to an existing table of attributes. By default uses type modifier to define rather than constraints. Pass in false for use_typmod to get old check constraint based behavior'; -- ---------------------------- -- Function structure for public.dropgeometrycolumn(varchar, varchar, varchar, varchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dropgeometrycolumn"(varchar, varchar, varchar, varchar); CREATE FUNCTION "public"."dropgeometrycolumn"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar) RETURNS "text" AS $BODY$ DECLARE myrec RECORD; okay boolean; real_schema name; BEGIN -- Find, check or fix schema_name IF ( schema_name != '' ) THEN okay = false; FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP okay := true; END LOOP; IF ( okay <> true ) THEN RAISE NOTICE 'Invalid schema name - using current_schema()'; SELECT current_schema() into real_schema; ELSE real_schema = schema_name; END IF; ELSE SELECT current_schema() into real_schema; END IF; -- Find out if the column is in the geometry_columns table okay = false; FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP okay := true; END LOOP; IF (okay <> true) THEN RAISE EXCEPTION 'column not found in geometry_columns table'; RETURN false; END IF; -- Remove table column EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' DROP COLUMN ' || quote_ident(column_name); RETURN real_schema || '.' || table_name || '.' || column_name ||' effectively removed.'; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."dropgeometrycolumn"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."dropgeometrycolumn"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar) IS 'args: catalog_name, schema_name, table_name, column_name - Removes a geometry column from a spatial table.'; -- ---------------------------- -- Function structure for public.dropgeometrycolumn(varchar, varchar, varchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dropgeometrycolumn"(varchar, varchar, varchar); CREATE FUNCTION "public"."dropgeometrycolumn"(IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar) RETURNS "text" AS $BODY$ DECLARE ret text; BEGIN SELECT DropGeometryColumn('',$1,$2,$3) into ret; RETURN ret; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."dropgeometrycolumn"(IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."dropgeometrycolumn"(IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar) IS 'args: schema_name, table_name, column_name - Removes a geometry column from a spatial table.'; -- ---------------------------- -- Function structure for public.dropgeometrycolumn(varchar, varchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dropgeometrycolumn"(varchar, varchar); CREATE FUNCTION "public"."dropgeometrycolumn"(IN "table_name" varchar, IN "column_name" varchar) RETURNS "text" AS $BODY$ DECLARE ret text; BEGIN SELECT DropGeometryColumn('','',$1,$2) into ret; RETURN ret; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."dropgeometrycolumn"(IN "table_name" varchar, IN "column_name" varchar) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."dropgeometrycolumn"(IN "table_name" varchar, IN "column_name" varchar) IS 'args: table_name, column_name - Removes a geometry column from a spatial table.'; -- ---------------------------- -- Function structure for public.dropgeometrytable(varchar, varchar, varchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dropgeometrytable"(varchar, varchar, varchar); CREATE FUNCTION "public"."dropgeometrytable"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar) RETURNS "text" AS $BODY$ DECLARE real_schema name; BEGIN IF ( schema_name = '' ) THEN SELECT current_schema() into real_schema; ELSE real_schema = schema_name; END IF; -- TODO: Should we warn if table doesn't exist probably instead just saying dropped -- Remove table EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' RESTRICT'; RETURN real_schema || '.' || table_name ||' dropped.'; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."dropgeometrytable"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."dropgeometrytable"(IN "catalog_name" varchar, IN "schema_name" varchar, IN "table_name" varchar) IS 'args: catalog_name, schema_name, table_name - Drops a table and all its references in geometry_columns.'; -- ---------------------------- -- Function structure for public.dropgeometrytable(varchar, varchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dropgeometrytable"(varchar, varchar); CREATE FUNCTION "public"."dropgeometrytable"(IN "schema_name" varchar, IN "table_name" varchar) RETURNS "text" AS $BODY$ SELECT DropGeometryTable('',$1,$2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."dropgeometrytable"(IN "schema_name" varchar, IN "table_name" varchar) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."dropgeometrytable"(IN "schema_name" varchar, IN "table_name" varchar) IS 'args: schema_name, table_name - Drops a table and all its references in geometry_columns.'; -- ---------------------------- -- Function structure for public.dropgeometrytable(varchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dropgeometrytable"(varchar); CREATE FUNCTION "public"."dropgeometrytable"(IN "table_name" varchar) RETURNS "text" AS $BODY$ SELECT DropGeometryTable('','',$1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."dropgeometrytable"(IN "table_name" varchar) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."dropgeometrytable"(IN "table_name" varchar) IS 'args: table_name - Drops a table and all its references in geometry_columns.'; -- ---------------------------- -- Function structure for public.text("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."text"("public"."geometry"); CREATE FUNCTION "public"."text"(IN "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_to_text' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."text"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box3dtobox("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box3dtobox"("public"."box3d"); CREATE FUNCTION "public"."box3dtobox"(IN "public"."box3d") RETURNS "box" AS $BODY$SELECT box($1)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box3dtobox"(IN "public"."box3d") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry("public"."box2d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"("public"."box2d"); CREATE FUNCTION "public"."geometry"(IN "public"."box2d") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','BOX2D_to_LWGEOM' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN "public"."box2d") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry("public"."box3d") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"("public"."box3d"); CREATE FUNCTION "public"."geometry"(IN "public"."box3d") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','BOX3D_to_LWGEOM' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN "public"."box3d") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.updategeometrysrid(varchar, varchar, varchar, varchar, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."updategeometrysrid"(varchar, varchar, varchar, varchar, int4); CREATE FUNCTION "public"."updategeometrysrid"(IN catalogn_name varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid_in int4) RETURNS "text" AS $BODY$ DECLARE myrec RECORD; okay boolean; cname varchar; real_schema name; unknown_srid integer; new_srid integer := new_srid_in; BEGIN -- Find, check or fix schema_name IF ( schema_name != '' ) THEN okay = false; FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP okay := true; END LOOP; IF ( okay <> true ) THEN RAISE EXCEPTION 'Invalid schema name'; ELSE real_schema = schema_name; END IF; ELSE SELECT INTO real_schema current_schema()::text; END IF; -- Ensure that column_name is in geometry_columns okay = false; FOR myrec IN SELECT type, coord_dimension FROM geometry_columns WHERE f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP okay := true; END LOOP; IF (NOT okay) THEN RAISE EXCEPTION 'column not found in geometry_columns table'; RETURN false; END IF; -- Ensure that new_srid is valid IF ( new_srid > 0 ) THEN IF ( SELECT count(*) = 0 from spatial_ref_sys where srid = new_srid ) THEN RAISE EXCEPTION 'invalid SRID: % not found in spatial_ref_sys', new_srid; RETURN false; END IF; ELSE unknown_srid := ST_SRID('POINT EMPTY'::geometry); IF ( new_srid != unknown_srid ) THEN new_srid := unknown_srid; RAISE NOTICE 'SRID value % converted to the officially unknown SRID value %', new_srid_in, new_srid; END IF; END IF; IF postgis_constraint_srid(schema_name, table_name, column_name) IS NOT NULL THEN -- srid was enforced with constraints before, keep it that way. -- Make up constraint name cname = 'enforce_srid_' || column_name; -- Drop enforce_srid constraint EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' DROP constraint ' || quote_ident(cname); -- Update geometries SRID EXECUTE 'UPDATE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' SET ' || quote_ident(column_name) || ' = ST_SetSRID(' || quote_ident(column_name) || ', ' || new_srid::text || ')'; -- Reset enforce_srid constraint EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD constraint ' || quote_ident(cname) || ' CHECK (st_srid(' || quote_ident(column_name) || ') = ' || new_srid::text || ')'; ELSE -- We will use typmod to enforce if no srid constraints -- We are using postgis_type_name to lookup the new name -- (in case Paul changes his mind and flips geometry_columns to return old upper case name) EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ALTER COLUMN ' || quote_ident(column_name) || ' TYPE geometry(' || postgis_type_name(myrec.type, myrec.coord_dimension, true) || ', ' || new_srid::text || ') USING ST_SetSRID(' || quote_ident(column_name) || ',' || new_srid::text || ');' ; END IF; RETURN real_schema || '.' || table_name || '.' || column_name ||' SRID changed to ' || new_srid::text; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."updategeometrysrid"(IN catalogn_name varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid_in int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."updategeometrysrid"(IN catalogn_name varchar, IN "schema_name" varchar, IN "table_name" varchar, IN "column_name" varchar, IN new_srid_in int4) IS 'args: catalog_name, schema_name, table_name, column_name, srid - Updates the SRID of all features in a geometry column, geometry_columns metadata and srid. If it was enforced with constraints, the constraints will be updated with new srid constraint. If the old was enforced by type definition, the type definition will be changed.'; -- ---------------------------- -- Function structure for public.updategeometrysrid(varchar, varchar, varchar, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."updategeometrysrid"(varchar, varchar, varchar, int4); CREATE FUNCTION "public"."updategeometrysrid"(IN varchar, IN varchar, IN varchar, IN int4) RETURNS "text" AS $BODY$ DECLARE ret text; BEGIN SELECT UpdateGeometrySRID('',$1,$2,$3,$4) into ret; RETURN ret; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."updategeometrysrid"(IN varchar, IN varchar, IN varchar, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."updategeometrysrid"(IN varchar, IN varchar, IN varchar, IN int4) IS 'args: schema_name, table_name, column_name, srid - Updates the SRID of all features in a geometry column, geometry_columns metadata and srid. If it was enforced with constraints, the constraints will be updated with new srid constraint. If the old was enforced by type definition, the type definition will be changed.'; -- ---------------------------- -- Function structure for public.updategeometrysrid(varchar, varchar, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."updategeometrysrid"(varchar, varchar, int4); CREATE FUNCTION "public"."updategeometrysrid"(IN varchar, IN varchar, IN int4) RETURNS "text" AS $BODY$ DECLARE ret text; BEGIN SELECT UpdateGeometrySRID('','',$1,$2,$3) into ret; RETURN ret; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."updategeometrysrid"(IN varchar, IN varchar, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."updategeometrysrid"(IN varchar, IN varchar, IN int4) IS 'args: table_name, column_name, srid - Updates the SRID of all features in a geometry column, geometry_columns metadata and srid. If it was enforced with constraints, the constraints will be updated with new srid constraint. If the old was enforced by type definition, the type definition will be changed.'; -- ---------------------------- -- Function structure for public.find_srid(varchar, varchar, varchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."find_srid"(varchar, varchar, varchar); CREATE FUNCTION "public"."find_srid"(IN varchar, IN varchar, IN varchar) RETURNS "int4" AS $BODY$ DECLARE schem text; tabl text; sr int4; BEGIN IF $1 IS NULL THEN RAISE EXCEPTION 'find_srid() - schema is NULL!'; END IF; IF $2 IS NULL THEN RAISE EXCEPTION 'find_srid() - table name is NULL!'; END IF; IF $3 IS NULL THEN RAISE EXCEPTION 'find_srid() - column name is NULL!'; END IF; schem = $1; tabl = $2; -- if the table contains a . and the schema is empty -- split the table into a schema and a table -- otherwise drop through to default behavior IF ( schem = '' and tabl LIKE '%.%' ) THEN schem = substr(tabl,1,strpos(tabl,'.')-1); tabl = substr(tabl,length(schem)+2); ELSE schem = schem || '%'; END IF; select SRID into sr from geometry_columns where f_table_schema like schem and f_table_name = tabl and f_geometry_column = $3; IF NOT FOUND THEN RAISE EXCEPTION 'find_srid() - couldnt find the corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS table? Is there an uppercase/lowercase missmatch?'; END IF; return sr; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."find_srid"(IN varchar, IN varchar, IN varchar) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."find_srid"(IN varchar, IN varchar, IN varchar) IS 'args: a_schema_name, a_table_name, a_geomfield_name - The syntax is find_srid(a_db_schema, a_table, a_column) and the function returns the integer SRID of the specified column by searching through the GEOMETRY_COLUMNS table.'; -- ---------------------------- -- Function structure for public.get_proj4_from_srid(int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."get_proj4_from_srid"(int4); CREATE FUNCTION "public"."get_proj4_from_srid"(IN int4) RETURNS "text" AS $BODY$ BEGIN RETURN proj4text::text FROM spatial_ref_sys WHERE srid= $1; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."get_proj4_from_srid"(IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_transform_geometry("public"."geometry", text, text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_transform_geometry"("public"."geometry", text, text, int4); CREATE FUNCTION "public"."postgis_transform_geometry"(IN "public"."geometry", IN text, IN text, IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','transform_geom' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_transform_geometry"(IN "public"."geometry", IN text, IN text, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_transform("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_transform"("public"."geometry", int4); CREATE FUNCTION "public"."st_transform"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','transform' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_transform"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_transform"(IN "public"."geometry", IN int4) IS 'args: g1, srid - Returns a new geometry with its coordinates transformed to the SRID referenced by the integer parameter.'; -- ---------------------------- -- Function structure for public.postgis_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_version"(); CREATE FUNCTION "public"."postgis_version"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_version' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_version"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_version"() IS 'Returns PostGIS version number and compile-time options.'; -- ---------------------------- -- Function structure for public.postgis_proj_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_proj_version"(); CREATE FUNCTION "public"."postgis_proj_version"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_proj_version' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_proj_version"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_proj_version"() IS 'Returns the version number of the PROJ4 library.'; -- ---------------------------- -- Function structure for public.postgis_scripts_installed() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_scripts_installed"(); CREATE FUNCTION "public"."postgis_scripts_installed"() RETURNS "text" AS $BODY$ SELECT '2.1.0'::text || ' r' || 11822::text AS version $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_scripts_installed"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_scripts_installed"() IS 'Returns version of the postgis scripts installed in this database.'; -- ---------------------------- -- Function structure for public.postgis_lib_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_lib_version"(); CREATE FUNCTION "public"."postgis_lib_version"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_lib_version' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_lib_version"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_lib_version"() IS 'Returns the version number of the PostGIS library.'; -- ---------------------------- -- Function structure for public.postgis_scripts_released() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_scripts_released"(); CREATE FUNCTION "public"."postgis_scripts_released"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_scripts_released' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_scripts_released"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_scripts_released"() IS 'Returns the version number of the postgis.sql script released with the installed postgis lib.'; -- ---------------------------- -- Function structure for public.postgis_geos_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_geos_version"(); CREATE FUNCTION "public"."postgis_geos_version"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_geos_version' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_geos_version"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_geos_version"() IS 'Returns the version number of the GEOS library.'; -- ---------------------------- -- Function structure for public.postgis_svn_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_svn_version"(); CREATE FUNCTION "public"."postgis_svn_version"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_svn_version' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_svn_version"() OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_libxml_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_libxml_version"(); CREATE FUNCTION "public"."postgis_libxml_version"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_libxml_version' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_libxml_version"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_libxml_version"() IS 'Returns the version number of the libxml2 library.'; -- ---------------------------- -- Function structure for public.postgis_scripts_build_date() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_scripts_build_date"(); CREATE FUNCTION "public"."postgis_scripts_build_date"() RETURNS "text" AS $BODY$SELECT '2014-03-03 22:01:48'::text AS version$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_scripts_build_date"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_scripts_build_date"() IS 'Returns build date of the PostGIS scripts.'; -- ---------------------------- -- Function structure for public.postgis_lib_build_date() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_lib_build_date"(); CREATE FUNCTION "public"."postgis_lib_build_date"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_lib_build_date' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_lib_build_date"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_lib_build_date"() IS 'Returns build date of the PostGIS library.'; -- ---------------------------- -- Function structure for public.postgis_full_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_full_version"(); CREATE FUNCTION "public"."postgis_full_version"() RETURNS "text" AS $BODY$ DECLARE libver text; svnver text; projver text; geosver text; sfcgalver text; cgalver text; gdalver text; libxmlver text; dbproc text; relproc text; fullver text; rast_lib_ver text; rast_scr_ver text; topo_scr_ver text; json_lib_ver text; BEGIN SELECT postgis_lib_version() INTO libver; SELECT postgis_proj_version() INTO projver; SELECT postgis_geos_version() INTO geosver; SELECT postgis_libjson_version() INTO json_lib_ver; BEGIN SELECT postgis_gdal_version() INTO gdalver; EXCEPTION WHEN undefined_function THEN gdalver := NULL; RAISE NOTICE 'Function postgis_gdal_version() not found. Is raster support enabled and rtpostgis.sql installed?'; END; BEGIN SELECT postgis_sfcgal_version() INTO sfcgalver; EXCEPTION WHEN undefined_function THEN sfcgalver := NULL; END; SELECT postgis_libxml_version() INTO libxmlver; SELECT postgis_scripts_installed() INTO dbproc; SELECT postgis_scripts_released() INTO relproc; select postgis_svn_version() INTO svnver; BEGIN SELECT postgis_topology_scripts_installed() INTO topo_scr_ver; EXCEPTION WHEN undefined_function THEN topo_scr_ver := NULL; RAISE NOTICE 'Function postgis_topology_scripts_installed() not found. Is topology support enabled and topology.sql installed?'; END; BEGIN SELECT postgis_raster_scripts_installed() INTO rast_scr_ver; EXCEPTION WHEN undefined_function THEN rast_scr_ver := NULL; RAISE NOTICE 'Function postgis_raster_scripts_installed() not found. Is raster support enabled and rtpostgis.sql installed?'; END; BEGIN SELECT postgis_raster_lib_version() INTO rast_lib_ver; EXCEPTION WHEN undefined_function THEN rast_lib_ver := NULL; RAISE NOTICE 'Function postgis_raster_lib_version() not found. Is raster support enabled and rtpostgis.sql installed?'; END; fullver = 'POSTGIS="' || libver; IF svnver IS NOT NULL THEN fullver = fullver || ' r' || svnver; END IF; fullver = fullver || '"'; IF geosver IS NOT NULL THEN fullver = fullver || ' GEOS="' || geosver || '"'; END IF; IF sfcgalver IS NOT NULL THEN fullver = fullver || ' SFCGAL="' || sfcgalver || '"'; END IF; IF projver IS NOT NULL THEN fullver = fullver || ' PROJ="' || projver || '"'; END IF; IF gdalver IS NOT NULL THEN fullver = fullver || ' GDAL="' || gdalver || '"'; END IF; IF libxmlver IS NOT NULL THEN fullver = fullver || ' LIBXML="' || libxmlver || '"'; END IF; IF json_lib_ver IS NOT NULL THEN fullver = fullver || ' LIBJSON="' || json_lib_ver || '"'; END IF; -- fullver = fullver || ' DBPROC="' || dbproc || '"'; -- fullver = fullver || ' RELPROC="' || relproc || '"'; IF dbproc != relproc THEN fullver = fullver || ' (core procs from "' || dbproc || '" need upgrade)'; END IF; IF topo_scr_ver IS NOT NULL THEN fullver = fullver || ' TOPOLOGY'; IF topo_scr_ver != relproc THEN fullver = fullver || ' (topology procs from "' || topo_scr_ver || '" need upgrade)'; END IF; END IF; IF rast_lib_ver IS NOT NULL THEN fullver = fullver || ' RASTER'; IF rast_lib_ver != relproc THEN fullver = fullver || ' (raster lib from "' || rast_lib_ver || '" need upgrade)'; END IF; END IF; IF rast_scr_ver IS NOT NULL AND rast_scr_ver != relproc THEN fullver = fullver || ' (raster procs from "' || rast_scr_ver || '" need upgrade)'; END IF; RETURN fullver; END $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_full_version"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_full_version"() IS 'Reports full postgis version and build configuration infos.'; -- ---------------------------- -- Function structure for public.box2d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box2d"("public"."geometry"); CREATE FUNCTION "public"."box2d"(IN "public"."geometry") RETURNS "public"."box2d" AS '$libdir/postgis-2.1','LWGEOM_to_BOX2D' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box2d"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."box2d"(IN "public"."geometry") IS 'args: geomA - Returns a BOX2D representing the maximum extents of the geometry.'; -- ---------------------------- -- Function structure for public.box3d("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box3d"("public"."geometry"); CREATE FUNCTION "public"."box3d"(IN "public"."geometry") RETURNS "public"."box3d" AS '$libdir/postgis-2.1','LWGEOM_to_BOX3D' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box3d"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."box3d"(IN "public"."geometry") IS 'args: geomA - Returns a BOX3D representing the maximum extents of the geometry.'; -- ---------------------------- -- Function structure for public.box("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box"("public"."geometry"); CREATE FUNCTION "public"."box"(IN "public"."geometry") RETURNS "box" AS '$libdir/postgis-2.1','LWGEOM_to_BOX' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"(text); CREATE FUNCTION "public"."geometry"(IN text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','parse_WKT_lwgeom' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"(bytea); CREATE FUNCTION "public"."geometry"(IN bytea) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_from_bytea' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.bytea("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."bytea"("public"."geometry"); CREATE FUNCTION "public"."bytea"(IN "public"."geometry") RETURNS "bytea" AS '$libdir/postgis-2.1','LWGEOM_to_bytea' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."bytea"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_simplify("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_simplify"("public"."geometry", float8); CREATE FUNCTION "public"."st_simplify"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_simplify2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_simplify"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_simplify"(IN "public"."geometry", IN float8) IS 'args: geomA, tolerance - Returns a "simplified" version of the given geometry using the Douglas-Peucker algorithm.'; -- ---------------------------- -- Function structure for public.st_snaptogrid("public"."geometry", float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_snaptogrid"("public"."geometry", float8, float8, float8, float8); CREATE FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_snaptogrid' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8, IN float8, IN float8, IN float8) IS 'args: geomA, originX, originY, sizeX, sizeY - Snap all points of the input geometry to a regular grid.'; -- ---------------------------- -- Function structure for public.st_snaptogrid("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_snaptogrid"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_SnapToGrid($1, 0, 0, $2, $3)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8, IN float8) IS 'args: geomA, sizeX, sizeY - Snap all points of the input geometry to a regular grid.'; -- ---------------------------- -- Function structure for public.st_snaptogrid("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_snaptogrid"("public"."geometry", float8); CREATE FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS $BODY$SELECT ST_SnapToGrid($1, 0, 0, $2, $2)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_snaptogrid"(IN "public"."geometry", IN float8) IS 'args: geomA, size - Snap all points of the input geometry to a regular grid.'; -- ---------------------------- -- Function structure for public.st_snaptogrid("public"."geometry", "public"."geometry", float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_snaptogrid"("public"."geometry", "public"."geometry", float8, float8, float8, float8); CREATE FUNCTION "public"."st_snaptogrid"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8, IN float8, IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_snaptogrid_pointoff' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_snaptogrid"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8, IN float8, IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_snaptogrid"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8, IN float8, IN float8, IN float8) IS 'args: geomA, pointOrigin, sizeX, sizeY, sizeZ, sizeM - Snap all points of the input geometry to a regular grid.'; -- ---------------------------- -- Function structure for public.st_segmentize("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_segmentize"("public"."geometry", float8); CREATE FUNCTION "public"."st_segmentize"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_segmentize2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_segmentize"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_segmentize"(IN "public"."geometry", IN float8) IS 'args: geom, max_segment_length - Return a modified geometry/geography having no segment longer than the given distance. Distance computation is performed in 2d only. For geometry, length units are in units of spatial reference. For geography, units are in meters.'; -- ---------------------------- -- Function structure for public.st_lineinterpolatepoint("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_lineinterpolatepoint"("public"."geometry", float8); CREATE FUNCTION "public"."st_lineinterpolatepoint"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_line_interpolate_point' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_lineinterpolatepoint"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_lineinterpolatepoint"(IN "public"."geometry", IN float8) IS 'args: a_linestring, a_fraction - Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 representing fraction of total length of linestring the point has to be located.'; -- ---------------------------- -- Function structure for public.st_line_interpolate_point("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_line_interpolate_point"("public"."geometry", float8); CREATE FUNCTION "public"."st_line_interpolate_point"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS $BODY$ SELECT _postgis_deprecate('ST_Line_Interpolate_Point', 'ST_LineInterpolatePoint', '2.1.0'); SELECT ST_LineInterpolatePoint($1, $2); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_line_interpolate_point"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_linesubstring("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linesubstring"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_linesubstring"(IN "public"."geometry", IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_line_substring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linesubstring"(IN "public"."geometry", IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linesubstring"(IN "public"."geometry", IN float8, IN float8) IS 'args: a_linestring, startfraction, endfraction - Return a linestring being a substring of the input one starting and ending at the given fractions of total 2d length. Second and third arguments are float8 values between 0 and 1.'; -- ---------------------------- -- Function structure for public.st_line_substring("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_line_substring"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_line_substring"(IN "public"."geometry", IN float8, IN float8) RETURNS "public"."geometry" AS $BODY$ SELECT _postgis_deprecate('ST_Line_Substring', 'ST_LineSubstring', '2.1.0'); SELECT ST_LineSubstring($1, $2, $3); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_line_substring"(IN "public"."geometry", IN float8, IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_linelocatepoint("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linelocatepoint"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_linelocatepoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_line_locate_point' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linelocatepoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linelocatepoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: a_linestring, a_point - Returns a float between 0 and 1 representing the location of the closest point on LineString to the given Point, as a fraction of total 2d line length.'; -- ---------------------------- -- Function structure for public.st_line_locate_point("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_line_locate_point"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_line_locate_point"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS $BODY$ SELECT _postgis_deprecate('ST_Line_Locate_Point', 'ST_LineLocatePoint', '2.1.0'); SELECT ST_LineLocatePoint($1, $2); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_line_locate_point"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_locate_between_measures("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_locate_between_measures"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_locate_between_measures"(IN "public"."geometry", IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_locate_between_m' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_locate_between_measures"(IN "public"."geometry", IN float8, IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_locate_along_measure("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_locate_along_measure"("public"."geometry", float8); CREATE FUNCTION "public"."st_locate_along_measure"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS $BODY$ SELECT ST_locate_between_measures($1, $2, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_locate_along_measure"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_addmeasure("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addmeasure"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_addmeasure"(IN "public"."geometry", IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_AddMeasure' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addmeasure"(IN "public"."geometry", IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addmeasure"(IN "public"."geometry", IN float8, IN float8) IS 'args: geom_mline, measure_start, measure_end - Return a derived geometry with measure elements linearly interpolated between the start and end points. If the geometry has no measure dimension, one is added. If the geometry has a measure dimension, it is over-written with new values. Only LINESTRINGS and MULTILINESTRINGS are supported.'; -- ---------------------------- -- Function structure for public.st_intersection("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_intersection"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','intersection' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersection"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersection"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation does a transform to geometry to do the intersection and then transform back to WGS84.'; -- ---------------------------- -- Function structure for public.st_buffer("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_buffer"("public"."geometry", float8); CREATE FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','buffer' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8) IS 'args: g1, radius_of_buffer - (T) For geometry: Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.#'; -- ---------------------------- -- Function structure for public._st_buffer("public"."geometry", float8, cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_buffer"("public"."geometry", float8, cstring); CREATE FUNCTION "public"."_st_buffer"(IN "public"."geometry", IN float8, IN cstring) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','buffer' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_buffer"(IN "public"."geometry", IN float8, IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_buffer("public"."geometry", float8, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_buffer"("public"."geometry", float8, int4); CREATE FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT _ST_Buffer($1, $2, CAST('quad_segs='||CAST($3 AS text) as cstring)) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8, IN int4) IS 'args: g1, radius_of_buffer, num_seg_quarter_circle - (T) For geometry: Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.#'; -- ---------------------------- -- Function structure for public.st_buffer("public"."geometry", float8, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_buffer"("public"."geometry", float8, text); CREATE FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8, IN text) RETURNS "public"."geometry" AS $BODY$ SELECT _ST_Buffer($1, $2, CAST( regexp_replace($3, '^[0123456789]+$', 'quad_segs='||$3) AS cstring) ) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8, IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_buffer"(IN "public"."geometry", IN float8, IN text) IS 'args: g1, radius_of_buffer, buffer_style_parameters - (T) For geometry: Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.#'; -- ---------------------------- -- Function structure for public.st_offsetcurve("public"."geometry", float8, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_offsetcurve"("public"."geometry", float8, text); CREATE FUNCTION "public"."st_offsetcurve"(IN line "public"."geometry", IN distance float8, IN params text DEFAULT ''::text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_OffsetCurve' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_offsetcurve"(IN line "public"."geometry", IN distance float8, IN params text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_offsetcurve"(IN line "public"."geometry", IN distance float8, IN params text) IS 'args: line, signed_distance, style_parameters='' - Return an offset line at a given distance and side from an input line. Useful for computing parallel lines about a center line'; -- ---------------------------- -- Function structure for public.st_convexhull("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_convexhull"("public"."geometry"); CREATE FUNCTION "public"."st_convexhull"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','convexhull' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_convexhull"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_convexhull"(IN "public"."geometry") IS 'args: geomA - The convex hull of a geometry represents the minimum convex geometry that encloses all geometries within the set.'; -- ---------------------------- -- Function structure for public._st_linecrossingdirection("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_linecrossingdirection"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_linecrossingdirection"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','ST_LineCrossingDirection' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_linecrossingdirection"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_linecrossingdirection("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linecrossingdirection"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_linecrossingdirection"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "int4" AS $BODY$ SELECT CASE WHEN NOT $1 && $2 THEN 0 ELSE _ST_LineCrossingDirection($1,$2) END $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linecrossingdirection"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linecrossingdirection"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: linestringA, linestringB - Given 2 linestrings, returns a number between -3 and 3 denoting what kind of crossing behavior. 0 is no crossing.'; -- ---------------------------- -- Function structure for public.st_simplifypreservetopology("public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_simplifypreservetopology"("public"."geometry", float8); CREATE FUNCTION "public"."st_simplifypreservetopology"(IN "public"."geometry", IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','topologypreservesimplify' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_simplifypreservetopology"(IN "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_simplifypreservetopology"(IN "public"."geometry", IN float8) IS 'args: geomA, tolerance - Returns a "simplified" version of the given geometry using the Douglas-Peucker algorithm. Will avoid creating derived geometries (polygons in particular) that are invalid.'; -- ---------------------------- -- Function structure for public.st_isvalidreason("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isvalidreason"("public"."geometry"); CREATE FUNCTION "public"."st_isvalidreason"(IN "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','isvalidreason' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isvalidreason"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isvalidreason"(IN "public"."geometry") IS 'args: geomA - Returns text stating if a geometry is valid or not and if not valid, a reason why.'; -- ---------------------------- -- Function structure for public.st_isvaliddetail("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isvaliddetail"("public"."geometry"); CREATE FUNCTION "public"."st_isvaliddetail"(IN "public"."geometry") RETURNS "public"."valid_detail" AS '$libdir/postgis-2.1','isvaliddetail' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isvaliddetail"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isvaliddetail"(IN "public"."geometry") IS 'args: geom - Returns a valid_detail (valid,reason,location) row stating if a geometry is valid or not and if not valid, a reason why and a location where.'; -- ---------------------------- -- Function structure for public.st_isvaliddetail("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isvaliddetail"("public"."geometry", int4); CREATE FUNCTION "public"."st_isvaliddetail"(IN "public"."geometry", IN int4) RETURNS "public"."valid_detail" AS '$libdir/postgis-2.1','isvaliddetail' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isvaliddetail"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isvaliddetail"(IN "public"."geometry", IN int4) IS 'args: geom, flags - Returns a valid_detail (valid,reason,location) row stating if a geometry is valid or not and if not valid, a reason why and a location where.'; -- ---------------------------- -- Function structure for public.st_isvalidreason("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isvalidreason"("public"."geometry", int4); CREATE FUNCTION "public"."st_isvalidreason"(IN "public"."geometry", IN int4) RETURNS "text" AS $BODY$ SELECT CASE WHEN valid THEN 'Valid Geometry' ELSE reason END FROM ( SELECT (ST_isValidDetail($1, $2)).* ) foo $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isvalidreason"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isvalidreason"(IN "public"."geometry", IN int4) IS 'args: geomA, flags - Returns text stating if a geometry is valid or not and if not valid, a reason why.'; -- ---------------------------- -- Function structure for public.st_isvalid("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isvalid"("public"."geometry", int4); CREATE FUNCTION "public"."st_isvalid"(IN "public"."geometry", IN int4) RETURNS "bool" AS $BODY$SELECT (ST_isValidDetail($1, $2)).valid$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isvalid"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isvalid"(IN "public"."geometry", IN int4) IS 'args: g, flags - Returns true if the ST_Geometry is well formed.'; -- ---------------------------- -- Function structure for public.st_hausdorffdistance("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_hausdorffdistance"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_hausdorffdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','hausdorffdistance' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_hausdorffdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_hausdorffdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns the Hausdorff distance between two geometries. Basically a measure of how similar or dissimilar 2 geometries are. Units are in the units of the spatial reference system of the geometries.'; -- ---------------------------- -- Function structure for public.st_hausdorffdistance("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_hausdorffdistance"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."st_hausdorffdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "float8" AS '$libdir/postgis-2.1','hausdorffdistancedensify' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_hausdorffdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_hausdorffdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) IS 'args: g1, g2, densifyFrac - Returns the Hausdorff distance between two geometries. Basically a measure of how similar or dissimilar 2 geometries are. Units are in the units of the spatial reference system of the geometries.'; -- ---------------------------- -- Function structure for public.st_difference("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_difference"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_difference"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','difference' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_difference"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_difference"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns a geometry that represents that part of geometry A that does not intersect with geometry B.'; -- ---------------------------- -- Function structure for public.st_boundary("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_boundary"("public"."geometry"); CREATE FUNCTION "public"."st_boundary"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','boundary' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_boundary"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_boundary"(IN "public"."geometry") IS 'args: geomA - Returns the closure of the combinatorial boundary of this Geometry.'; -- ---------------------------- -- Function structure for public.st_symdifference("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_symdifference"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_symdifference"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','symdifference' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_symdifference"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_symdifference"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns a geometry that represents the portions of A and B that do not intersect. It is called a symmetric difference because ST_SymDifference(A,B) = ST_SymDifference(B,A).'; -- ---------------------------- -- Function structure for public.st_symmetricdifference("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_symmetricdifference"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_symmetricdifference"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','symdifference' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_symmetricdifference"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_union("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_union"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_union"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','geomunion' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_union"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_union"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns a geometry that represents the point set union of the Geometries.'; -- ---------------------------- -- Function structure for public.st_unaryunion("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_unaryunion"("public"."geometry"); CREATE FUNCTION "public"."st_unaryunion"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_UnaryUnion' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_unaryunion"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_unaryunion"(IN "public"."geometry") IS 'args: geom - Like ST_Union, but working at the geometry component level.'; -- ---------------------------- -- Function structure for public.st_removerepeatedpoints("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_removerepeatedpoints"("public"."geometry"); CREATE FUNCTION "public"."st_removerepeatedpoints"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_RemoveRepeatedPoints' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_removerepeatedpoints"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_removerepeatedpoints"(IN "public"."geometry") IS 'args: geom - Returns a version of the given geometry with duplicated points removed.'; -- ---------------------------- -- Function structure for public.st_makevalid("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makevalid"("public"."geometry"); CREATE FUNCTION "public"."st_makevalid"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_MakeValid' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makevalid"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makevalid"(IN "public"."geometry") IS 'args: input - Attempts to make an invalid geometry valid without losing vertices.'; -- ---------------------------- -- Function structure for public.st_cleangeometry("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_cleangeometry"("public"."geometry"); CREATE FUNCTION "public"."st_cleangeometry"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_CleanGeometry' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_cleangeometry"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_split("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_split"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_split"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_Split' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_split"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_split"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: input, blade - Returns a collection of geometries resulting by splitting a geometry.'; -- ---------------------------- -- Function structure for public.st_sharedpaths("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_sharedpaths"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_sharedpaths"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_SharedPaths' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_sharedpaths"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_sharedpaths"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: lineal1, lineal2 - Returns a collection containing paths shared by the two input linestrings/multilinestrings.'; -- ---------------------------- -- Function structure for public.st_snap("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_snap"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."st_snap"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_Snap' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_snap"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_snap"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) IS 'args: input, reference, tolerance - Snap segments and vertices of input geometry to vertices of a reference geometry.'; -- ---------------------------- -- Function structure for public.st_relatematch(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_relatematch"(text, text); CREATE FUNCTION "public"."st_relatematch"(IN text, IN text) RETURNS "bool" AS '$libdir/postgis-2.1','ST_RelateMatch' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_relatematch"(IN text, IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_relatematch"(IN text, IN text) IS 'args: intersectionMatrix, intersectionMatrixPattern - Returns true if intersectionMattrixPattern1 implies intersectionMatrixPattern2'; -- ---------------------------- -- Function structure for public.st_node("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_node"("public"."geometry"); CREATE FUNCTION "public"."st_node"(IN "g" "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_Node' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_node"(IN "g" "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_node"(IN "g" "public"."geometry") IS 'args: geom - Node a set of linestrings.'; -- ---------------------------- -- Function structure for public.st_delaunaytriangles("public"."geometry", float8, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_delaunaytriangles"("public"."geometry", float8, int4); CREATE FUNCTION "public"."st_delaunaytriangles"(IN g1 "public"."geometry", IN tolerance float8 DEFAULT 0.0, IN flags int4 DEFAULT 0) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_DelaunayTriangles' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_delaunaytriangles"(IN g1 "public"."geometry", IN tolerance float8, IN flags int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_delaunaytriangles"(IN g1 "public"."geometry", IN tolerance float8, IN flags int4) IS 'args: g1, tolerance, flags - Return a Delaunay triangulation around the given input points.'; -- ---------------------------- -- Function structure for public.st_combine_bbox("public"."box3d", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_combine_bbox"("public"."box3d", "public"."geometry"); CREATE FUNCTION "public"."st_combine_bbox"(IN "public"."box3d", IN "public"."geometry") RETURNS "public"."box3d" AS '$libdir/postgis-2.1','BOX3D_combine' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_combine_bbox"(IN "public"."box3d", IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_collect("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_collect"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_collect"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_collect' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_collect"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_collect"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Return a specified ST_Geometry value from a collection of other geometries.'; -- ---------------------------- -- Function structure for public.st_collect("public"."_geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_collect"("public"."_geometry"); CREATE FUNCTION "public"."st_collect"(IN "public"."_geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_collect_garray' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_collect"(IN "public"."_geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_collect"(IN "public"."_geometry") IS 'args: g1_array - Return a specified ST_Geometry value from a collection of other geometries.'; -- ---------------------------- -- Function structure for public.pgis_abs_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."pgis_abs_in"(cstring); CREATE FUNCTION "public"."pgis_abs_in"(IN cstring) RETURNS "public"."pgis_abs" AS '$libdir/postgis-2.1','pgis_abs_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."pgis_abs_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.pgis_abs_out("public"."pgis_abs") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."pgis_abs_out"("public"."pgis_abs"); CREATE FUNCTION "public"."pgis_abs_out"(IN "public"."pgis_abs") RETURNS "cstring" AS '$libdir/postgis-2.1','pgis_abs_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."pgis_abs_out"(IN "public"."pgis_abs") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.pgis_geometry_accum_transfn("public"."pgis_abs", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."pgis_geometry_accum_transfn"("public"."pgis_abs", "public"."geometry"); CREATE FUNCTION "public"."pgis_geometry_accum_transfn"(IN "public"."pgis_abs", IN "public"."geometry") RETURNS "public"."pgis_abs" AS '$libdir/postgis-2.1','pgis_geometry_accum_transfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."pgis_geometry_accum_transfn"(IN "public"."pgis_abs", IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.pgis_geometry_accum_finalfn("public"."pgis_abs") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."pgis_geometry_accum_finalfn"("public"."pgis_abs"); CREATE FUNCTION "public"."pgis_geometry_accum_finalfn"(IN "public"."pgis_abs") RETURNS "public"."_geometry" AS '$libdir/postgis-2.1','pgis_geometry_accum_finalfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."pgis_geometry_accum_finalfn"(IN "public"."pgis_abs") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.pgis_geometry_union_finalfn("public"."pgis_abs") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."pgis_geometry_union_finalfn"("public"."pgis_abs"); CREATE FUNCTION "public"."pgis_geometry_union_finalfn"(IN "public"."pgis_abs") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','pgis_geometry_union_finalfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."pgis_geometry_union_finalfn"(IN "public"."pgis_abs") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.pgis_geometry_collect_finalfn("public"."pgis_abs") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."pgis_geometry_collect_finalfn"("public"."pgis_abs"); CREATE FUNCTION "public"."pgis_geometry_collect_finalfn"(IN "public"."pgis_abs") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','pgis_geometry_collect_finalfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."pgis_geometry_collect_finalfn"(IN "public"."pgis_abs") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.pgis_geometry_polygonize_finalfn("public"."pgis_abs") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."pgis_geometry_polygonize_finalfn"("public"."pgis_abs"); CREATE FUNCTION "public"."pgis_geometry_polygonize_finalfn"(IN "public"."pgis_abs") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','pgis_geometry_polygonize_finalfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."pgis_geometry_polygonize_finalfn"(IN "public"."pgis_abs") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.pgis_geometry_makeline_finalfn("public"."pgis_abs") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."pgis_geometry_makeline_finalfn"("public"."pgis_abs"); CREATE FUNCTION "public"."pgis_geometry_makeline_finalfn"(IN "public"."pgis_abs") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','pgis_geometry_makeline_finalfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."pgis_geometry_makeline_finalfn"(IN "public"."pgis_abs") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_union("public"."_geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_union"("public"."_geometry"); CREATE FUNCTION "public"."st_union"(IN "public"."_geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','pgis_union_geometry_array' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_union"(IN "public"."_geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_union"(IN "public"."_geometry") IS 'args: g1_array - Returns a geometry that represents the point set union of the Geometries.'; -- ---------------------------- -- Function structure for public.st_relate("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_relate"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','relate_full' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns true if this Geometry is spatially related to anotherGeometry, by testing for intersections between the Interior, Boundary and Exterior of the two geometries as specified by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.'; -- ---------------------------- -- Function structure for public.st_relate("public"."geometry", "public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_relate"("public"."geometry", "public"."geometry", int4); CREATE FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN int4) RETURNS "text" AS '$libdir/postgis-2.1','relate_full' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN int4) IS 'args: geomA, geomB, BoundaryNodeRule - Returns true if this Geometry is spatially related to anotherGeometry, by testing for intersections between the Interior, Boundary and Exterior of the two geometries as specified by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.'; -- ---------------------------- -- Function structure for public.st_relate("public"."geometry", "public"."geometry", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_relate"("public"."geometry", "public"."geometry", text); CREATE FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN text) RETURNS "bool" AS '$libdir/postgis-2.1','relate_pattern' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_relate"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN text) IS 'args: geomA, geomB, intersectionMatrixPattern - Returns true if this Geometry is spatially related to anotherGeometry, by testing for intersections between the Interior, Boundary and Exterior of the two geometries as specified by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.'; -- ---------------------------- -- Function structure for public.st_disjoint("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_disjoint"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_disjoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','disjoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_disjoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_disjoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: A, B - Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together.'; -- ---------------------------- -- Function structure for public._st_touches("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_touches"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_touches"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','touches' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_touches"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_touches("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_touches"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_touches"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Touches($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_touches"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_touches"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect.'; -- ---------------------------- -- Function structure for public._st_dwithin("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_dwithin"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."_st_dwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_dwithin' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_dwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_dwithin("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dwithin"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."st_dwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "bool" AS $BODY$SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) IS 'args: g1, g2, distance_of_srid - Returns true if the geometries are within the specified distance of one another. For geometry units are in those of spatial reference and For geography units are in meters and measurement is defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.'; -- ---------------------------- -- Function structure for public._st_intersects("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_intersects"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_intersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','intersects' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_intersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersects("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersects"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_intersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Intersects($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns TRUE if the Geometries/Geography "spatially intersect in 2D" - (share any portion of space) and FALSE if they dont (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)'; -- ---------------------------- -- Function structure for public._st_crosses("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_crosses"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_crosses"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','crosses' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_crosses"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_crosses("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_crosses"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_crosses"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Crosses($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_crosses"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_crosses"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns TRUE if the supplied geometries have some, but not all, interior points in common.'; -- ---------------------------- -- Function structure for public._st_contains("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_contains"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_contains"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','contains' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_contains"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_contains("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_contains"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_contains"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Contains($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_contains"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_contains"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns true if and only if no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A.'; -- ---------------------------- -- Function structure for public._st_coveredby("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_coveredby"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_coveredby"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','coveredby' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_coveredby"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_coveredby("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_coveredby"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_coveredby"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_CoveredBy($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_coveredby"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_coveredby"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns 1 (TRUE) if no point in Geometry/Geography A is outside Geometry/Geography B'; -- ---------------------------- -- Function structure for public._st_covers("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_covers"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_covers"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','covers' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_covers"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_covers("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_covers"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_covers"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Covers($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_covers"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_covers"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns 1 (TRUE) if no point in Geometry B is outside Geometry A'; -- ---------------------------- -- Function structure for public._st_containsproperly("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_containsproperly"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_containsproperly"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','containsproperly' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_containsproperly"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_containsproperly("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_containsproperly"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_containsproperly"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_ContainsProperly($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_containsproperly"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_containsproperly"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns true if B intersects the interior of A but not the boundary (or exterior). A does not contain properly itself, but does contain itself.'; -- ---------------------------- -- Function structure for public._st_overlaps("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_overlaps"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_overlaps"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','overlaps' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_overlaps"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_within("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_within"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_within"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT _ST_Contains($2,$1)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_within"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_within("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_within"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_within"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Contains($2,$1)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_within"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_within"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: A, B - Returns true if the geometry A is completely inside geometry B'; -- ---------------------------- -- Function structure for public.st_overlaps("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_overlaps"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_overlaps"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Overlaps($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_overlaps"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_overlaps"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: A, B - Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other.'; -- ---------------------------- -- Function structure for public.st_isvalid("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isvalid"("public"."geometry"); CREATE FUNCTION "public"."st_isvalid"(IN "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','isvalid' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isvalid"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isvalid"(IN "public"."geometry") IS 'args: g - Returns true if the ST_Geometry is well formed.'; -- ---------------------------- -- Function structure for public.st_centroid("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_centroid"("public"."geometry"); CREATE FUNCTION "public"."st_centroid"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','centroid' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_centroid"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_centroid"(IN "public"."geometry") IS 'args: g1 - Returns the geometric center of a geometry.'; -- ---------------------------- -- Function structure for public.st_isring("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isring"("public"."geometry"); CREATE FUNCTION "public"."st_isring"(IN "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','isring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isring"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isring"(IN "public"."geometry") IS 'args: g - Returns TRUE if this LINESTRING is both closed and simple.'; -- ---------------------------- -- Function structure for public.st_pointonsurface("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pointonsurface"("public"."geometry"); CREATE FUNCTION "public"."st_pointonsurface"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','pointonsurface' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pointonsurface"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pointonsurface"(IN "public"."geometry") IS 'args: g1 - Returns a POINT guaranteed to lie on the surface.'; -- ---------------------------- -- Function structure for public.st_issimple("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_issimple"("public"."geometry"); CREATE FUNCTION "public"."st_issimple"(IN "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','issimple' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_issimple"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_issimple"(IN "public"."geometry") IS 'args: geomA - Returns (TRUE) if this Geometry has no anomalous geometric points, such as self intersection or self tangency.'; -- ---------------------------- -- Function structure for public.st_iscollection("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_iscollection"("public"."geometry"); CREATE FUNCTION "public"."st_iscollection"(IN "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','ST_IsCollection' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_iscollection"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_iscollection"(IN "public"."geometry") IS 'args: g - Returns TRUE if the argument is a collection (MULTI*, GEOMETRYCOLLECTION, ...)'; -- ---------------------------- -- Function structure for public._st_equals("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_equals"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_equals"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','ST_Equals' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_equals"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_equals("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_equals"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_equals"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 ~= $2 AND _ST_Equals($1,$2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_equals"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_equals"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: A, B - Returns true if the given geometries represent the same geometry. Directionality is ignored.'; -- ---------------------------- -- Function structure for public.equals("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."equals"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."equals"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','ST_Equals' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."equals"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_geomfromgml(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_geomfromgml"(text, int4); CREATE FUNCTION "public"."_st_geomfromgml"(IN text, IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','geom_from_gml' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_geomfromgml"(IN text, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_geomfromgml(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromgml"(text, int4); CREATE FUNCTION "public"."st_geomfromgml"(IN text, IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','geom_from_gml' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromgml"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromgml"(IN text, IN int4) IS 'args: geomgml, srid - Takes as input GML representation of geometry and outputs a PostGIS geometry object'; -- ---------------------------- -- Function structure for public.st_geomfromgml(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromgml"(text); CREATE FUNCTION "public"."st_geomfromgml"(IN text) RETURNS "public"."geometry" AS $BODY$SELECT _ST_GeomFromGML($1, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromgml"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromgml"(IN text) IS 'args: geomgml - Takes as input GML representation of geometry and outputs a PostGIS geometry object'; -- ---------------------------- -- Function structure for public.st_gmltosql(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_gmltosql"(text); CREATE FUNCTION "public"."st_gmltosql"(IN text) RETURNS "public"."geometry" AS $BODY$SELECT _ST_GeomFromGML($1, 0)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_gmltosql"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_gmltosql"(IN text) IS 'args: geomgml - Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML'; -- ---------------------------- -- Function structure for public.st_gmltosql(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_gmltosql"(text, int4); CREATE FUNCTION "public"."st_gmltosql"(IN text, IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','geom_from_gml' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_gmltosql"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_gmltosql"(IN text, IN int4) IS 'args: geomgml, srid - Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML'; -- ---------------------------- -- Function structure for public.st_geomfromkml(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromkml"(text); CREATE FUNCTION "public"."st_geomfromkml"(IN text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','geom_from_kml' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromkml"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromkml"(IN text) IS 'args: geomkml - Takes as input KML representation of geometry and outputs a PostGIS geometry object'; -- ---------------------------- -- Function structure for public.st_geomfromgeojson(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromgeojson"(text); CREATE FUNCTION "public"."st_geomfromgeojson"(IN text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','geom_from_geojson' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromgeojson"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromgeojson"(IN text) IS 'args: geomjson - Takes as input a geojson representation of a geometry and outputs a PostGIS geometry object'; -- ---------------------------- -- Function structure for public.postgis_libjson_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_libjson_version"(); CREATE FUNCTION "public"."postgis_libjson_version"() RETURNS "text" AS '$libdir/postgis-2.1','postgis_libjson_version' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_libjson_version"() OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_assvg("public"."geometry", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_assvg"("public"."geometry", int4, int4); CREATE FUNCTION "public"."st_assvg"(IN geom "public"."geometry", IN rel int4 DEFAULT 0, IN maxdecimaldigits int4 DEFAULT 15) RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asSVG' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_assvg"(IN geom "public"."geometry", IN rel int4, IN maxdecimaldigits int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_assvg"(IN geom "public"."geometry", IN rel int4, IN maxdecimaldigits int4) IS 'args: geom, rel=0, maxdecimaldigits=15 - Returns a Geometry in SVG path data given a geometry or geography object.'; -- ---------------------------- -- Function structure for public._st_asgml(int4, "public"."geometry", int4, int4, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_asgml"(int4, "public"."geometry", int4, int4, text, text); CREATE FUNCTION "public"."_st_asgml"(IN int4, IN "public"."geometry", IN int4, IN int4, IN text, IN text) RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asGML' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_asgml"(IN int4, IN "public"."geometry", IN int4, IN int4, IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asgml("public"."geometry", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgml"("public"."geometry", int4, int4); CREATE FUNCTION "public"."st_asgml"(IN geom "public"."geometry", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0) RETURNS "text" AS $BODY$ SELECT _ST_AsGML(2, $1, $2, $3, null, null); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgml"(IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asgml(int4, "public"."geometry", int4, int4, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgml"(int4, "public"."geometry", int4, int4, text, text); CREATE FUNCTION "public"."st_asgml"(IN "version" int4, IN geom "public"."geometry", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0, IN nprefix text DEFAULT NULL::text, IN "id" text DEFAULT NULL::text) RETURNS "text" AS $BODY$ SELECT _ST_AsGML($1, $2, $3, $4, $5, $6); $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgml"(IN "version" int4, IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4, IN nprefix text, IN "id" text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asgml"(IN "version" int4, IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4, IN nprefix text, IN "id" text) IS 'args: version, geom, maxdecimaldigits=15, options=0, nprefix=null, id=null - Return the geometry as a GML version 2 or 3 element.'; -- ---------------------------- -- Function structure for public._st_askml(int4, "public"."geometry", int4, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_askml"(int4, "public"."geometry", int4, text); CREATE FUNCTION "public"."_st_askml"(IN int4, IN "public"."geometry", IN int4, IN text) RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asKML' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_askml"(IN int4, IN "public"."geometry", IN int4, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_askml("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_askml"("public"."geometry", int4); CREATE FUNCTION "public"."st_askml"(IN geom "public"."geometry", IN maxdecimaldigits int4 DEFAULT 15) RETURNS "text" AS $BODY$ SELECT _ST_AsKML(2, ST_Transform($1,4326), $2, null); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_askml"(IN geom "public"."geometry", IN maxdecimaldigits int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_askml"(IN geom "public"."geometry", IN maxdecimaldigits int4) IS 'args: geom, maxdecimaldigits=15 - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; -- ---------------------------- -- Function structure for public.st_askml(int4, "public"."geometry", int4, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_askml"(int4, "public"."geometry", int4, text); CREATE FUNCTION "public"."st_askml"(IN "version" int4, IN geom "public"."geometry", IN maxdecimaldigits int4 DEFAULT 15, IN nprefix text DEFAULT NULL::text) RETURNS "text" AS $BODY$ SELECT _ST_AsKML($1, ST_Transform($2,4326), $3, $4); $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_askml"(IN "version" int4, IN geom "public"."geometry", IN maxdecimaldigits int4, IN nprefix text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_askml"(IN "version" int4, IN geom "public"."geometry", IN maxdecimaldigits int4, IN nprefix text) IS 'args: version, geom, maxdecimaldigits=15, nprefix=NULL - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; -- ---------------------------- -- Function structure for public._st_asgeojson(int4, "public"."geometry", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_asgeojson"(int4, "public"."geometry", int4, int4); CREATE FUNCTION "public"."_st_asgeojson"(IN int4, IN "public"."geometry", IN int4, IN int4) RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asGeoJson' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_asgeojson"(IN int4, IN "public"."geometry", IN int4, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asgeojson("public"."geometry", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgeojson"("public"."geometry", int4, int4); CREATE FUNCTION "public"."st_asgeojson"(IN geom "public"."geometry", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0) RETURNS "text" AS $BODY$ SELECT _ST_AsGeoJson(1, $1, $2, $3); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgeojson"(IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asgeojson"(IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4) IS 'args: geom, maxdecimaldigits=15, options=0 - Return the geometry as a GeoJSON element.'; -- ---------------------------- -- Function structure for public.st_asgeojson(int4, "public"."geometry", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgeojson"(int4, "public"."geometry", int4, int4); CREATE FUNCTION "public"."st_asgeojson"(IN gj_version int4, IN geom "public"."geometry", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0) RETURNS "text" AS $BODY$ SELECT _ST_AsGeoJson($1, $2, $3, $4); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgeojson"(IN gj_version int4, IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asgeojson"(IN gj_version int4, IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4) IS 'args: gj_version, geom, maxdecimaldigits=15, options=0 - Return the geometry as a GeoJSON element.'; -- ---------------------------- -- Function structure for public.geography_recv(internal, oid, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_recv"(internal, oid, int4); CREATE FUNCTION "public"."geography_recv"(IN internal, IN oid, IN int4) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_recv' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_recv"(IN internal, IN oid, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_geohash("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geohash"("public"."geometry", int4); CREATE FUNCTION "public"."st_geohash"(IN geom "public"."geometry", IN maxchars int4 DEFAULT 0) RETURNS "text" AS '$libdir/postgis-2.1','ST_GeoHash' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geohash"(IN geom "public"."geometry", IN maxchars int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geohash"(IN geom "public"."geometry", IN maxchars int4) IS 'args: geom, maxchars=full_precision_of_point - Return a GeoHash representation of the geometry.'; -- ---------------------------- -- Function structure for public.st_box2dfromgeohash(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_box2dfromgeohash"(text, int4); CREATE FUNCTION "public"."st_box2dfromgeohash"(IN text, IN int4 DEFAULT NULL::integer) RETURNS "public"."box2d" AS '$libdir/postgis-2.1','box2d_from_geohash' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_box2dfromgeohash"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_box2dfromgeohash"(IN text, IN int4) IS 'args: geohash, precision=full_precision_of_geohash - Return a BOX2D from a GeoHash string.'; -- ---------------------------- -- Function structure for public.st_pointfromgeohash(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pointfromgeohash"(text, int4); CREATE FUNCTION "public"."st_pointfromgeohash"(IN text, IN int4 DEFAULT NULL::integer) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','point_from_geohash' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pointfromgeohash"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pointfromgeohash"(IN text, IN int4) IS 'args: geohash, precision=full_precision_of_geohash - Return a point from a GeoHash string.'; -- ---------------------------- -- Function structure for public.st_geomfromgeohash(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromgeohash"(text, int4); CREATE FUNCTION "public"."st_geomfromgeohash"(IN text, IN int4 DEFAULT NULL::integer) RETURNS "public"."geometry" AS $BODY$ SELECT CAST(ST_Box2dFromGeoHash($1, $2) AS geometry); $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromgeohash"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromgeohash"(IN text, IN int4) IS 'args: geohash, precision=full_precision_of_geohash - Return a geometry from a GeoHash string.'; -- ---------------------------- -- Function structure for public.st_numpoints("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_numpoints"("public"."geometry"); CREATE FUNCTION "public"."st_numpoints"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_numpoints_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_numpoints"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_numpoints"(IN "public"."geometry") IS 'args: g1 - Return the number of points in an ST_LineString or ST_CircularString value.'; -- ---------------------------- -- Function structure for public.st_numgeometries("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_numgeometries"("public"."geometry"); CREATE FUNCTION "public"."st_numgeometries"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_numgeometries_collection' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_numgeometries"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_numgeometries"(IN "public"."geometry") IS 'args: geom - If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the number of geometries, for single geometries will return 1, otherwise return NULL.'; -- ---------------------------- -- Function structure for public.st_geometryn("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geometryn"("public"."geometry", int4); CREATE FUNCTION "public"."st_geometryn"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_geometryn_collection' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geometryn"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geometryn"(IN "public"."geometry", IN int4) IS 'args: geomA, n - Return the 1-based Nth geometry if the geometry is a GEOMETRYCOLLECTION, (MULTI)POINT, (MULTI)LINESTRING, MULTICURVE or (MULTI)POLYGON, POLYHEDRALSURFACE Otherwise, return NULL.'; -- ---------------------------- -- Function structure for public.st_dimension("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dimension"("public"."geometry"); CREATE FUNCTION "public"."st_dimension"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_dimension' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dimension"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dimension"(IN "public"."geometry") IS 'args: g - The inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension.'; -- ---------------------------- -- Function structure for public.st_exteriorring("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_exteriorring"("public"."geometry"); CREATE FUNCTION "public"."st_exteriorring"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_exteriorring_polygon' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_exteriorring"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_exteriorring"(IN "public"."geometry") IS 'args: a_polygon - Returns a line string representing the exterior ring of the POLYGON geometry. Return NULL if the geometry is not a polygon. Will not work with MULTIPOLYGON'; -- ---------------------------- -- Function structure for public.st_numinteriorrings("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_numinteriorrings"("public"."geometry"); CREATE FUNCTION "public"."st_numinteriorrings"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_numinteriorrings_polygon' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_numinteriorrings"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_numinteriorrings"(IN "public"."geometry") IS 'args: a_polygon - Return the number of interior rings of the first polygon in the geometry. This will work with both POLYGON and MULTIPOLYGON types but only looks at the first polygon. Return NULL if there is no polygon in the geometry.'; -- ---------------------------- -- Function structure for public.st_numinteriorring("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_numinteriorring"("public"."geometry"); CREATE FUNCTION "public"."st_numinteriorring"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_numinteriorrings_polygon' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_numinteriorring"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_numinteriorring"(IN "public"."geometry") IS 'args: a_polygon - Return the number of interior rings of the first polygon in the geometry. Synonym to ST_NumInteriorRings.'; -- ---------------------------- -- Function structure for public.st_interiorringn("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_interiorringn"("public"."geometry", int4); CREATE FUNCTION "public"."st_interiorringn"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_interiorringn_polygon' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_interiorringn"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_interiorringn"(IN "public"."geometry", IN int4) IS 'args: a_polygon, n - Return the Nth interior linestring ring of the polygon geometry. Return NULL if the geometry is not a polygon or the given N is out of range.'; -- ---------------------------- -- Function structure for public.geometrytype("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometrytype"("public"."geometry"); CREATE FUNCTION "public"."geometrytype"(IN "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_getTYPE' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometrytype"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."geometrytype"(IN "public"."geometry") IS 'args: geomA - Returns the type of the geometry as a string. Eg: LINESTRING, POLYGON, MULTIPOINT, etc.'; -- ---------------------------- -- Function structure for public.st_geometrytype("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geometrytype"("public"."geometry"); CREATE FUNCTION "public"."st_geometrytype"(IN "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','geometry_geometrytype' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geometrytype"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geometrytype"(IN "public"."geometry") IS 'args: g1 - Return the geometry type of the ST_Geometry value.'; -- ---------------------------- -- Function structure for public.st_pointn("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pointn"("public"."geometry", int4); CREATE FUNCTION "public"."st_pointn"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_pointn_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pointn"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pointn"(IN "public"."geometry", IN int4) IS 'args: a_linestring, n - Return the Nth point in the first linestring or circular linestring in the geometry. Return NULL if there is no linestring in the geometry.'; -- ---------------------------- -- Function structure for public.st_numpatches("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_numpatches"("public"."geometry"); CREATE FUNCTION "public"."st_numpatches"(IN "public"."geometry") RETURNS "int4" AS $BODY$ SELECT CASE WHEN ST_GeometryType($1) = 'ST_PolyhedralSurface' THEN ST_NumGeometries($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_numpatches"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_numpatches"(IN "public"."geometry") IS 'args: g1 - Return the number of faces on a Polyhedral Surface. Will return null for non-polyhedral geometries.'; -- ---------------------------- -- Function structure for public.st_patchn("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_patchn"("public"."geometry", int4); CREATE FUNCTION "public"."st_patchn"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN ST_GeometryType($1) = 'ST_PolyhedralSurface' THEN ST_GeometryN($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_patchn"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_patchn"(IN "public"."geometry", IN int4) IS 'args: geomA, n - Return the 1-based Nth geometry (face) if the geometry is a POLYHEDRALSURFACE, POLYHEDRALSURFACEM. Otherwise, return NULL.'; -- ---------------------------- -- Function structure for public.st_startpoint("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_startpoint"("public"."geometry"); CREATE FUNCTION "public"."st_startpoint"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_startpoint_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_startpoint"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_startpoint"(IN "public"."geometry") IS 'args: geomA - Returns the first point of a LINESTRING geometry as a POINT.'; -- ---------------------------- -- Function structure for public.st_endpoint("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_endpoint"("public"."geometry"); CREATE FUNCTION "public"."st_endpoint"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_endpoint_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_endpoint"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_endpoint"(IN "public"."geometry") IS 'args: g - Returns the last point of a LINESTRING geometry as a POINT.'; -- ---------------------------- -- Function structure for public.st_isclosed("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isclosed"("public"."geometry"); CREATE FUNCTION "public"."st_isclosed"(IN "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_isclosed' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isclosed"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isclosed"(IN "public"."geometry") IS 'args: g - Returns TRUE if the LINESTRINGs start and end points are coincident. For Polyhedral surface is closed (volumetric).'; -- ---------------------------- -- Function structure for public.st_isempty("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isempty"("public"."geometry"); CREATE FUNCTION "public"."st_isempty"(IN "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_isempty' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isempty"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isempty"(IN "public"."geometry") IS 'args: geomA - Returns true if this Geometry is an empty geometrycollection, polygon, point etc.'; -- ---------------------------- -- Function structure for public.st_srid("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_srid"("public"."geometry"); CREATE FUNCTION "public"."st_srid"(IN "public"."geometry") RETURNS "int4" AS '$libdir/postgis-2.1','LWGEOM_get_srid' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_srid"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_srid"(IN "public"."geometry") IS 'args: g1 - Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table.'; -- ---------------------------- -- Function structure for public.st_setsrid("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setsrid"("public"."geometry", int4); CREATE FUNCTION "public"."st_setsrid"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_set_srid' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setsrid"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setsrid"(IN "public"."geometry", IN int4) IS 'args: geom, srid - Sets the SRID on a geometry to a particular integer value.'; -- ---------------------------- -- Function structure for public.st_asbinary("public"."geometry", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asbinary"("public"."geometry", text); CREATE FUNCTION "public"."st_asbinary"(IN "public"."geometry", IN text) RETURNS "bytea" AS '$libdir/postgis-2.1','LWGEOM_asBinary' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asbinary"(IN "public"."geometry", IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asbinary"(IN "public"."geometry", IN text) IS 'args: g1, NDR_or_XDR - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; -- ---------------------------- -- Function structure for public.st_asbinary("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asbinary"("public"."geometry"); CREATE FUNCTION "public"."st_asbinary"(IN "public"."geometry") RETURNS "bytea" AS '$libdir/postgis-2.1','LWGEOM_asBinary' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asbinary"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asbinary"(IN "public"."geometry") IS 'args: g1 - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; -- ---------------------------- -- Function structure for public.st_astext("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_astext"("public"."geometry"); CREATE FUNCTION "public"."st_astext"(IN "public"."geometry") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asText' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_astext"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_astext"(IN "public"."geometry") IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.'; -- ---------------------------- -- Function structure for public.st_geometryfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geometryfromtext"(text); CREATE FUNCTION "public"."st_geometryfromtext"(IN text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_from_text' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geometryfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geometryfromtext"(IN text) IS 'args: WKT - Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText'; -- ---------------------------- -- Function structure for public.st_geometryfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geometryfromtext"(text, int4); CREATE FUNCTION "public"."st_geometryfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_from_text' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geometryfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geometryfromtext"(IN text, IN int4) IS 'args: WKT, srid - Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText'; -- ---------------------------- -- Function structure for public.st_geomfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromtext"(text); CREATE FUNCTION "public"."st_geomfromtext"(IN text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_from_text' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromtext"(IN text) IS 'args: WKT - Return a specified ST_Geometry value from Well-Known Text representation (WKT).'; -- ---------------------------- -- Function structure for public.st_geomfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromtext"(text, int4); CREATE FUNCTION "public"."st_geomfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_from_text' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromtext"(IN text, IN int4) IS 'args: WKT, srid - Return a specified ST_Geometry value from Well-Known Text representation (WKT).'; -- ---------------------------- -- Function structure for public.st_wkttosql(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_wkttosql"(text); CREATE FUNCTION "public"."st_wkttosql"(IN text) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_from_text' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_wkttosql"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_wkttosql"(IN text) IS 'args: WKT - Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText'; -- ---------------------------- -- Function structure for public.st_pointfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pointfromtext"(text); CREATE FUNCTION "public"."st_pointfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'POINT' THEN ST_GeomFromText($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pointfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pointfromtext"(IN text) IS 'args: WKT - Makes a point Geometry from WKT with the given SRID. If SRID is not given, it defaults to unknown.'; -- ---------------------------- -- Function structure for public.st_pointfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pointfromtext"(text, int4); CREATE FUNCTION "public"."st_pointfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'POINT' THEN ST_GeomFromText($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pointfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pointfromtext"(IN text, IN int4) IS 'args: WKT, srid - Makes a point Geometry from WKT with the given SRID. If SRID is not given, it defaults to unknown.'; -- ---------------------------- -- Function structure for public.st_linefromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linefromtext"(text); CREATE FUNCTION "public"."st_linefromtext"(IN text) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'LINESTRING' THEN ST_GeomFromText($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linefromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linefromtext"(IN text) IS 'args: WKT - Makes a Geometry from WKT representation with the given SRID. If SRID is not given, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_linefromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linefromtext"(text, int4); CREATE FUNCTION "public"."st_linefromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'LINESTRING' THEN ST_GeomFromText($1,$2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linefromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linefromtext"(IN text, IN int4) IS 'args: WKT, srid - Makes a Geometry from WKT representation with the given SRID. If SRID is not given, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_polyfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polyfromtext"(text); CREATE FUNCTION "public"."st_polyfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'POLYGON' THEN ST_GeomFromText($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polyfromtext"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_polyfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polyfromtext"(text, int4); CREATE FUNCTION "public"."st_polyfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'POLYGON' THEN ST_GeomFromText($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polyfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_polygonfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polygonfromtext"(text, int4); CREATE FUNCTION "public"."st_polygonfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$SELECT ST_PolyFromText($1, $2)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polygonfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_polygonfromtext"(IN text, IN int4) IS 'args: WKT, srid - Makes a Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_polygonfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polygonfromtext"(text); CREATE FUNCTION "public"."st_polygonfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$SELECT ST_PolyFromText($1)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polygonfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_polygonfromtext"(IN text) IS 'args: WKT - Makes a Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_mlinefromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mlinefromtext"(text, int4); CREATE FUNCTION "public"."st_mlinefromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'MULTILINESTRING' THEN ST_GeomFromText($1,$2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mlinefromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_mlinefromtext"(IN text, IN int4) IS 'args: WKT, srid - Return a specified ST_MultiLineString value from WKT representation.'; -- ---------------------------- -- Function structure for public.st_mlinefromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mlinefromtext"(text); CREATE FUNCTION "public"."st_mlinefromtext"(IN text) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'MULTILINESTRING' THEN ST_GeomFromText($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mlinefromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_mlinefromtext"(IN text) IS 'args: WKT - Return a specified ST_MultiLineString value from WKT representation.'; -- ---------------------------- -- Function structure for public.st_multilinestringfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multilinestringfromtext"(text); CREATE FUNCTION "public"."st_multilinestringfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$SELECT ST_MLineFromText($1)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multilinestringfromtext"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_multilinestringfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multilinestringfromtext"(text, int4); CREATE FUNCTION "public"."st_multilinestringfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$SELECT ST_MLineFromText($1, $2)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multilinestringfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mpointfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mpointfromtext"(text, int4); CREATE FUNCTION "public"."st_mpointfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'MULTIPOINT' THEN ST_GeomFromText($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mpointfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_mpointfromtext"(IN text, IN int4) IS 'args: WKT, srid - Makes a Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_mpointfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mpointfromtext"(text); CREATE FUNCTION "public"."st_mpointfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'MULTIPOINT' THEN ST_GeomFromText($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mpointfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_mpointfromtext"(IN text) IS 'args: WKT - Makes a Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_multipointfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multipointfromtext"(text); CREATE FUNCTION "public"."st_multipointfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$SELECT ST_MPointFromText($1)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multipointfromtext"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mpolyfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mpolyfromtext"(text, int4); CREATE FUNCTION "public"."st_mpolyfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'MULTIPOLYGON' THEN ST_GeomFromText($1,$2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mpolyfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_mpolyfromtext"(IN text, IN int4) IS 'args: WKT, srid - Makes a MultiPolygon Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_mpolyfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mpolyfromtext"(text); CREATE FUNCTION "public"."st_mpolyfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'MULTIPOLYGON' THEN ST_GeomFromText($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mpolyfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_mpolyfromtext"(IN text) IS 'args: WKT - Makes a MultiPolygon Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_multipolygonfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multipolygonfromtext"(text, int4); CREATE FUNCTION "public"."st_multipolygonfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$SELECT ST_MPolyFromText($1, $2)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multipolygonfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_multipolygonfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multipolygonfromtext"(text); CREATE FUNCTION "public"."st_multipolygonfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$SELECT ST_MPolyFromText($1)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multipolygonfromtext"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_geomcollfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomcollfromtext"(text, int4); CREATE FUNCTION "public"."st_geomcollfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'GEOMETRYCOLLECTION' THEN ST_GeomFromText($1,$2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomcollfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomcollfromtext"(IN text, IN int4) IS 'args: WKT, srid - Makes a collection Geometry from collection WKT with the given SRID. If SRID is not give, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_geomcollfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomcollfromtext"(text); CREATE FUNCTION "public"."st_geomcollfromtext"(IN text) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'GEOMETRYCOLLECTION' THEN ST_GeomFromText($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomcollfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomcollfromtext"(IN text) IS 'args: WKT - Makes a collection Geometry from collection WKT with the given SRID. If SRID is not give, it defaults to -1.'; -- ---------------------------- -- Function structure for public.st_geomfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromwkb"(bytea); CREATE FUNCTION "public"."st_geomfromwkb"(IN bytea) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_from_WKB' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromwkb"(IN bytea) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromwkb"(IN bytea) IS 'args: geom - Makes a geometry from WKB with the given SRID'; -- ---------------------------- -- Function structure for public.st_geomfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_geomfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$SELECT ST_SetSRID(ST_GeomFromWKB($1), $2)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geomfromwkb"(IN bytea, IN int4) IS 'args: geom, srid - Makes a geometry from WKB with the given SRID'; -- ---------------------------- -- Function structure for public.st_pointfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pointfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_pointfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'POINT' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pointfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_pointfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pointfromwkb"(bytea); CREATE FUNCTION "public"."st_pointfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'POINT' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pointfromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_linefromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linefromwkb"(bytea, int4); CREATE FUNCTION "public"."st_linefromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'LINESTRING' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linefromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linefromwkb"(IN bytea, IN int4) IS 'args: WKB, srid - Makes a LINESTRING from WKB with the given SRID'; -- ---------------------------- -- Function structure for public.st_linefromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linefromwkb"(bytea); CREATE FUNCTION "public"."st_linefromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'LINESTRING' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linefromwkb"(IN bytea) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linefromwkb"(IN bytea) IS 'args: WKB - Makes a LINESTRING from WKB with the given SRID'; -- ---------------------------- -- Function structure for public.st_linestringfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linestringfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_linestringfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'LINESTRING' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linestringfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linestringfromwkb"(IN bytea, IN int4) IS 'args: WKB, srid - Makes a geometry from WKB with the given SRID.'; -- ---------------------------- -- Function structure for public.st_linestringfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linestringfromwkb"(bytea); CREATE FUNCTION "public"."st_linestringfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'LINESTRING' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linestringfromwkb"(IN bytea) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linestringfromwkb"(IN bytea) IS 'args: WKB - Makes a geometry from WKB with the given SRID.'; -- ---------------------------- -- Function structure for public.st_polyfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polyfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_polyfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'POLYGON' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polyfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_polyfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polyfromwkb"(bytea); CREATE FUNCTION "public"."st_polyfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'POLYGON' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polyfromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_send("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_send"("public"."geography"); CREATE FUNCTION "public"."geography_send"(IN "public"."geography") RETURNS "bytea" AS '$libdir/postgis-2.1','geography_send' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_send"(IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_polygonfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polygonfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_polygonfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1,$2)) = 'POLYGON' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polygonfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_polygonfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polygonfromwkb"(bytea); CREATE FUNCTION "public"."st_polygonfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'POLYGON' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polygonfromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mpointfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mpointfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_mpointfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'MULTIPOINT' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mpointfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mpointfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mpointfromwkb"(bytea); CREATE FUNCTION "public"."st_mpointfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTIPOINT' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mpointfromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_multipointfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multipointfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_multipointfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1,$2)) = 'MULTIPOINT' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multipointfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_multipointfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multipointfromwkb"(bytea); CREATE FUNCTION "public"."st_multipointfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTIPOINT' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multipointfromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_multilinefromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multilinefromwkb"(bytea); CREATE FUNCTION "public"."st_multilinefromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTILINESTRING' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multilinefromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mlinefromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mlinefromwkb"(bytea, int4); CREATE FUNCTION "public"."st_mlinefromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'MULTILINESTRING' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mlinefromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mlinefromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mlinefromwkb"(bytea); CREATE FUNCTION "public"."st_mlinefromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTILINESTRING' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mlinefromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mpolyfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mpolyfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_mpolyfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'MULTIPOLYGON' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mpolyfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mpolyfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mpolyfromwkb"(bytea); CREATE FUNCTION "public"."st_mpolyfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTIPOLYGON' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mpolyfromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_multipolyfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multipolyfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_multipolyfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'MULTIPOLYGON' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multipolyfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_multipolyfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_multipolyfromwkb"(bytea); CREATE FUNCTION "public"."st_multipolyfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTIPOLYGON' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_multipolyfromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_geomcollfromwkb(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomcollfromwkb"(bytea, int4); CREATE FUNCTION "public"."st_geomcollfromwkb"(IN bytea, IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'GEOMETRYCOLLECTION' THEN ST_GeomFromWKB($1, $2) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomcollfromwkb"(IN bytea, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_geomcollfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geomcollfromwkb"(bytea); CREATE FUNCTION "public"."st_geomcollfromwkb"(IN bytea) RETURNS "public"."geometry" AS $BODY$ SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'GEOMETRYCOLLECTION' THEN ST_GeomFromWKB($1) ELSE NULL END $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geomcollfromwkb"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_maxdistance("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_maxdistance"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_maxdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_maxdistance2d_linestring' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_maxdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_maxdistance("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_maxdistance"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_maxdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS $BODY$SELECT _ST_MaxDistance(ST_ConvexHull($1), ST_ConvexHull($2))$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_maxdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_maxdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns the 2-dimensional largest distance between two geometries in projected units.'; -- ---------------------------- -- Function structure for public.st_closestpoint("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_closestpoint"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_closestpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_closestpoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_closestpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_closestpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns the 2-dimensional point on g1 that is closest to g2. This is the first point of the shortest line.'; -- ---------------------------- -- Function structure for public.st_shortestline("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_shortestline"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_shortestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_shortestline2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_shortestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_shortestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns the 2-dimensional shortest line between two geometries'; -- ---------------------------- -- Function structure for public._st_longestline("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_longestline"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_longestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_longestline2d' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_longestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_longestline("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_longestline"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_longestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS $BODY$SELECT _ST_LongestLine(ST_ConvexHull($1), ST_ConvexHull($2))$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_longestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_longestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns the 2-dimensional longest line points of two geometries. The function will only return the first longest line if more than one, that the function finds. The line returned will always start in g1 and end in g2. The length of the line this function returns will always be the same as st_maxdistance returns for g1 and g2.'; -- ---------------------------- -- Function structure for public._st_dfullywithin("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_dfullywithin"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."_st_dfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_dfullywithin' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_dfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_dfullywithin("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dfullywithin"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."st_dfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "bool" AS $BODY$SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DFullyWithin(ST_ConvexHull($1), ST_ConvexHull($2), $3)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) IS 'args: g1, g2, distance - Returns true if all of the geometries are within the specified distance of one another'; -- ---------------------------- -- Function structure for public.st_flipcoordinates("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_flipcoordinates"("public"."geometry"); CREATE FUNCTION "public"."st_flipcoordinates"(IN "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_FlipCoordinates' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_flipcoordinates"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_flipcoordinates"(IN "public"."geometry") IS 'args: geom - Returns a version of the given geometry with X and Y axis flipped. Useful for people who have built latitude/longitude features and need to fix them.'; -- ---------------------------- -- Function structure for public.st_bdpolyfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bdpolyfromtext"(text, int4); CREATE FUNCTION "public"."st_bdpolyfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ DECLARE geomtext alias for $1; srid alias for $2; mline geometry; geom geometry; BEGIN mline := ST_MultiLineStringFromText(geomtext, srid); IF mline IS NULL THEN RAISE EXCEPTION 'Input is not a MultiLinestring'; END IF; geom := ST_BuildArea(mline); IF GeometryType(geom) != 'POLYGON' THEN RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead'; END IF; RETURN geom; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bdpolyfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_bdpolyfromtext"(IN text, IN int4) IS 'args: WKT, srid - Construct a Polygon given an arbitrary collection of closed linestrings as a MultiLineString Well-Known text representation.'; -- ---------------------------- -- Function structure for public.st_bdmpolyfromtext(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bdmpolyfromtext"(text, int4); CREATE FUNCTION "public"."st_bdmpolyfromtext"(IN text, IN int4) RETURNS "public"."geometry" AS $BODY$ DECLARE geomtext alias for $1; srid alias for $2; mline geometry; geom geometry; BEGIN mline := ST_MultiLineStringFromText(geomtext, srid); IF mline IS NULL THEN RAISE EXCEPTION 'Input is not a MultiLinestring'; END IF; geom := ST_Multi(ST_BuildArea(mline)); RETURN geom; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bdmpolyfromtext"(IN text, IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_bdmpolyfromtext"(IN text, IN int4) IS 'args: WKT, srid - Construct a MultiPolygon given an arbitrary collection of closed linestrings as a MultiLineString text representation Well-Known text representation.'; -- ---------------------------- -- Function structure for public.unlockrows(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."unlockrows"(text); CREATE FUNCTION "public"."unlockrows"(IN text) RETURNS "int4" AS $BODY$ DECLARE ret int; BEGIN IF NOT LongTransactionsEnabled() THEN RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.'; END IF; EXECUTE 'DELETE FROM authorization_table where authid = ' || quote_literal($1); GET DIAGNOSTICS ret = ROW_COUNT; RETURN ret; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."unlockrows"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."unlockrows"(IN text) IS 'args: auth_token - Remove all locks held by specified authorization id. Returns the number of locks released.'; -- ---------------------------- -- Function structure for public.lockrow(text, text, text, text, timestamp) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."lockrow"(text, text, text, text, timestamp); CREATE FUNCTION "public"."lockrow"(IN text, IN text, IN text, IN text, IN timestamp) RETURNS "int4" AS $BODY$ DECLARE myschema alias for $1; mytable alias for $2; myrid alias for $3; authid alias for $4; expires alias for $5; ret int; mytoid oid; myrec RECORD; BEGIN IF NOT LongTransactionsEnabled() THEN RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.'; END IF; EXECUTE 'DELETE FROM authorization_table WHERE expires < now()'; SELECT c.oid INTO mytoid FROM pg_class c, pg_namespace n WHERE c.relname = mytable AND c.relnamespace = n.oid AND n.nspname = myschema; -- RAISE NOTICE 'toid: %', mytoid; FOR myrec IN SELECT * FROM authorization_table WHERE toid = mytoid AND rid = myrid LOOP IF myrec.authid != authid THEN RETURN 0; ELSE RETURN 1; END IF; END LOOP; EXECUTE 'INSERT INTO authorization_table VALUES ('|| quote_literal(mytoid::text)||','||quote_literal(myrid)|| ','||quote_literal(expires::text)|| ','||quote_literal(authid) ||')'; GET DIAGNOSTICS ret = ROW_COUNT; RETURN ret; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."lockrow"(IN text, IN text, IN text, IN text, IN timestamp) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."lockrow"(IN text, IN text, IN text, IN text, IN timestamp) IS 'args: a_schema_name, a_table_name, a_row_key, an_auth_token, expire_dt - Set lock/authorization for specific row in table'; -- ---------------------------- -- Function structure for public.lockrow(text, text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."lockrow"(text, text, text, text); CREATE FUNCTION "public"."lockrow"(IN text, IN text, IN text, IN text) RETURNS "int4" AS $BODY$ SELECT LockRow($1, $2, $3, $4, now()::timestamp+'1:00'); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."lockrow"(IN text, IN text, IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.lockrow(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."lockrow"(text, text, text); CREATE FUNCTION "public"."lockrow"(IN text, IN text, IN text) RETURNS "int4" AS $BODY$ SELECT LockRow(current_schema(), $1, $2, $3, now()::timestamp+'1:00'); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."lockrow"(IN text, IN text, IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."lockrow"(IN text, IN text, IN text) IS 'args: a_table_name, a_row_key, an_auth_token - Set lock/authorization for specific row in table'; -- ---------------------------- -- Function structure for public.lockrow(text, text, text, timestamp) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."lockrow"(text, text, text, timestamp); CREATE FUNCTION "public"."lockrow"(IN text, IN text, IN text, IN timestamp) RETURNS "int4" AS $BODY$ SELECT LockRow(current_schema(), $1, $2, $3, $4); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."lockrow"(IN text, IN text, IN text, IN timestamp) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."lockrow"(IN text, IN text, IN text, IN timestamp) IS 'args: a_table_name, a_row_key, an_auth_token, expire_dt - Set lock/authorization for specific row in table'; -- ---------------------------- -- Function structure for public.addauth(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addauth"(text); CREATE FUNCTION "public"."addauth"(IN text) RETURNS "bool" AS $BODY$ DECLARE lockid alias for $1; okay boolean; myrec record; BEGIN -- check to see if table exists -- if not, CREATE TEMP TABLE mylock (transid xid, lockcode text) okay := 'f'; FOR myrec IN SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table' LOOP okay := 't'; END LOOP; IF (okay <> 't') THEN CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text); -- this will only work from pgsql7.4 up -- ON COMMIT DELETE ROWS; END IF; -- INSERT INTO mylock VALUES ( $1) -- EXECUTE 'INSERT INTO temp_lock_have_table VALUES ( '|| -- quote_literal(getTransactionID()) || ',' || -- quote_literal(lockid) ||')'; INSERT INTO temp_lock_have_table VALUES (getTransactionID(), lockid); RETURN true::boolean; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addauth"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."addauth"(IN text) IS 'args: auth_token - Add an authorization token to be used in current transaction.'; -- ---------------------------- -- Function structure for public.checkauth(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."checkauth"(text, text, text); CREATE FUNCTION "public"."checkauth"(IN text, IN text, IN text) RETURNS "int4" AS $BODY$ DECLARE schema text; BEGIN IF NOT LongTransactionsEnabled() THEN RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.'; END IF; if ( $1 != '' ) THEN schema = $1; ELSE SELECT current_schema() into schema; END IF; -- TODO: check for an already existing trigger ? EXECUTE 'CREATE TRIGGER check_auth BEFORE UPDATE OR DELETE ON ' || quote_ident(schema) || '.' || quote_ident($2) ||' FOR EACH ROW EXECUTE PROCEDURE CheckAuthTrigger(' || quote_literal($3) || ')'; RETURN 0; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."checkauth"(IN text, IN text, IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."checkauth"(IN text, IN text, IN text) IS 'args: a_schema_name, a_table_name, a_key_column_name - Creates trigger on a table to prevent/allow updates and deletes of rows based on authorization token.'; -- ---------------------------- -- Function structure for public.checkauth(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."checkauth"(text, text); CREATE FUNCTION "public"."checkauth"(IN text, IN text) RETURNS "int4" AS $BODY$ SELECT CheckAuth('', $1, $2) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."checkauth"(IN text, IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."checkauth"(IN text, IN text) IS 'args: a_table_name, a_key_column_name - Creates trigger on a table to prevent/allow updates and deletes of rows based on authorization token.'; -- ---------------------------- -- Function structure for public.gettransactionid() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gettransactionid"(); CREATE FUNCTION "public"."gettransactionid"() RETURNS "xid" AS '$libdir/postgis-2.1','getTransactionID' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."gettransactionid"() OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.enablelongtransactions() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."enablelongtransactions"(); CREATE FUNCTION "public"."enablelongtransactions"() RETURNS "text" AS $BODY$ DECLARE "query" text; exists bool; rec RECORD; BEGIN exists = 'f'; FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table' LOOP exists = 't'; END LOOP; IF NOT exists THEN "query" = 'CREATE TABLE authorization_table ( toid oid, -- table oid rid text, -- row id expires timestamp, authid text )'; EXECUTE "query"; END IF; exists = 'f'; FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables' LOOP exists = 't'; END LOOP; IF NOT exists THEN "query" = 'CREATE VIEW authorized_tables AS ' || 'SELECT ' || 'n.nspname as schema, ' || 'c.relname as table, trim(' || quote_literal(chr(92) || '000') || ' from t.tgargs) as id_column ' || 'FROM pg_trigger t, pg_class c, pg_proc p ' || ', pg_namespace n ' || 'WHERE p.proname = ' || quote_literal('checkauthtrigger') || ' AND c.relnamespace = n.oid' || ' AND t.tgfoid = p.oid and t.tgrelid = c.oid'; EXECUTE "query"; END IF; RETURN 'Long transactions support enabled'; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."enablelongtransactions"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."enablelongtransactions"() IS 'Enable long transaction support. This function creates the required metadata tables, needs to be called once before using the other functions in this section. Calling it twice is harmless.'; -- ---------------------------- -- Function structure for public.longtransactionsenabled() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."longtransactionsenabled"(); CREATE FUNCTION "public"."longtransactionsenabled"() RETURNS "bool" AS $BODY$ DECLARE rec RECORD; BEGIN FOR rec IN SELECT oid FROM pg_class WHERE relname = 'authorized_tables' LOOP return 't'; END LOOP; return 'f'; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."longtransactionsenabled"() OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.disablelongtransactions() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."disablelongtransactions"(); CREATE FUNCTION "public"."disablelongtransactions"() RETURNS "text" AS $BODY$ DECLARE rec RECORD; BEGIN -- -- Drop all triggers applied by CheckAuth() -- FOR rec IN SELECT c.relname, t.tgname, t.tgargs FROM pg_trigger t, pg_class c, pg_proc p WHERE p.proname = 'checkauthtrigger' and t.tgfoid = p.oid and t.tgrelid = c.oid LOOP EXECUTE 'DROP TRIGGER ' || quote_ident(rec.tgname) || ' ON ' || quote_ident(rec.relname); END LOOP; -- -- Drop the authorization_table table -- FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table' LOOP DROP TABLE authorization_table; END LOOP; -- -- Drop the authorized_tables view -- FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables' LOOP DROP VIEW authorized_tables; END LOOP; RETURN 'Long transactions support disabled'; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."disablelongtransactions"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."disablelongtransactions"() IS 'Disable long transaction support. This function removes the long transaction support metadata tables, and drops all triggers attached to lock-checked tables.'; -- ---------------------------- -- Function structure for public.geography_typmod_in(_cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_typmod_in"(_cstring); CREATE FUNCTION "public"."geography_typmod_in"(IN _cstring) RETURNS "int4" AS '$libdir/postgis-2.1','geography_typmod_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_typmod_in"(IN _cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_typmod_out(int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_typmod_out"(int4); CREATE FUNCTION "public"."geography_typmod_out"(IN int4) RETURNS "cstring" AS '$libdir/postgis-2.1','postgis_typmod_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_typmod_out"(IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_in(cstring, oid, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_in"(cstring, oid, int4); CREATE FUNCTION "public"."geography_in"(IN cstring, IN oid, IN int4) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_in"(IN cstring, IN oid, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_out("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_out"("public"."geography"); CREATE FUNCTION "public"."geography_out"(IN "public"."geography") RETURNS "cstring" AS '$libdir/postgis-2.1','geography_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_out"(IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_analyze(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_analyze"(internal); CREATE FUNCTION "public"."geography_analyze"(IN internal) RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_analyze_nd' LANGUAGE c COST 1 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geography_analyze"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography("public"."geography", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography"("public"."geography", int4, bool); CREATE FUNCTION "public"."geography"(IN "public"."geography", IN int4, IN bool) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_enforce_typmod' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography"(IN "public"."geography", IN int4, IN bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography"(bytea); CREATE FUNCTION "public"."geography"(IN bytea) RETURNS "public"."geography" AS '$libdir/postgis-2.1','LWGEOM_from_bytea' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography"(IN bytea) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.bytea("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."bytea"("public"."geography"); CREATE FUNCTION "public"."bytea"(IN "public"."geography") RETURNS "bytea" AS '$libdir/postgis-2.1','LWGEOM_to_bytea' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."bytea"(IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_astext("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_astext"("public"."geography"); CREATE FUNCTION "public"."st_astext"(IN "public"."geography") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asText' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_astext"(IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_astext"(IN "public"."geography") IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.'; -- ---------------------------- -- Function structure for public.st_astext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_astext"(text); CREATE FUNCTION "public"."st_astext"(IN text) RETURNS "text" AS $BODY$ SELECT ST_AsText($1::geometry); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_astext"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_geographyfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geographyfromtext"(text); CREATE FUNCTION "public"."st_geographyfromtext"(IN text) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_from_text' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geographyfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geographyfromtext"(IN text) IS 'args: EWKT - Return a specified geography value from Well-Known Text representation or extended (WKT).'; -- ---------------------------- -- Function structure for public.st_geogfromtext(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geogfromtext"(text); CREATE FUNCTION "public"."st_geogfromtext"(IN text) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_from_text' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geogfromtext"(IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geogfromtext"(IN text) IS 'args: EWKT - Return a specified geography value from Well-Known Text representation or extended (WKT).'; -- ---------------------------- -- Function structure for public.st_geogfromwkb(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geogfromwkb"(bytea); CREATE FUNCTION "public"."st_geogfromwkb"(IN bytea) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_from_binary' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geogfromwkb"(IN bytea) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_geogfromwkb"(IN bytea) IS 'args: geom - Creates a geography instance from a Well-Known Binary geometry representation (WKB) or extended Well Known Binary (EWKB).'; -- ---------------------------- -- Function structure for public.postgis_typmod_dims(int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_typmod_dims"(int4); CREATE FUNCTION "public"."postgis_typmod_dims"(IN int4) RETURNS "int4" AS '$libdir/postgis-2.1','postgis_typmod_dims' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_typmod_dims"(IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_typmod_srid(int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_typmod_srid"(int4); CREATE FUNCTION "public"."postgis_typmod_srid"(IN int4) RETURNS "int4" AS '$libdir/postgis-2.1','postgis_typmod_srid' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_typmod_srid"(IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_typmod_type(int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_typmod_type"(int4); CREATE FUNCTION "public"."postgis_typmod_type"(IN int4) RETURNS "text" AS '$libdir/postgis-2.1','postgis_typmod_type' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_typmod_type"(IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography"("public"."geometry"); CREATE FUNCTION "public"."geography"(IN "public"."geometry") RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_from_geometry' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography"(IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry"("public"."geography"); CREATE FUNCTION "public"."geometry"(IN "public"."geography") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','geometry_from_geography' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry"(IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_gist_consistent(internal, "public"."geography", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_gist_consistent"(internal, "public"."geography", int4); CREATE FUNCTION "public"."geography_gist_consistent"(IN internal, IN "public"."geography", IN int4) RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_gist_consistent' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geography_gist_consistent"(IN internal, IN "public"."geography", IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_gist_compress(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_gist_compress"(internal); CREATE FUNCTION "public"."geography_gist_compress"(IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_compress' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geography_gist_compress"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_gist_penalty(internal, internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_gist_penalty"(internal, internal, internal); CREATE FUNCTION "public"."geography_gist_penalty"(IN internal, IN internal, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_penalty' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geography_gist_penalty"(IN internal, IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_gist_picksplit(internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_gist_picksplit"(internal, internal); CREATE FUNCTION "public"."geography_gist_picksplit"(IN internal, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_picksplit' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geography_gist_picksplit"(IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_gist_union(bytea, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_gist_union"(bytea, internal); CREATE FUNCTION "public"."geography_gist_union"(IN bytea, IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_union' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geography_gist_union"(IN bytea, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_gist_same("public"."box2d", "public"."box2d", internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_gist_same"("public"."box2d", "public"."box2d", internal); CREATE FUNCTION "public"."geography_gist_same"(IN "public"."box2d", IN "public"."box2d", IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_same' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geography_gist_same"(IN "public"."box2d", IN "public"."box2d", IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_gist_decompress(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_gist_decompress"(internal); CREATE FUNCTION "public"."geography_gist_decompress"(IN internal) RETURNS "internal" AS '$libdir/postgis-2.1','gserialized_gist_decompress' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."geography_gist_decompress"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_overlaps("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_overlaps"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."geography_overlaps"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS '$libdir/postgis-2.1','gserialized_overlaps' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_overlaps"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_lt("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_lt"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."geography_lt"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS '$libdir/postgis-2.1','geography_lt' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_lt"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_le("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_le"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."geography_le"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS '$libdir/postgis-2.1','geography_le' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_le"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_gt("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_gt"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."geography_gt"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS '$libdir/postgis-2.1','geography_gt' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_gt"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_ge("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_ge"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."geography_ge"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS '$libdir/postgis-2.1','geography_ge' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_ge"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_eq("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_eq"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."geography_eq"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS '$libdir/postgis-2.1','geography_eq' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_eq"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geography_cmp("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geography_cmp"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."geography_cmp"(IN "public"."geography", IN "public"."geography") RETURNS "int4" AS '$libdir/postgis-2.1','geography_cmp' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geography_cmp"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_assvg("public"."geography", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_assvg"("public"."geography", int4, int4); CREATE FUNCTION "public"."st_assvg"(IN geog "public"."geography", IN rel int4 DEFAULT 0, IN maxdecimaldigits int4 DEFAULT 15) RETURNS "text" AS '$libdir/postgis-2.1','geography_as_svg' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_assvg"(IN geog "public"."geography", IN rel int4, IN maxdecimaldigits int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_assvg"(IN geog "public"."geography", IN rel int4, IN maxdecimaldigits int4) IS 'args: geog, rel=0, maxdecimaldigits=15 - Returns a Geometry in SVG path data given a geometry or geography object.'; -- ---------------------------- -- Function structure for public.st_assvg(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_assvg"(text); CREATE FUNCTION "public"."st_assvg"(IN text) RETURNS "text" AS $BODY$ SELECT ST_AsSVG($1::geometry,0,15); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_assvg"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_asgml(int4, "public"."geography", int4, int4, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_asgml"(int4, "public"."geography", int4, int4, text, text); CREATE FUNCTION "public"."_st_asgml"(IN int4, IN "public"."geography", IN int4, IN int4, IN text, IN text) RETURNS "text" AS '$libdir/postgis-2.1','geography_as_gml' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_asgml"(IN int4, IN "public"."geography", IN int4, IN int4, IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asgml(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgml"(text); CREATE FUNCTION "public"."st_asgml"(IN text) RETURNS "text" AS $BODY$ SELECT _ST_AsGML(2,$1::geometry,15,0, NULL, NULL); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgml"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asgml("public"."geography", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgml"("public"."geography", int4, int4); CREATE FUNCTION "public"."st_asgml"(IN geog "public"."geography", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0) RETURNS "text" AS $BODY$SELECT _ST_AsGML(2, $1, $2, $3, null, null)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgml"(IN geog "public"."geography", IN maxdecimaldigits int4, IN "options" int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asgml(int4, "public"."geography", int4, int4, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgml"(int4, "public"."geography", int4, int4, text, text); CREATE FUNCTION "public"."st_asgml"(IN "version" int4, IN geog "public"."geography", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0, IN nprefix text DEFAULT NULL::text, IN "id" text DEFAULT NULL::text) RETURNS "text" AS $BODY$ SELECT _ST_AsGML($1, $2, $3, $4, $5, $6);$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgml"(IN "version" int4, IN geog "public"."geography", IN maxdecimaldigits int4, IN "options" int4, IN nprefix text, IN "id" text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asgml"(IN "version" int4, IN geog "public"."geography", IN maxdecimaldigits int4, IN "options" int4, IN nprefix text, IN "id" text) IS 'args: version, geog, maxdecimaldigits=15, options=0, nprefix=null, id=null - Return the geometry as a GML version 2 or 3 element.'; -- ---------------------------- -- Function structure for public._st_askml(int4, "public"."geography", int4, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_askml"(int4, "public"."geography", int4, text); CREATE FUNCTION "public"."_st_askml"(IN int4, IN "public"."geography", IN int4, IN text) RETURNS "text" AS '$libdir/postgis-2.1','geography_as_kml' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_askml"(IN int4, IN "public"."geography", IN int4, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_askml("public"."geography", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_askml"("public"."geography", int4); CREATE FUNCTION "public"."st_askml"(IN geog "public"."geography", IN maxdecimaldigits int4 DEFAULT 15) RETURNS "text" AS $BODY$SELECT _ST_AsKML(2, $1, $2, null)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_askml"(IN geog "public"."geography", IN maxdecimaldigits int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_askml"(IN geog "public"."geography", IN maxdecimaldigits int4) IS 'args: geog, maxdecimaldigits=15 - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; -- ---------------------------- -- Function structure for public.st_askml(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_askml"(text); CREATE FUNCTION "public"."st_askml"(IN text) RETURNS "text" AS $BODY$ SELECT _ST_AsKML(2, $1::geometry, 15, null); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_askml"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_askml(int4, "public"."geography", int4, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_askml"(int4, "public"."geography", int4, text); CREATE FUNCTION "public"."st_askml"(IN "version" int4, IN geog "public"."geography", IN maxdecimaldigits int4 DEFAULT 15, IN nprefix text DEFAULT NULL::text) RETURNS "text" AS $BODY$SELECT _ST_AsKML($1, $2, $3, $4)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_askml"(IN "version" int4, IN geog "public"."geography", IN maxdecimaldigits int4, IN nprefix text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_askml"(IN "version" int4, IN geog "public"."geography", IN maxdecimaldigits int4, IN nprefix text) IS 'args: version, geog, maxdecimaldigits=15, nprefix=NULL - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; -- ---------------------------- -- Function structure for public._st_asgeojson(int4, "public"."geography", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_asgeojson"(int4, "public"."geography", int4, int4); CREATE FUNCTION "public"."_st_asgeojson"(IN int4, IN "public"."geography", IN int4, IN int4) RETURNS "text" AS '$libdir/postgis-2.1','geography_as_geojson' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_asgeojson"(IN int4, IN "public"."geography", IN int4, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asgeojson(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgeojson"(text); CREATE FUNCTION "public"."st_asgeojson"(IN text) RETURNS "text" AS $BODY$ SELECT _ST_AsGeoJson(1, $1::geometry,15,0); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgeojson"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asgeojson("public"."geography", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgeojson"("public"."geography", int4, int4); CREATE FUNCTION "public"."st_asgeojson"(IN geog "public"."geography", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0) RETURNS "text" AS $BODY$ SELECT _ST_AsGeoJson(1, $1, $2, $3); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgeojson"(IN geog "public"."geography", IN maxdecimaldigits int4, IN "options" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asgeojson"(IN geog "public"."geography", IN maxdecimaldigits int4, IN "options" int4) IS 'args: geog, maxdecimaldigits=15, options=0 - Return the geometry as a GeoJSON element.'; -- ---------------------------- -- Function structure for public.st_asgeojson(int4, "public"."geography", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgeojson"(int4, "public"."geography", int4, int4); CREATE FUNCTION "public"."st_asgeojson"(IN gj_version int4, IN geog "public"."geography", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0) RETURNS "text" AS $BODY$ SELECT _ST_AsGeoJson($1, $2, $3, $4); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgeojson"(IN gj_version int4, IN geog "public"."geography", IN maxdecimaldigits int4, IN "options" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asgeojson"(IN gj_version int4, IN geog "public"."geography", IN maxdecimaldigits int4, IN "options" int4) IS 'args: gj_version, geog, maxdecimaldigits=15, options=0 - Return the geometry as a GeoJSON element.'; -- ---------------------------- -- Function structure for public._st_distance("public"."geography", "public"."geography", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_distance"("public"."geography", "public"."geography", float8, bool); CREATE FUNCTION "public"."_st_distance"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) RETURNS "float8" AS '$libdir/postgis-2.1','geography_distance' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_distance"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_dwithin("public"."geography", "public"."geography", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_dwithin"("public"."geography", "public"."geography", float8, bool); CREATE FUNCTION "public"."_st_dwithin"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) RETURNS "bool" AS '$libdir/postgis-2.1','geography_dwithin' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_dwithin"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_distance("public"."geography", "public"."geography", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_distance"("public"."geography", "public"."geography", bool); CREATE FUNCTION "public"."st_distance"(IN "public"."geography", IN "public"."geography", IN bool) RETURNS "float8" AS $BODY$SELECT _ST_Distance($1, $2, 0.0, $3)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_distance"(IN "public"."geography", IN "public"."geography", IN bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_distance"(IN "public"."geography", IN "public"."geography", IN bool) IS 'args: gg1, gg2, use_spheroid - For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters.'; -- ---------------------------- -- Function structure for public.st_distance("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_distance"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."st_distance"(IN "public"."geography", IN "public"."geography") RETURNS "float8" AS $BODY$SELECT _ST_Distance($1, $2, 0.0, true)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_distance"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_distance"(IN "public"."geography", IN "public"."geography") IS 'args: gg1, gg2 - For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters.'; -- ---------------------------- -- Function structure for public.st_distance(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_distance"(text, text); CREATE FUNCTION "public"."st_distance"(IN text, IN text) RETURNS "float8" AS $BODY$ SELECT ST_Distance($1::geometry, $2::geometry); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_distance"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_expand("public"."geography", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_expand"("public"."geography", float8); CREATE FUNCTION "public"."_st_expand"(IN "public"."geography", IN float8) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_expand' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_expand"(IN "public"."geography", IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_dwithin("public"."geography", "public"."geography", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dwithin"("public"."geography", "public"."geography", float8, bool); CREATE FUNCTION "public"."st_dwithin"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) RETURNS "bool" AS $BODY$SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, $4)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dwithin"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dwithin"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) IS 'args: gg1, gg2, distance_meters, use_spheroid - Returns true if the geometries are within the specified distance of one another. For geometry units are in those of spatial reference and For geography units are in meters and measurement is defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.'; -- ---------------------------- -- Function structure for public.st_dwithin("public"."geography", "public"."geography", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dwithin"("public"."geography", "public"."geography", float8); CREATE FUNCTION "public"."st_dwithin"(IN "public"."geography", IN "public"."geography", IN float8) RETURNS "bool" AS $BODY$SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, true)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dwithin"(IN "public"."geography", IN "public"."geography", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dwithin"(IN "public"."geography", IN "public"."geography", IN float8) IS 'args: gg1, gg2, distance_meters - Returns true if the geometries are within the specified distance of one another. For geometry units are in those of spatial reference and For geography units are in meters and measurement is defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.'; -- ---------------------------- -- Function structure for public.st_dwithin(text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dwithin"(text, text, float8); CREATE FUNCTION "public"."st_dwithin"(IN text, IN text, IN float8) RETURNS "bool" AS $BODY$ SELECT ST_DWithin($1::geometry, $2::geometry, $3); $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dwithin"(IN text, IN text, IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_distanceuncached("public"."geography", "public"."geography", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_distanceuncached"("public"."geography", "public"."geography", float8, bool); CREATE FUNCTION "public"."_st_distanceuncached"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) RETURNS "float8" AS '$libdir/postgis-2.1','geography_distance_uncached' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_distanceuncached"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_distanceuncached("public"."geography", "public"."geography", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_distanceuncached"("public"."geography", "public"."geography", bool); CREATE FUNCTION "public"."_st_distanceuncached"(IN "public"."geography", IN "public"."geography", IN bool) RETURNS "float8" AS $BODY$SELECT _ST_DistanceUnCached($1, $2, 0.0, $3)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_distanceuncached"(IN "public"."geography", IN "public"."geography", IN bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_distanceuncached("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_distanceuncached"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."_st_distanceuncached"(IN "public"."geography", IN "public"."geography") RETURNS "float8" AS $BODY$SELECT _ST_DistanceUnCached($1, $2, 0.0, true)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_distanceuncached"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_distancetree("public"."geography", "public"."geography", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_distancetree"("public"."geography", "public"."geography", float8, bool); CREATE FUNCTION "public"."_st_distancetree"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) RETURNS "float8" AS '$libdir/postgis-2.1','geography_distance_tree' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_distancetree"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_distancetree("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_distancetree"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."_st_distancetree"(IN "public"."geography", IN "public"."geography") RETURNS "float8" AS $BODY$SELECT _ST_DistanceTree($1, $2, 0.0, true)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_distancetree"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_dwithinuncached("public"."geography", "public"."geography", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_dwithinuncached"("public"."geography", "public"."geography", float8, bool); CREATE FUNCTION "public"."_st_dwithinuncached"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) RETURNS "bool" AS '$libdir/postgis-2.1','geography_dwithin_uncached' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_dwithinuncached"(IN "public"."geography", IN "public"."geography", IN float8, IN bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_dwithinuncached("public"."geography", "public"."geography", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_dwithinuncached"("public"."geography", "public"."geography", float8); CREATE FUNCTION "public"."_st_dwithinuncached"(IN "public"."geography", IN "public"."geography", IN float8) RETURNS "bool" AS $BODY$SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithinUnCached($1, $2, $3, true)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_dwithinuncached"(IN "public"."geography", IN "public"."geography", IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_polygon("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polygon"("public"."geometry", int4); CREATE FUNCTION "public"."st_polygon"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS $BODY$ SELECT ST_SetSRID(ST_MakePolygon($1), $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polygon"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_polygon"(IN "public"."geometry", IN int4) IS 'args: aLineString, srid - Returns a polygon built from the specified linestring and SRID.'; -- ---------------------------- -- Function structure for public.st_area("public"."geography", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_area"("public"."geography", bool); CREATE FUNCTION "public"."st_area"(IN geog "public"."geography", IN use_spheroid bool DEFAULT true) RETURNS "float8" AS '$libdir/postgis-2.1','geography_area' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_area"(IN geog "public"."geography", IN use_spheroid bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_area"(IN geog "public"."geography", IN use_spheroid bool) IS 'args: geog, use_spheroid=true - Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.'; -- ---------------------------- -- Function structure for public.st_area(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_area"(text); CREATE FUNCTION "public"."st_area"(IN text) RETURNS "float8" AS $BODY$ SELECT ST_Area($1::geometry); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_area"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_length("public"."geography", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_length"("public"."geography", bool); CREATE FUNCTION "public"."st_length"(IN geog "public"."geography", IN use_spheroid bool DEFAULT true) RETURNS "float8" AS '$libdir/postgis-2.1','geography_length' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_length"(IN geog "public"."geography", IN use_spheroid bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_length"(IN geog "public"."geography", IN use_spheroid bool) IS 'args: geog, use_spheroid=true - Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)'; -- ---------------------------- -- Function structure for public.st_length(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_length"(text); CREATE FUNCTION "public"."st_length"(IN text) RETURNS "float8" AS $BODY$ SELECT ST_Length($1::geometry); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_length"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_project("public"."geography", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_project"("public"."geography", float8, float8); CREATE FUNCTION "public"."st_project"(IN geog "public"."geography", IN distance float8, IN azimuth float8) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_project' LANGUAGE c COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_project"(IN geog "public"."geography", IN distance float8, IN azimuth float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_project"(IN geog "public"."geography", IN distance float8, IN azimuth float8) IS 'args: g1, distance, azimuth - Returns a POINT projected from a start point using a distance in meters and bearing (azimuth) in radians.'; -- ---------------------------- -- Function structure for public.st_azimuth("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_azimuth"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."st_azimuth"(IN geog1 "public"."geography", IN geog2 "public"."geography") RETURNS "float8" AS '$libdir/postgis-2.1','geography_azimuth' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_azimuth"(IN geog1 "public"."geography", IN geog2 "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_azimuth"(IN geog1 "public"."geography", IN geog2 "public"."geography") IS 'args: pointA, pointB - Returns the north-based azimuth as the angle in radians measured clockwise from the vertical on pointA to pointB.'; -- ---------------------------- -- Function structure for public.st_perimeter("public"."geography", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_perimeter"("public"."geography", bool); CREATE FUNCTION "public"."st_perimeter"(IN geog "public"."geography", IN use_spheroid bool DEFAULT true) RETURNS "float8" AS '$libdir/postgis-2.1','geography_perimeter' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_perimeter"(IN geog "public"."geography", IN use_spheroid bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_perimeter"(IN geog "public"."geography", IN use_spheroid bool) IS 'args: geog, use_spheroid=true - Return the length measurement of the boundary of an ST_Surface or ST_MultiSurface geometry or geography. (Polygon, Multipolygon). geometry measurement is in units of spatial reference and geography is in meters.'; -- ---------------------------- -- Function structure for public._st_pointoutside("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_pointoutside"("public"."geography"); CREATE FUNCTION "public"."_st_pointoutside"(IN "public"."geography") RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_point_outside' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_pointoutside"(IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_covers("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_covers"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."_st_covers"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS '$libdir/postgis-2.1','geography_covers' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_covers"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_covers("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_covers"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."st_covers"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Covers($1, $2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_covers"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_covers"(IN "public"."geography", IN "public"."geography") IS 'args: geogpolyA, geogpointB - Returns 1 (TRUE) if no point in Geometry B is outside Geometry A'; -- ---------------------------- -- Function structure for public.st_covers(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_covers"(text, text); CREATE FUNCTION "public"."st_covers"(IN text, IN text) RETURNS "bool" AS $BODY$ SELECT ST_Covers($1::geometry, $2::geometry); $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_covers"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_coveredby("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_coveredby"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."st_coveredby"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Covers($2, $1)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_coveredby"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_coveredby"(IN "public"."geography", IN "public"."geography") IS 'args: geogA, geogB - Returns 1 (TRUE) if no point in Geometry/Geography A is outside Geometry/Geography B'; -- ---------------------------- -- Function structure for public.st_coveredby(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_coveredby"(text, text); CREATE FUNCTION "public"."st_coveredby"(IN text, IN text) RETURNS "bool" AS $BODY$ SELECT ST_CoveredBy($1::geometry, $2::geometry); $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_coveredby"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_segmentize("public"."geography", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_segmentize"("public"."geography", float8); CREATE FUNCTION "public"."st_segmentize"(IN geog "public"."geography", IN max_segment_length float8) RETURNS "public"."geography" AS '$libdir/postgis-2.1','geography_segmentize' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_segmentize"(IN geog "public"."geography", IN max_segment_length float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_segmentize"(IN geog "public"."geography", IN max_segment_length float8) IS 'args: geog, max_segment_length - Return a modified geometry/geography having no segment longer than the given distance. Distance computation is performed in 2d only. For geometry, length units are in units of spatial reference. For geography, units are in meters.'; -- ---------------------------- -- Function structure for public.st_intersects("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersects"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."st_intersects"(IN "public"."geography", IN "public"."geography") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_Distance($1, $2, 0.0, false) < 0.00001$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersects"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersects"(IN "public"."geography", IN "public"."geography") IS 'args: geogA, geogB - Returns TRUE if the Geometries/Geography "spatially intersect in 2D" - (share any portion of space) and FALSE if they dont (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)'; -- ---------------------------- -- Function structure for public.st_intersects(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersects"(text, text); CREATE FUNCTION "public"."st_intersects"(IN text, IN text) RETURNS "bool" AS $BODY$ SELECT ST_Intersects($1::geometry, $2::geometry); $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersects"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_bestsrid("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_bestsrid"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."_st_bestsrid"(IN "public"."geography", IN "public"."geography") RETURNS "int4" AS '$libdir/postgis-2.1','geography_bestsrid' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_bestsrid"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_bestsrid("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_bestsrid"("public"."geography"); CREATE FUNCTION "public"."_st_bestsrid"(IN "public"."geography") RETURNS "int4" AS $BODY$SELECT _ST_BestSRID($1,$1)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_bestsrid"(IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_buffer("public"."geography", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_buffer"("public"."geography", float8); CREATE FUNCTION "public"."st_buffer"(IN "public"."geography", IN float8) RETURNS "public"."geography" AS $BODY$SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), _ST_BestSRID($1)), $2), 4326))$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_buffer"(IN "public"."geography", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_buffer"(IN "public"."geography", IN float8) IS 'args: g1, radius_of_buffer_in_meters - (T) For geometry: Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.#'; -- ---------------------------- -- Function structure for public.st_buffer(text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_buffer"(text, float8); CREATE FUNCTION "public"."st_buffer"(IN text, IN float8) RETURNS "public"."geometry" AS $BODY$ SELECT ST_Buffer($1::geometry, $2); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_buffer"(IN text, IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."geography", "public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."geography", "public"."geography"); CREATE FUNCTION "public"."st_intersection"(IN "public"."geography", IN "public"."geography") RETURNS "public"."geography" AS $BODY$SELECT geography(ST_Transform(ST_Intersection(ST_Transform(geometry($1), _ST_BestSRID($1, $2)), ST_Transform(geometry($2), _ST_BestSRID($1, $2))), 4326))$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersection"(IN "public"."geography", IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersection"(IN "public"."geography", IN "public"."geography") IS 'args: geogA, geogB - (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation does a transform to geometry to do the intersection and then transform back to WGS84.'; -- ---------------------------- -- Function structure for public.st_intersection(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"(text, text); CREATE FUNCTION "public"."st_intersection"(IN text, IN text) RETURNS "public"."geometry" AS $BODY$ SELECT ST_Intersection($1::geometry, $2::geometry); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersection"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asbinary("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asbinary"("public"."geography"); CREATE FUNCTION "public"."st_asbinary"(IN "public"."geography") RETURNS "bytea" AS '$libdir/postgis-2.1','LWGEOM_asBinary' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asbinary"(IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asbinary"(IN "public"."geography") IS 'args: g1 - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; -- ---------------------------- -- Function structure for public.st_asbinary("public"."geography", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asbinary"("public"."geography", text); CREATE FUNCTION "public"."st_asbinary"(IN "public"."geography", IN text) RETURNS "bytea" AS $BODY$ SELECT ST_AsBinary($1::geometry, $2); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asbinary"(IN "public"."geography", IN text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asbinary"(IN "public"."geography", IN text) IS 'args: g1, NDR_or_XDR - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; -- ---------------------------- -- Function structure for public.st_asewkt("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asewkt"("public"."geography"); CREATE FUNCTION "public"."st_asewkt"(IN "public"."geography") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asEWKT' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asewkt"(IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asewkt"(IN "public"."geography") IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.'; -- ---------------------------- -- Function structure for public.st_asewkt(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asewkt"(text); CREATE FUNCTION "public"."st_asewkt"(IN text) RETURNS "text" AS $BODY$ SELECT ST_AsEWKT($1::geometry); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asewkt"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometrytype("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometrytype"("public"."geography"); CREATE FUNCTION "public"."geometrytype"(IN "public"."geography") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_getTYPE' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometrytype"(IN "public"."geography") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_summary("public"."geography") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_summary"("public"."geography"); CREATE FUNCTION "public"."st_summary"(IN "public"."geography") RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_summary' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_summary"(IN "public"."geography") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_summary"(IN "public"."geography") IS 'args: g - Returns a text summary of the contents of the geometry.'; -- ---------------------------- -- Function structure for public.st_geohash("public"."geography", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geohash"("public"."geography", int4); CREATE FUNCTION "public"."st_geohash"(IN geog "public"."geography", IN maxchars int4 DEFAULT 0) RETURNS "text" AS '$libdir/postgis-2.1','ST_GeoHash' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geohash"(IN geog "public"."geography", IN maxchars int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_distance_sphere("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_distance_sphere"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_distance_sphere"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS $BODY$ select st_distance(geography($1),geography($2),false) $BODY$ LANGUAGE sql COST 300 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_distance_sphere"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_distance_sphere"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomlonlatA, geomlonlatB - Returns minimum distance in meters between two lon/lat geometries. Uses a spherical earth and radius of 6370986 meters. Faster than ST_Distance_Spheroid , but less accurate. PostGIS versions prior to 1.5 only implemented for points.'; -- ---------------------------- -- Function structure for public.postgis_type_name(varchar, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_type_name"(varchar, int4, bool); CREATE FUNCTION "public"."postgis_type_name"(IN geomname varchar, IN coord_dimension int4, IN use_new_name bool DEFAULT true) RETURNS "varchar" AS $BODY$ SELECT CASE WHEN $3 THEN new_name ELSE old_name END As geomname FROM ( VALUES ('GEOMETRY', 'Geometry', 2) , ('GEOMETRY', 'GeometryZ', 3) , ('GEOMETRY', 'GeometryZM', 4) , ('GEOMETRYCOLLECTION', 'GeometryCollection', 2) , ('GEOMETRYCOLLECTION', 'GeometryCollectionZ', 3) , ('GEOMETRYCOLLECTIONM', 'GeometryCollectionM', 3) , ('GEOMETRYCOLLECTION', 'GeometryCollectionZM', 4) , ('POINT', 'Point',2) , ('POINTM','PointM',3) , ('POINT', 'PointZ',3) , ('POINT', 'PointZM',4) , ('MULTIPOINT','MultiPoint',2) , ('MULTIPOINT','MultiPointZ',3) , ('MULTIPOINTM','MultiPointM',3) , ('MULTIPOINT','MultiPointZM',4) , ('POLYGON', 'Polygon',2) , ('POLYGON', 'PolygonZ',3) , ('POLYGONM', 'PolygonM',3) , ('POLYGON', 'PolygonZM',4) , ('MULTIPOLYGON', 'MultiPolygon',2) , ('MULTIPOLYGON', 'MultiPolygonZ',3) , ('MULTIPOLYGONM', 'MultiPolygonM',3) , ('MULTIPOLYGON', 'MultiPolygonZM',4) , ('MULTILINESTRING', 'MultiLineString',2) , ('MULTILINESTRING', 'MultiLineStringZ',3) , ('MULTILINESTRINGM', 'MultiLineStringM',3) , ('MULTILINESTRING', 'MultiLineStringZM',4) , ('LINESTRING', 'LineString',2) , ('LINESTRING', 'LineStringZ',3) , ('LINESTRINGM', 'LineStringM',3) , ('LINESTRING', 'LineStringZM',4) , ('CIRCULARSTRING', 'CircularString',2) , ('CIRCULARSTRING', 'CircularStringZ',3) , ('CIRCULARSTRINGM', 'CircularStringM',3) , ('CIRCULARSTRING', 'CircularStringZM',4) , ('COMPOUNDCURVE', 'CompoundCurve',2) , ('COMPOUNDCURVE', 'CompoundCurveZ',3) , ('COMPOUNDCURVEM', 'CompoundCurveM',3) , ('COMPOUNDCURVE', 'CompoundCurveZM',4) , ('CURVEPOLYGON', 'CurvePolygon',2) , ('CURVEPOLYGON', 'CurvePolygonZ',3) , ('CURVEPOLYGONM', 'CurvePolygonM',3) , ('CURVEPOLYGON', 'CurvePolygonZM',4) , ('MULTICURVE', 'MultiCurve',2 ) , ('MULTICURVE', 'MultiCurveZ',3 ) , ('MULTICURVEM', 'MultiCurveM',3 ) , ('MULTICURVE', 'MultiCurveZM',4 ) , ('MULTISURFACE', 'MultiSurface', 2) , ('MULTISURFACE', 'MultiSurfaceZ', 3) , ('MULTISURFACEM', 'MultiSurfaceM', 3) , ('MULTISURFACE', 'MultiSurfaceZM', 4) , ('POLYHEDRALSURFACE', 'PolyhedralSurface',2) , ('POLYHEDRALSURFACE', 'PolyhedralSurfaceZ',3) , ('POLYHEDRALSURFACEM', 'PolyhedralSurfaceM',3) , ('POLYHEDRALSURFACE', 'PolyhedralSurfaceZM',4) , ('TRIANGLE', 'Triangle',2) , ('TRIANGLE', 'TriangleZ',3) , ('TRIANGLEM', 'TriangleM',3) , ('TRIANGLE', 'TriangleZM',4) , ('TIN', 'Tin', 2), ('TIN', 'TinZ', 3), ('TIN', 'TinM', 3), ('TIN', 'TinZM', 4) ) As g(old_name, new_name, coord_dimension) WHERE (upper(old_name) = upper($1) OR upper(new_name) = upper($1)) AND coord_dimension = $2; $BODY$ LANGUAGE sql COST 200 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_type_name"(IN geomname varchar, IN coord_dimension int4, IN use_new_name bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_constraint_srid(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_constraint_srid"(text, text, text); CREATE FUNCTION "public"."postgis_constraint_srid"(IN geomschema text, IN geomtable text, IN geomcolumn text) RETURNS "int4" AS $BODY$ SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%srid(% = %'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."postgis_constraint_srid"(IN geomschema text, IN geomtable text, IN geomcolumn text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_constraint_dims(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_constraint_dims"(text, text, text); CREATE FUNCTION "public"."postgis_constraint_dims"(IN geomschema text, IN geomtable text, IN geomcolumn text) RETURNS "int4" AS $BODY$ SELECT replace(split_part(s.consrc, ' = ', 2), ')', '')::integer FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%ndims(% = %'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."postgis_constraint_dims"(IN geomschema text, IN geomtable text, IN geomcolumn text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_constraint_type(text, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_constraint_type"(text, text, text); CREATE FUNCTION "public"."postgis_constraint_type"(IN geomschema text, IN geomtable text, IN geomcolumn text) RETURNS "varchar" AS $BODY$ SELECT replace(split_part(s.consrc, '''', 2), ')', '')::varchar FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%geometrytype(% = %'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."postgis_constraint_type"(IN geomschema text, IN geomtable text, IN geomcolumn text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_3ddistance("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3ddistance"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_3ddistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','distance3d' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3ddistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3ddistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - For geometry type Returns the 3-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units.'; -- ---------------------------- -- Function structure for public.st_3dmaxdistance("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dmaxdistance"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_3dmaxdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','LWGEOM_maxdistance3d' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dmaxdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dmaxdistance"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - For geometry type Returns the 3-dimensional cartesian maximum distance (based on spatial ref) between two geometries in projected units.'; -- ---------------------------- -- Function structure for public.st_3dclosestpoint("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dclosestpoint"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_3dclosestpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_closestpoint3d' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dclosestpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dclosestpoint"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns the 3-dimensional point on g1 that is closest to g2. This is the first point of the 3D shortest line.'; -- ---------------------------- -- Function structure for public.st_3dshortestline("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dshortestline"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_3dshortestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_shortestline3d' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dshortestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dshortestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns the 3-dimensional shortest line between two geometries'; -- ---------------------------- -- Function structure for public.st_3dlongestline("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dlongestline"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_3dlongestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_longestline3d' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dlongestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dlongestline"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: g1, g2 - Returns the 3-dimensional longest line between two geometries'; -- ---------------------------- -- Function structure for public._st_3ddwithin("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_3ddwithin"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."_st_3ddwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_dwithin3d' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_3ddwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_3ddwithin("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3ddwithin"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."st_3ddwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "bool" AS $BODY$SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_3DDWithin($1, $2, $3)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3ddwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3ddwithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) IS 'args: g1, g2, distance_of_srid - For 3d (z) geometry type Returns true if two geometries 3d distance is within number of units.'; -- ---------------------------- -- Function structure for public._st_3ddfullywithin("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_3ddfullywithin"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."_st_3ddfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_dfullywithin3d' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_3ddfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_3ddfullywithin("public"."geometry", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3ddfullywithin"("public"."geometry", "public"."geometry", float8); CREATE FUNCTION "public"."st_3ddfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) RETURNS "bool" AS $BODY$SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_3DDFullyWithin($1, $2, $3)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3ddfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3ddfullywithin"(IN geom1 "public"."geometry", IN geom2 "public"."geometry", IN float8) IS 'args: g1, g2, distance - Returns true if all of the 3D geometries are within the specified distance of one another.'; -- ---------------------------- -- Function structure for public._st_3dintersects("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_3dintersects"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_3dintersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','intersects3d' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_3dintersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_3dintersects("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_3dintersects"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_3dintersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") RETURNS "bool" AS $BODY$SELECT $1 && $2 AND _ST_3DIntersects($1, $2)$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_3dintersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_3dintersects"(IN geom1 "public"."geometry", IN geom2 "public"."geometry") IS 'args: geomA, geomB - Returns TRUE if the Geometries "spatially intersect" in 3d - only for points and linestrings'; -- ---------------------------- -- Function structure for public.st_coorddim("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_coorddim"("public"."geometry"); CREATE FUNCTION "public"."st_coorddim"(IN geometry "public"."geometry") RETURNS "int2" AS '$libdir/postgis-2.1','LWGEOM_ndims' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_coorddim"(IN geometry "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_coorddim"(IN geometry "public"."geometry") IS 'args: geomA - Return the coordinate dimension of the ST_Geometry value.'; -- ---------------------------- -- Function structure for public.st_curvetoline("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_curvetoline"("public"."geometry", int4); CREATE FUNCTION "public"."st_curvetoline"(IN "public"."geometry", IN int4) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_curve_segmentize' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_curvetoline"(IN "public"."geometry", IN int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_curvetoline"(IN "public"."geometry", IN int4) IS 'args: curveGeom, segments_per_qtr_circle - Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON'; -- ---------------------------- -- Function structure for public.st_curvetoline("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_curvetoline"("public"."geometry"); CREATE FUNCTION "public"."st_curvetoline"(IN "public"."geometry") RETURNS "public"."geometry" AS $BODY$SELECT ST_CurveToLine($1, 32)$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_curvetoline"(IN "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_curvetoline"(IN "public"."geometry") IS 'args: curveGeom - Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON'; -- ---------------------------- -- Function structure for public.st_hasarc("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_hasarc"("public"."geometry"); CREATE FUNCTION "public"."st_hasarc"(IN geometry "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_has_arc' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_hasarc"(IN geometry "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_hasarc"(IN geometry "public"."geometry") IS 'args: geomA - Returns true if a geometry or geometry collection contains a circular string'; -- ---------------------------- -- Function structure for public.st_linetocurve("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_linetocurve"("public"."geometry"); CREATE FUNCTION "public"."st_linetocurve"(IN geometry "public"."geometry") RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_line_desegmentize' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_linetocurve"(IN geometry "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_linetocurve"(IN geometry "public"."geometry") IS 'args: geomANoncircular - Converts a LINESTRING/POLYGON to a CIRCULARSTRING, CURVED POLYGON'; -- ---------------------------- -- Function structure for public._st_orderingequals("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_orderingequals"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."_st_orderingequals"(IN geometrya "public"."geometry", IN geometryb "public"."geometry") RETURNS "bool" AS '$libdir/postgis-2.1','LWGEOM_same' LANGUAGE c COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_orderingequals"(IN geometrya "public"."geometry", IN geometryb "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_orderingequals("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_orderingequals"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_orderingequals"(IN geometrya "public"."geometry", IN geometryb "public"."geometry") RETURNS "bool" AS $BODY$ SELECT $1 ~= $2 AND _ST_OrderingEquals($1, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_orderingequals"(IN geometrya "public"."geometry", IN geometryb "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_orderingequals"(IN geometrya "public"."geometry", IN geometryb "public"."geometry") IS 'args: A, B - Returns true if the given geometries represent the same geometry and points are in the same directional order.'; -- ---------------------------- -- Function structure for public.st_point(float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_point"(float8, float8); CREATE FUNCTION "public"."st_point"(IN float8, IN float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_makepoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_point"(IN float8, IN float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_point"(IN float8, IN float8) IS 'args: x_lon, y_lat - Returns an ST_Point with the given coordinate values. OGC alias for ST_MakePoint.'; -- ---------------------------- -- Function structure for public.st_wkbtosql(bytea) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_wkbtosql"(bytea); CREATE FUNCTION "public"."st_wkbtosql"(IN wkb bytea) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','LWGEOM_from_WKB' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_wkbtosql"(IN wkb bytea) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_wkbtosql"(IN wkb bytea) IS 'args: WKB - Return a specified ST_Geometry value from Well-Known Binary representation (WKB). This is an alias name for ST_GeomFromWKB that takes no srid'; -- ---------------------------- -- Function structure for public.st_locatebetween("public"."geometry", float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_locatebetween"("public"."geometry", float8, float8, float8); CREATE FUNCTION "public"."st_locatebetween"(IN geometry "public"."geometry", IN frommeasure float8, IN tomeasure float8, IN leftrightoffset float8 DEFAULT 0.0) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_LocateBetween' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_locatebetween"(IN geometry "public"."geometry", IN frommeasure float8, IN tomeasure float8, IN leftrightoffset float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_locatebetween"(IN geometry "public"."geometry", IN frommeasure float8, IN tomeasure float8, IN leftrightoffset float8) IS 'args: geomA, measure_start, measure_end, offset - Return a derived geometry collection value with elements that match the specified range of measures inclusively. Polygonal elements are not supported.'; -- ---------------------------- -- Function structure for public.st_locatealong("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_locatealong"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_locatealong"(IN geometry "public"."geometry", IN measure float8, IN leftrightoffset float8 DEFAULT 0.0) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_LocateAlong' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_locatealong"(IN geometry "public"."geometry", IN measure float8, IN leftrightoffset float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_locatealong"(IN geometry "public"."geometry", IN measure float8, IN leftrightoffset float8) IS 'args: ageom_with_measure, a_measure, offset - Return a derived geometry collection value with elements that match the specified measure. Polygonal elements are not supported.'; -- ---------------------------- -- Function structure for public.st_locatebetweenelevations("public"."geometry", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_locatebetweenelevations"("public"."geometry", float8, float8); CREATE FUNCTION "public"."st_locatebetweenelevations"(IN geometry "public"."geometry", IN fromelevation float8, IN toelevation float8) RETURNS "public"."geometry" AS '$libdir/postgis-2.1','ST_LocateBetweenElevations' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_locatebetweenelevations"(IN geometry "public"."geometry", IN fromelevation float8, IN toelevation float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_locatebetweenelevations"(IN geometry "public"."geometry", IN fromelevation float8, IN toelevation float8) IS 'args: geom_mline, elevation_start, elevation_end - Return a derived geometry (collection) value with elements that intersect the specified range of elevations inclusively. Only 3D, 4D LINESTRINGS and MULTILINESTRINGS are supported.'; -- ---------------------------- -- Function structure for public.st_interpolatepoint("public"."geometry", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_interpolatepoint"("public"."geometry", "public"."geometry"); CREATE FUNCTION "public"."st_interpolatepoint"(IN line "public"."geometry", IN point "public"."geometry") RETURNS "float8" AS '$libdir/postgis-2.1','ST_InterpolatePoint' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_interpolatepoint"(IN line "public"."geometry", IN point "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_interpolatepoint"(IN line "public"."geometry", IN point "public"."geometry") IS 'args: line, point - Return the value of the measure dimension of a geometry at the point closed to the provided point.'; -- ---------------------------- -- Function structure for public.st_minimumboundingcircle("public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_minimumboundingcircle"("public"."geometry", int4); CREATE FUNCTION "public"."st_minimumboundingcircle"(IN inputgeom "public"."geometry", IN segs_per_quarter int4 DEFAULT 48) RETURNS "public"."geometry" AS $BODY$ DECLARE hull GEOMETRY; ring GEOMETRY; center GEOMETRY; radius DOUBLE PRECISION; dist DOUBLE PRECISION; d DOUBLE PRECISION; idx1 integer; idx2 integer; l1 GEOMETRY; l2 GEOMETRY; p1 GEOMETRY; p2 GEOMETRY; a1 DOUBLE PRECISION; a2 DOUBLE PRECISION; BEGIN -- First compute the ConvexHull of the geometry hull = ST_ConvexHull(inputgeom); --A point really has no MBC IF ST_GeometryType(hull) = 'ST_Point' THEN RETURN hull; END IF; -- convert the hull perimeter to a linestring so we can manipulate individual points --If its already a linestring force it to a closed linestring ring = CASE WHEN ST_GeometryType(hull) = 'ST_LineString' THEN ST_AddPoint(hull, ST_StartPoint(hull)) ELSE ST_ExteriorRing(hull) END; dist = 0; -- Brute Force - check every pair FOR i in 1 .. (ST_NumPoints(ring)-2) LOOP FOR j in i .. (ST_NumPoints(ring)-1) LOOP d = ST_Distance(ST_PointN(ring,i),ST_PointN(ring,j)); -- Check the distance and update if larger IF (d > dist) THEN dist = d; idx1 = i; idx2 = j; END IF; END LOOP; END LOOP; -- We now have the diameter of the convex hull. The following line returns it if desired. -- RETURN ST_MakeLine(ST_PointN(ring,idx1),ST_PointN(ring,idx2)); -- Now for the Minimum Bounding Circle. Since we know the two points furthest from each -- other, the MBC must go through those two points. Start with those points as a diameter of a circle. -- The radius is half the distance between them and the center is midway between them radius = ST_Distance(ST_PointN(ring,idx1),ST_PointN(ring,idx2)) / 2.0; center = ST_LineInterpolatePoint(ST_MakeLine(ST_PointN(ring,idx1),ST_PointN(ring,idx2)),0.5); -- Loop through each vertex and check if the distance from the center to the point -- is greater than the current radius. FOR k in 1 .. (ST_NumPoints(ring)-1) LOOP IF(k <> idx1 and k <> idx2) THEN dist = ST_Distance(center,ST_PointN(ring,k)); IF (dist > radius) THEN -- We have to expand the circle. The new circle must pass trhough -- three points - the two original diameters and this point. -- Draw a line from the first diameter to this point l1 = ST_Makeline(ST_PointN(ring,idx1),ST_PointN(ring,k)); -- Compute the midpoint p1 = ST_LineInterpolatePoint(l1,0.5); -- Rotate the line 90 degrees around the midpoint (perpendicular bisector) l1 = ST_Rotate(l1,pi()/2,p1); -- Compute the azimuth of the bisector a1 = ST_Azimuth(ST_PointN(l1,1),ST_PointN(l1,2)); -- Extend the line in each direction the new computed distance to insure they will intersect l1 = ST_AddPoint(l1,ST_Makepoint(ST_X(ST_PointN(l1,2))+sin(a1)*dist,ST_Y(ST_PointN(l1,2))+cos(a1)*dist),-1); l1 = ST_AddPoint(l1,ST_Makepoint(ST_X(ST_PointN(l1,1))-sin(a1)*dist,ST_Y(ST_PointN(l1,1))-cos(a1)*dist),0); -- Repeat for the line from the point to the other diameter point l2 = ST_Makeline(ST_PointN(ring,idx2),ST_PointN(ring,k)); p2 = ST_LineInterpolatePoint(l2,0.5); l2 = ST_Rotate(l2,pi()/2,p2); a2 = ST_Azimuth(ST_PointN(l2,1),ST_PointN(l2,2)); l2 = ST_AddPoint(l2,ST_Makepoint(ST_X(ST_PointN(l2,2))+sin(a2)*dist,ST_Y(ST_PointN(l2,2))+cos(a2)*dist),-1); l2 = ST_AddPoint(l2,ST_Makepoint(ST_X(ST_PointN(l2,1))-sin(a2)*dist,ST_Y(ST_PointN(l2,1))-cos(a2)*dist),0); -- The new center is the intersection of the two bisectors center = ST_Intersection(l1,l2); -- The new radius is the distance to any of the three points radius = ST_Distance(center,ST_PointN(ring,idx1)); END IF; END IF; END LOOP; --DONE!! Return the MBC via the buffer command RETURN ST_Buffer(center,radius,segs_per_quarter); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_minimumboundingcircle"(IN inputgeom "public"."geometry", IN segs_per_quarter int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_minimumboundingcircle"(IN inputgeom "public"."geometry", IN segs_per_quarter int4) IS 'args: geomA, num_segs_per_qt_circ=48 - Returns the smallest circle polygon that can fully contain a geometry. Default uses 48 segments per quarter circle.'; -- ---------------------------- -- Function structure for public._st_concavehull("public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_concavehull"("public"."geometry"); CREATE FUNCTION "public"."_st_concavehull"(IN param_inputgeom "public"."geometry") RETURNS "public"."geometry" AS $BODY$ DECLARE vexhull GEOMETRY; var_resultgeom geometry; var_inputgeom geometry; vexring GEOMETRY; cavering GEOMETRY; cavept geometry[]; seglength double precision; var_tempgeom geometry; scale_factor integer := 1; i integer; BEGIN -- First compute the ConvexHull of the geometry vexhull := ST_ConvexHull(param_inputgeom); var_inputgeom := param_inputgeom; --A point really has no concave hull IF ST_GeometryType(vexhull) = 'ST_Point' OR ST_GeometryType(vexHull) = 'ST_LineString' THEN RETURN vexhull; END IF; -- convert the hull perimeter to a linestring so we can manipulate individual points vexring := CASE WHEN ST_GeometryType(vexhull) = 'ST_LineString' THEN vexhull ELSE ST_ExteriorRing(vexhull) END; IF abs(ST_X(ST_PointN(vexring,1))) < 1 THEN --scale the geometry to prevent stupid precision errors - not sure it works so make low for now scale_factor := 100; vexring := ST_Scale(vexring, scale_factor,scale_factor); var_inputgeom := ST_Scale(var_inputgeom, scale_factor, scale_factor); --RAISE NOTICE 'Scaling'; END IF; seglength := ST_Length(vexring)/least(ST_NPoints(vexring)*2,1000) ; vexring := ST_Segmentize(vexring, seglength); -- find the point on the original geom that is closest to each point of the convex hull and make a new linestring out of it. cavering := ST_Collect( ARRAY( SELECT ST_ClosestPoint(var_inputgeom, pt ) As the_geom FROM ( SELECT ST_PointN(vexring, n ) As pt, n FROM generate_series(1, ST_NPoints(vexring) ) As n ) As pt ) ) ; var_resultgeom := ST_MakeLine(geom) FROM ST_Dump(cavering) As foo; IF ST_IsSimple(var_resultgeom) THEN var_resultgeom := ST_MakePolygon(var_resultgeom); --RAISE NOTICE 'is Simple: %', var_resultgeom; ELSE --RAISE NOTICE 'is not Simple: %', var_resultgeom; var_resultgeom := ST_ConvexHull(var_resultgeom); END IF; IF scale_factor > 1 THEN -- scale the result back var_resultgeom := ST_Scale(var_resultgeom, 1/scale_factor, 1/scale_factor); END IF; RETURN var_resultgeom; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_concavehull"(IN param_inputgeom "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_concavehull("public"."geometry", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_concavehull"("public"."geometry", float8, bool); CREATE FUNCTION "public"."st_concavehull"(IN param_geom "public"."geometry", IN param_pctconvex float8, IN param_allow_holes bool DEFAULT false) RETURNS "public"."geometry" AS $BODY$ DECLARE var_convhull geometry := ST_ConvexHull(param_geom); var_param_geom geometry := param_geom; var_initarea float := ST_Area(var_convhull); var_newarea float := var_initarea; var_div integer := 6; var_tempgeom geometry; var_tempgeom2 geometry; var_cent geometry; var_geoms geometry[4]; var_enline geometry; var_resultgeom geometry; var_atempgeoms geometry[]; var_buf float := 1; BEGIN -- We start with convex hull as our base var_resultgeom := var_convhull; IF param_pctconvex = 1 THEN return var_resultgeom; ELSIF ST_GeometryType(var_param_geom) = 'ST_Polygon' THEN -- it is as concave as it is going to get IF param_allow_holes THEN -- leave the holes RETURN var_param_geom; ELSE -- remove the holes var_resultgeom := ST_MakePolygon(ST_ExteriorRing(var_param_geom)); RETURN var_resultgeom; END IF; END IF; IF ST_Dimension(var_resultgeom) > 1 AND param_pctconvex BETWEEN 0 and 0.98 THEN -- get linestring that forms envelope of geometry var_enline := ST_Boundary(ST_Envelope(var_param_geom)); var_buf := ST_Length(var_enline)/1000.0; IF ST_GeometryType(var_param_geom) = 'ST_MultiPoint' AND ST_NumGeometries(var_param_geom) BETWEEN 4 and 200 THEN -- we make polygons out of points since they are easier to cave in. -- Note we limit to between 4 and 200 points because this process is slow and gets quadratically slow var_buf := sqrt(ST_Area(var_convhull)*0.8/(ST_NumGeometries(var_param_geom)*ST_NumGeometries(var_param_geom))); var_atempgeoms := ARRAY(SELECT geom FROM ST_DumpPoints(var_param_geom)); -- 5 and 10 and just fudge factors var_tempgeom := ST_Union(ARRAY(SELECT geom FROM ( -- fuse near neighbors together SELECT DISTINCT ON (i) i, ST_Distance(var_atempgeoms[i],var_atempgeoms[j]), ST_Buffer(ST_MakeLine(var_atempgeoms[i], var_atempgeoms[j]) , var_buf*5, 'quad_segs=3') As geom FROM generate_series(1,array_upper(var_atempgeoms, 1)) As i INNER JOIN generate_series(1,array_upper(var_atempgeoms, 1)) As j ON ( NOT ST_Intersects(var_atempgeoms[i],var_atempgeoms[j]) AND ST_DWithin(var_atempgeoms[i],var_atempgeoms[j], var_buf*10) ) UNION ALL -- catch the ones with no near neighbors SELECT i, 0, ST_Buffer(var_atempgeoms[i] , var_buf*10, 'quad_segs=3') As geom FROM generate_series(1,array_upper(var_atempgeoms, 1)) As i LEFT JOIN generate_series(ceiling(array_upper(var_atempgeoms,1)/2)::integer,array_upper(var_atempgeoms, 1)) As j ON ( NOT ST_Intersects(var_atempgeoms[i],var_atempgeoms[j]) AND ST_DWithin(var_atempgeoms[i],var_atempgeoms[j], var_buf*10) ) WHERE j IS NULL ORDER BY 1, 2 ) As foo ) ); IF ST_IsValid(var_tempgeom) AND ST_GeometryType(var_tempgeom) = 'ST_Polygon' THEN var_tempgeom := ST_ForceSFS(ST_Intersection(var_tempgeom, var_convhull)); IF param_allow_holes THEN var_param_geom := var_tempgeom; ELSE var_param_geom := ST_MakePolygon(ST_ExteriorRing(var_tempgeom)); END IF; return var_param_geom; ELSIF ST_IsValid(var_tempgeom) THEN var_param_geom := ST_ForceSFS(ST_Intersection(var_tempgeom, var_convhull)); END IF; END IF; IF ST_GeometryType(var_param_geom) = 'ST_Polygon' THEN IF NOT param_allow_holes THEN var_param_geom := ST_MakePolygon(ST_ExteriorRing(var_param_geom)); END IF; return var_param_geom; END IF; var_cent := ST_Centroid(var_param_geom); IF (ST_XMax(var_enline) - ST_XMin(var_enline) ) > var_buf AND (ST_YMax(var_enline) - ST_YMin(var_enline) ) > var_buf THEN IF ST_Dwithin(ST_Centroid(var_convhull) , ST_Centroid(ST_Envelope(var_param_geom)), var_buf/2) THEN -- If the geometric dimension is > 1 and the object is symettric (cutting at centroid will not work -- offset a bit) var_cent := ST_Translate(var_cent, (ST_XMax(var_enline) - ST_XMin(var_enline))/1000, (ST_YMAX(var_enline) - ST_YMin(var_enline))/1000); ELSE -- uses closest point on geometry to centroid. I can't explain why we are doing this var_cent := ST_ClosestPoint(var_param_geom,var_cent); END IF; IF ST_DWithin(var_cent, var_enline,var_buf) THEN var_cent := ST_centroid(ST_Envelope(var_param_geom)); END IF; -- break envelope into 4 triangles about the centroid of the geometry and returned the clipped geometry in each quadrant FOR i in 1 .. 4 LOOP var_geoms[i] := ST_MakePolygon(ST_MakeLine(ARRAY[ST_PointN(var_enline,i), ST_PointN(var_enline,i+1), var_cent, ST_PointN(var_enline,i)])); var_geoms[i] := ST_ForceSFS(ST_Intersection(var_param_geom, ST_Buffer(var_geoms[i],var_buf))); IF ST_IsValid(var_geoms[i]) THEN ELSE var_geoms[i] := ST_BuildArea(ST_MakeLine(ARRAY[ST_PointN(var_enline,i), ST_PointN(var_enline,i+1), var_cent, ST_PointN(var_enline,i)])); END IF; END LOOP; var_tempgeom := ST_Union(ARRAY[ST_ConvexHull(var_geoms[1]), ST_ConvexHull(var_geoms[2]) , ST_ConvexHull(var_geoms[3]), ST_ConvexHull(var_geoms[4])]); --RAISE NOTICE 'Curr vex % ', ST_AsText(var_tempgeom); IF ST_Area(var_tempgeom) <= var_newarea AND ST_IsValid(var_tempgeom) THEN --AND ST_GeometryType(var_tempgeom) ILIKE '%Polygon' var_tempgeom := ST_Buffer(ST_ConcaveHull(var_geoms[1],least(param_pctconvex + param_pctconvex/var_div),true),var_buf, 'quad_segs=2'); FOR i IN 1 .. 4 LOOP var_geoms[i] := ST_Buffer(ST_ConcaveHull(var_geoms[i],least(param_pctconvex + param_pctconvex/var_div),true), var_buf, 'quad_segs=2'); IF ST_IsValid(var_geoms[i]) Then var_tempgeom := ST_Union(var_tempgeom, var_geoms[i]); ELSE RAISE NOTICE 'Not valid % %', i, ST_AsText(var_tempgeom); var_tempgeom := ST_Union(var_tempgeom, ST_ConvexHull(var_geoms[i])); END IF; END LOOP; --RAISE NOTICE 'Curr concave % ', ST_AsText(var_tempgeom); IF ST_IsValid(var_tempgeom) THEN var_resultgeom := var_tempgeom; END IF; var_newarea := ST_Area(var_resultgeom); ELSIF ST_IsValid(var_tempgeom) THEN var_resultgeom := var_tempgeom; END IF; IF ST_NumGeometries(var_resultgeom) > 1 THEN var_tempgeom := _ST_ConcaveHull(var_resultgeom); IF ST_IsValid(var_tempgeom) AND ST_GeometryType(var_tempgeom) ILIKE 'ST_Polygon' THEN var_resultgeom := var_tempgeom; ELSE var_resultgeom := ST_Buffer(var_tempgeom,var_buf, 'quad_segs=2'); END IF; END IF; IF param_allow_holes = false THEN -- only keep exterior ring since we do not want holes var_resultgeom := ST_MakePolygon(ST_ExteriorRing(var_resultgeom)); END IF; ELSE var_resultgeom := ST_Buffer(var_resultgeom,var_buf); END IF; var_resultgeom := ST_ForceSFS(ST_Intersection(var_resultgeom, ST_ConvexHull(var_param_geom))); ELSE -- dimensions are too small to cut var_resultgeom := _ST_ConcaveHull(var_param_geom); END IF; RETURN var_resultgeom; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_concavehull"(IN param_geom "public"."geometry", IN param_pctconvex float8, IN param_allow_holes bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_concavehull"(IN param_geom "public"."geometry", IN param_pctconvex float8, IN param_allow_holes bool) IS 'args: geomA, target_percent, allow_holes=false - The concave hull of a geometry represents a possibly concave geometry that encloses all geometries within the set. You can think of it as shrink wrapping.'; -- ---------------------------- -- Function structure for public._st_asx3d(int4, "public"."geometry", int4, int4, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_asx3d"(int4, "public"."geometry", int4, int4, text); CREATE FUNCTION "public"."_st_asx3d"(IN int4, IN "public"."geometry", IN int4, IN int4, IN text) RETURNS "text" AS '$libdir/postgis-2.1','LWGEOM_asX3D' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_asx3d"(IN int4, IN "public"."geometry", IN int4, IN int4, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asx3d("public"."geometry", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asx3d"("public"."geometry", int4, int4); CREATE FUNCTION "public"."st_asx3d"(IN geom "public"."geometry", IN maxdecimaldigits int4 DEFAULT 15, IN "options" int4 DEFAULT 0) RETURNS "text" AS $BODY$SELECT _ST_AsX3D(3,$1,$2,$3,'');$BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asx3d"(IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asx3d"(IN geom "public"."geometry", IN maxdecimaldigits int4, IN "options" int4) IS 'args: g1, maxdecimaldigits=15, options=0 - Returns a Geometry in X3D xml node element format: ISO-IEC-19776-1.2-X3DEncodings-XML'; -- ---------------------------- -- Function structure for public.raster_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_in"(cstring); CREATE FUNCTION "public"."raster_in"(IN cstring) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_out("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_out"("public"."raster"); CREATE FUNCTION "public"."raster_out"(IN "public"."raster") RETURNS "cstring" AS '$libdir/rtpostgis-2.1','RASTER_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_out"(IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_raster_lib_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_raster_lib_version"(); CREATE FUNCTION "public"."postgis_raster_lib_version"() RETURNS "text" AS '$libdir/rtpostgis-2.1','RASTER_lib_version' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_raster_lib_version"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_raster_lib_version"() IS 'Reports full raster version and build configuration infos.'; -- ---------------------------- -- Function structure for public.postgis_raster_scripts_installed() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_raster_scripts_installed"(); CREATE FUNCTION "public"."postgis_raster_scripts_installed"() RETURNS "text" AS $BODY$ SELECT '2.1.0'::text || ' r' || 11822::text AS version $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_raster_scripts_installed"() OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.postgis_raster_lib_build_date() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_raster_lib_build_date"(); CREATE FUNCTION "public"."postgis_raster_lib_build_date"() RETURNS "text" AS '$libdir/rtpostgis-2.1','RASTER_lib_build_date' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_raster_lib_build_date"() OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."postgis_raster_lib_build_date"() IS 'Reports full raster library build date.'; -- ---------------------------- -- Function structure for public.postgis_gdal_version() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."postgis_gdal_version"(); CREATE FUNCTION "public"."postgis_gdal_version"() RETURNS "text" AS '$libdir/rtpostgis-2.1','RASTER_gdal_version' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."postgis_gdal_version"() OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_convexhull("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_convexhull"("public"."raster"); CREATE FUNCTION "public"."st_convexhull"(IN "public"."raster") RETURNS "public"."geometry" AS '$libdir/rtpostgis-2.1','RASTER_convex_hull' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_convexhull"(IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_minconvexhull("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_minconvexhull"("public"."raster", int4); CREATE FUNCTION "public"."st_minconvexhull"(IN rast "public"."raster", IN nband int4 DEFAULT NULL::integer) RETURNS "public"."geometry" AS '$libdir/rtpostgis-2.1','RASTER_convex_hull' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_minconvexhull"(IN rast "public"."raster", IN nband int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.box3d("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."box3d"("public"."raster"); CREATE FUNCTION "public"."box3d"(IN "public"."raster") RETURNS "public"."box3d" AS $BODY$select box3d(st_convexhull($1))$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."box3d"(IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_envelope("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_envelope"("public"."raster"); CREATE FUNCTION "public"."st_envelope"(IN "public"."raster") RETURNS "public"."geometry" AS $BODY$select st_envelope(st_convexhull($1))$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_envelope"(IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_height("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_height"("public"."raster"); CREATE FUNCTION "public"."st_height"(IN "public"."raster") RETURNS "int4" AS '$libdir/rtpostgis-2.1','RASTER_getHeight' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_height"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_height"(IN "public"."raster") IS 'args: rast - Returns the height of the raster in pixels.'; -- ---------------------------- -- Function structure for public.st_numbands("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_numbands"("public"."raster"); CREATE FUNCTION "public"."st_numbands"(IN "public"."raster") RETURNS "int4" AS '$libdir/rtpostgis-2.1','RASTER_getNumBands' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_numbands"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_numbands"(IN "public"."raster") IS 'args: rast - Returns the number of bands in the raster object.'; -- ---------------------------- -- Function structure for public.st_scalex("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_scalex"("public"."raster"); CREATE FUNCTION "public"."st_scalex"(IN "public"."raster") RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getXScale' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_scalex"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_scalex"(IN "public"."raster") IS 'args: rast - Returns the X component of the pixel width in units of coordinate reference system.'; -- ---------------------------- -- Function structure for public.st_scaley("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_scaley"("public"."raster"); CREATE FUNCTION "public"."st_scaley"(IN "public"."raster") RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getYScale' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_scaley"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_scaley"(IN "public"."raster") IS 'args: rast - Returns the Y component of the pixel height in units of coordinate reference system.'; -- ---------------------------- -- Function structure for public.st_skewx("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_skewx"("public"."raster"); CREATE FUNCTION "public"."st_skewx"(IN "public"."raster") RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getXSkew' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_skewx"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_skewx"(IN "public"."raster") IS 'args: rast - Returns the georeference X skew (or rotation parameter).'; -- ---------------------------- -- Function structure for public.st_skewy("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_skewy"("public"."raster"); CREATE FUNCTION "public"."st_skewy"(IN "public"."raster") RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getYSkew' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_skewy"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_skewy"(IN "public"."raster") IS 'args: rast - Returns the georeference Y skew (or rotation parameter).'; -- ---------------------------- -- Function structure for public.st_srid("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_srid"("public"."raster"); CREATE FUNCTION "public"."st_srid"(IN "public"."raster") RETURNS "int4" AS '$libdir/rtpostgis-2.1','RASTER_getSRID' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_srid"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_srid"(IN "public"."raster") IS 'args: rast - Returns the spatial reference identifier of the raster as defined in spatial_ref_sys table.'; -- ---------------------------- -- Function structure for public.st_upperleftx("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_upperleftx"("public"."raster"); CREATE FUNCTION "public"."st_upperleftx"(IN "public"."raster") RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getXUpperLeft' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_upperleftx"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_upperleftx"(IN "public"."raster") IS 'args: rast - Returns the upper left X coordinate of raster in projected spatial ref.'; -- ---------------------------- -- Function structure for public.st_upperlefty("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_upperlefty"("public"."raster"); CREATE FUNCTION "public"."st_upperlefty"(IN "public"."raster") RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getYUpperLeft' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_upperlefty"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_upperlefty"(IN "public"."raster") IS 'args: rast - Returns the upper left Y coordinate of raster in projected spatial ref.'; -- ---------------------------- -- Function structure for public.st_width("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_width"("public"."raster"); CREATE FUNCTION "public"."st_width"(IN "public"."raster") RETURNS "int4" AS '$libdir/rtpostgis-2.1','RASTER_getWidth' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_width"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_width"(IN "public"."raster") IS 'args: rast - Returns the width of the raster in pixels.'; -- ---------------------------- -- Function structure for public.st_pixelwidth("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelwidth"("public"."raster"); CREATE FUNCTION "public"."st_pixelwidth"(IN "public"."raster") RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getPixelWidth' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelwidth"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelwidth"(IN "public"."raster") IS 'args: rast - Returns the pixel width in geometric units of the spatial reference system.'; -- ---------------------------- -- Function structure for public.st_pixelheight("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelheight"("public"."raster"); CREATE FUNCTION "public"."st_pixelheight"(IN "public"."raster") RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getPixelHeight' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelheight"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelheight"(IN "public"."raster") IS 'args: rast - Returns the pixel height in geometric units of the spatial reference system.'; -- ---------------------------- -- Function structure for public.st_geotransform("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_geotransform"("public"."raster"); CREATE FUNCTION "public"."st_geotransform"(IN "public"."raster", OUT imag float8, OUT jmag float8, OUT theta_i float8, OUT theta_ij float8, OUT xoffset float8, OUT yoffset float8) RETURNS "record" AS '$libdir/rtpostgis-2.1','RASTER_getGeotransform' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_geotransform"(IN "public"."raster", OUT imag float8, OUT jmag float8, OUT theta_i float8, OUT theta_ij float8, OUT xoffset float8, OUT yoffset float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_rotation("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rotation"("public"."raster"); CREATE FUNCTION "public"."st_rotation"(IN "public"."raster") RETURNS "float8" AS $BODY$ SELECT (ST_Geotransform($1)).theta_i $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_rotation"(IN "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rotation"(IN "public"."raster") IS 'args: rast - Returns the rotation of the raster in radian.'; -- ---------------------------- -- Function structure for public.st_metadata("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_metadata"("public"."raster"); CREATE FUNCTION "public"."st_metadata"(IN rast "public"."raster", OUT upperleftx float8, OUT upperlefty float8, OUT width int4, OUT height int4, OUT scalex float8, OUT scaley float8, OUT skewx float8, OUT skewy float8, OUT srid int4, OUT numbands int4) RETURNS "record" AS '$libdir/rtpostgis-2.1','RASTER_metadata' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_metadata"(IN rast "public"."raster", OUT upperleftx float8, OUT upperlefty float8, OUT width int4, OUT height int4, OUT scalex float8, OUT scaley float8, OUT skewx float8, OUT skewy float8, OUT srid int4, OUT numbands int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_metadata"(IN rast "public"."raster", OUT upperleftx float8, OUT upperlefty float8, OUT width int4, OUT height int4, OUT scalex float8, OUT scaley float8, OUT skewx float8, OUT skewy float8, OUT srid int4, OUT numbands int4) IS 'args: rast - Returns basic meta data about a raster object such as pixel size, rotation (skew), upper, lower left, etc.'; -- ---------------------------- -- Function structure for public.st_summary("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_summary"("public"."raster"); CREATE FUNCTION "public"."st_summary"(IN rast "public"."raster") RETURNS "text" AS $BODY$ DECLARE extent box2d; metadata record; bandmetadata record; msg text; msgset text[]; BEGIN extent := ST_Extent(rast::geometry); metadata := ST_Metadata(rast); msg := 'Raster of ' || metadata.width || 'x' || metadata.height || ' pixels has ' || metadata.numbands || ' '; IF metadata.numbands = 1 THEN msg := msg || 'band '; ELSE msg := msg || 'bands '; END IF; msg := msg || 'and extent of ' || extent; IF metadata.skewx::numeric(16, 10) <> 0::numeric(16, 10) OR metadata.skewy::numeric(16, 10) <> 0::numeric(16, 10) THEN msg := 'Skewed ' || overlay(msg placing 'r' from 1 for 1); END IF; msgset := Array[]::text[] || msg; FOR bandmetadata IN SELECT * FROM ST_BandMetadata(rast, ARRAY[]::int[]) LOOP msg := 'band ' || bandmetadata.bandnum || ' of pixtype ' || bandmetadata.pixeltype || ' is '; IF bandmetadata.isoutdb IS FALSE THEN msg := msg || 'in-db '; ELSE msg := msg || 'out-db '; END IF; msg := msg || 'with '; IF bandmetadata.nodatavalue IS NOT NULL THEN msg := msg || 'NODATA value of ' || bandmetadata.nodatavalue; ELSE msg := msg || 'no NODATA value'; END IF; msgset := msgset || (' ' || msg); END LOOP; RETURN array_to_string(msgset, E'\n'); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_summary"(IN rast "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_summary"(IN rast "public"."raster") IS 'args: rast - Returns a text summary of the contents of the raster.'; -- ---------------------------- -- Function structure for public.st_makeemptyraster(int4, int4, float8, float8, float8, float8, float8, float8, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makeemptyraster"(int4, int4, float8, float8, float8, float8, float8, float8, int4); CREATE FUNCTION "public"."st_makeemptyraster"(IN width int4, IN height int4, IN upperleftx float8, IN upperlefty float8, IN scalex float8, IN scaley float8, IN skewx float8, IN skewy float8, IN srid int4 DEFAULT 0) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_makeEmpty' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makeemptyraster"(IN width int4, IN height int4, IN upperleftx float8, IN upperlefty float8, IN scalex float8, IN scaley float8, IN skewx float8, IN skewy float8, IN srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makeemptyraster"(IN width int4, IN height int4, IN upperleftx float8, IN upperlefty float8, IN scalex float8, IN scaley float8, IN skewx float8, IN skewy float8, IN srid int4) IS 'args: width, height, upperleftx, upperlefty, scalex, scaley, skewx, skewy, srid=unknown - Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). If a raster is passed in, returns a new raster with the same size, alignment and SRID. If srid is left out, the spatial ref is set to unknown (0).'; -- ---------------------------- -- Function structure for public.st_makeemptyraster(int4, int4, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makeemptyraster"(int4, int4, float8, float8, float8); CREATE FUNCTION "public"."st_makeemptyraster"(IN width int4, IN height int4, IN upperleftx float8, IN upperlefty float8, IN pixelsize float8) RETURNS "public"."raster" AS $BODY$ SELECT st_makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, ST_SRID('POINT(0 0)'::geometry)) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makeemptyraster"(IN width int4, IN height int4, IN upperleftx float8, IN upperlefty float8, IN pixelsize float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makeemptyraster"(IN width int4, IN height int4, IN upperleftx float8, IN upperlefty float8, IN pixelsize float8) IS 'args: width, height, upperleftx, upperlefty, pixelsize - Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). If a raster is passed in, returns a new raster with the same size, alignment and SRID. If srid is left out, the spatial ref is set to unknown (0).'; -- ---------------------------- -- Function structure for public.st_makeemptyraster("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_makeemptyraster"("public"."raster"); CREATE FUNCTION "public"."st_makeemptyraster"(IN rast "public"."raster") RETURNS "public"."raster" AS $BODY$ DECLARE w int; h int; ul_x double precision; ul_y double precision; scale_x double precision; scale_y double precision; skew_x double precision; skew_y double precision; sr_id int; BEGIN SELECT width, height, upperleftx, upperlefty, scalex, scaley, skewx, skewy, srid INTO w, h, ul_x, ul_y, scale_x, scale_y, skew_x, skew_y, sr_id FROM ST_Metadata(rast); RETURN st_makeemptyraster(w, h, ul_x, ul_y, scale_x, scale_y, skew_x, skew_y, sr_id); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_makeemptyraster"(IN rast "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_makeemptyraster"(IN rast "public"."raster") IS 'args: rast - Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). If a raster is passed in, returns a new raster with the same size, alignment and SRID. If srid is left out, the spatial ref is set to unknown (0).'; -- ---------------------------- -- Function structure for public.st_addband("public"."raster", "public"."_addbandarg") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addband"("public"."raster", "public"."_addbandarg"); CREATE FUNCTION "public"."st_addband"(IN rast "public"."raster", IN addbandargset "public"."_addbandarg") RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_addBand' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addband"(IN rast "public"."raster", IN addbandargset "public"."_addbandarg") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addband"(IN rast "public"."raster", IN addbandargset "public"."_addbandarg") IS 'args: rast, addbandargset - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; -- ---------------------------- -- Function structure for public.st_addband("public"."raster", int4, text, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addband"("public"."raster", int4, text, float8, float8); CREATE FUNCTION "public"."st_addband"(IN rast "public"."raster", IN "index" int4, IN pixeltype text, IN initialvalue float8 DEFAULT 0::numeric, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT st_addband($1, ARRAY[ROW($2, $3, $4, $5)]::addbandarg[]) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addband"(IN rast "public"."raster", IN "index" int4, IN pixeltype text, IN initialvalue float8, IN nodataval float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addband"(IN rast "public"."raster", IN "index" int4, IN pixeltype text, IN initialvalue float8, IN nodataval float8) IS 'args: rast, index, pixeltype, initialvalue=0, nodataval=NULL - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; -- ---------------------------- -- Function structure for public.st_addband("public"."raster", text, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addband"("public"."raster", text, float8, float8); CREATE FUNCTION "public"."st_addband"(IN rast "public"."raster", IN pixeltype text, IN initialvalue float8 DEFAULT 0::numeric, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT st_addband($1, ARRAY[ROW(NULL, $2, $3, $4)]::addbandarg[]) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addband"(IN rast "public"."raster", IN pixeltype text, IN initialvalue float8, IN nodataval float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addband"(IN rast "public"."raster", IN pixeltype text, IN initialvalue float8, IN nodataval float8) IS 'args: rast, pixeltype, initialvalue=0, nodataval=NULL - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; -- ---------------------------- -- Function structure for public.raster_left("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_left"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_left"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry << $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_left"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_addband("public"."raster", "public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addband"("public"."raster", "public"."raster", int4, int4); CREATE FUNCTION "public"."st_addband"(IN torast "public"."raster", IN fromrast "public"."raster", IN fromband int4 DEFAULT 1, IN torastindex int4 DEFAULT NULL::integer) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_copyBand' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addband"(IN torast "public"."raster", IN fromrast "public"."raster", IN fromband int4, IN torastindex int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addband"(IN torast "public"."raster", IN fromrast "public"."raster", IN fromband int4, IN torastindex int4) IS 'args: torast, fromrast, fromband=1, torastindex=at_end - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; -- ---------------------------- -- Function structure for public.st_addband("public"."raster", "public"."_raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addband"("public"."raster", "public"."_raster", int4, int4); CREATE FUNCTION "public"."st_addband"(IN torast "public"."raster", IN fromrasts "public"."_raster", IN fromband int4 DEFAULT 1, IN torastindex int4 DEFAULT NULL::integer) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_addBandRasterArray' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addband"(IN torast "public"."raster", IN fromrasts "public"."_raster", IN fromband int4, IN torastindex int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addband"(IN torast "public"."raster", IN fromrasts "public"."_raster", IN fromband int4, IN torastindex int4) IS 'args: torast, fromrasts, fromband=1, torastindex=at_end - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; -- ---------------------------- -- Function structure for public.st_addband("public"."raster", int4, text, _int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addband"("public"."raster", int4, text, _int4, float8); CREATE FUNCTION "public"."st_addband"(IN rast "public"."raster", IN "index" int4, IN outdbfile text, IN outdbindex _int4, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_addBandOutDB' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addband"(IN rast "public"."raster", IN "index" int4, IN outdbfile text, IN outdbindex _int4, IN nodataval float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addband"(IN rast "public"."raster", IN "index" int4, IN outdbfile text, IN outdbindex _int4, IN nodataval float8) IS 'args: rast, index, outdbfile, outdbindex, nodataval=NULL - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; -- ---------------------------- -- Function structure for public.st_addband("public"."raster", text, _int4, int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_addband"("public"."raster", text, _int4, int4, float8); CREATE FUNCTION "public"."st_addband"(IN rast "public"."raster", IN outdbfile text, IN outdbindex _int4, IN "index" int4 DEFAULT NULL::integer, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT ST_AddBand($1, $4, $2, $3, $5) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_addband"(IN rast "public"."raster", IN outdbfile text, IN outdbindex _int4, IN "index" int4, IN nodataval float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_addband"(IN rast "public"."raster", IN outdbfile text, IN outdbindex _int4, IN "index" int4, IN nodataval float8) IS 'args: rast, outdbfile, outdbindex, index=at_end, nodataval=NULL - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; -- ---------------------------- -- Function structure for public.st_band("public"."raster", _int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_band"("public"."raster", _int4); CREATE FUNCTION "public"."st_band"(IN rast "public"."raster", IN nbands _int4 DEFAULT ARRAY[1]) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_band' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_band"(IN rast "public"."raster", IN nbands _int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_band"(IN rast "public"."raster", IN nbands _int4) IS 'args: rast, nbands = ARRAY[1] - Returns one or more bands of an existing raster as a new raster. Useful for building new rasters from existing rasters.'; -- ---------------------------- -- Function structure for public.st_band("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_band"("public"."raster", int4); CREATE FUNCTION "public"."st_band"(IN rast "public"."raster", IN nband int4) RETURNS "public"."raster" AS $BODY$ SELECT st_band($1, ARRAY[$2]) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_band"(IN rast "public"."raster", IN nband int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_band"(IN rast "public"."raster", IN nband int4) IS 'args: rast, nband - Returns one or more bands of an existing raster as a new raster. Useful for building new rasters from existing rasters.'; -- ---------------------------- -- Function structure for public.st_band("public"."raster", text, bpchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_band"("public"."raster", text, bpchar); CREATE FUNCTION "public"."st_band"(IN rast "public"."raster", IN nbands text, IN "delimiter" bpchar DEFAULT ','::bpchar) RETURNS "public"."raster" AS $BODY$ SELECT st_band($1, regexp_split_to_array(regexp_replace($2, '[[:space:]]', '', 'g'), $3)::int[]) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_band"(IN rast "public"."raster", IN nbands text, IN "delimiter" bpchar) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_band"(IN rast "public"."raster", IN nbands text, IN "delimiter" bpchar) IS 'args: rast, nbands, delimiter=, - Returns one or more bands of an existing raster as a new raster. Useful for building new rasters from existing rasters.'; -- ---------------------------- -- Function structure for public._st_summarystats("public"."raster", int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_summarystats"("public"."raster", int4, bool, float8); CREATE FUNCTION "public"."_st_summarystats"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 1, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS '$libdir/rtpostgis-2.1','RASTER_summaryStats' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_summarystats"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_summarystats("public"."raster", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_summarystats"("public"."raster", int4, bool); CREATE FUNCTION "public"."st_summarystats"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, $3, 1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_summarystats"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_summarystats"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) IS 'args: rast, nband, exclude_nodata_value - Returns record consisting of count, sum, mean, stddev, min, max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.'; -- ---------------------------- -- Function structure for public.st_summarystats("public"."raster", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_summarystats"("public"."raster", bool); CREATE FUNCTION "public"."st_summarystats"(IN rast "public"."raster", IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, 1, $2, 1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_summarystats"(IN rast "public"."raster", IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_summarystats"(IN rast "public"."raster", IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) IS 'args: rast, exclude_nodata_value - Returns record consisting of count, sum, mean, stddev, min, max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.'; -- ---------------------------- -- Function structure for public.st_approxsummarystats("public"."raster", int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxsummarystats"("public"."raster", int4, bool, float8); CREATE FUNCTION "public"."st_approxsummarystats"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 0.1, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxsummarystats"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxsummarystats("public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxsummarystats"("public"."raster", int4, float8); CREATE FUNCTION "public"."st_approxsummarystats"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, TRUE, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxsummarystats"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxsummarystats("public"."raster", bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxsummarystats"("public"."raster", bool, float8); CREATE FUNCTION "public"."st_approxsummarystats"(IN rast "public"."raster", IN exclude_nodata_value bool, IN sample_percent float8 DEFAULT 0.1, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, 1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxsummarystats"(IN rast "public"."raster", IN exclude_nodata_value bool, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxsummarystats("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxsummarystats"("public"."raster", float8); CREATE FUNCTION "public"."st_approxsummarystats"(IN rast "public"."raster", IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, 1, TRUE, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxsummarystats"(IN rast "public"."raster", IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_summarystats(text, text, int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_summarystats"(text, text, int4, bool, float8); CREATE FUNCTION "public"."_st_summarystats"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 1, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS '$libdir/rtpostgis-2.1','RASTER_summaryStatsCoverage' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_summarystats"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_summarystats(text, text, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_summarystats"(text, text, int4, bool); CREATE FUNCTION "public"."st_summarystats"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, $3, $4, 1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_summarystats"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_summarystats"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true - Returns record consisting of count, sum, mean, stddev, min, max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.'; -- ---------------------------- -- Function structure for public.st_summarystats(text, text, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_summarystats"(text, text, bool); CREATE FUNCTION "public"."st_summarystats"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, 1, $3, 1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_summarystats"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_summarystats"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) IS 'args: rastertable, rastercolumn, exclude_nodata_value - Returns record consisting of count, sum, mean, stddev, min, max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.'; -- ---------------------------- -- Function structure for public.st_approxsummarystats(text, text, int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxsummarystats"(text, text, int4, bool, float8); CREATE FUNCTION "public"."st_approxsummarystats"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 0.1, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, $3, $4, $5) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxsummarystats"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxsummarystats(text, text, int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxsummarystats"(text, text, int4, float8); CREATE FUNCTION "public"."st_approxsummarystats"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, $3, TRUE, $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxsummarystats"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxsummarystats(text, text, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxsummarystats"(text, text, bool); CREATE FUNCTION "public"."st_approxsummarystats"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, 1, $3, 0.1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxsummarystats"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxsummarystats(text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxsummarystats"(text, text, float8); CREATE FUNCTION "public"."st_approxsummarystats"(IN rastertable text, IN rastercolumn text, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) RETURNS "record" AS $BODY$ SELECT _st_summarystats($1, $2, 1, TRUE, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxsummarystats"(IN rastertable text, IN rastercolumn text, IN sample_percent float8, OUT "count" int8, OUT "sum" float8, OUT mean float8, OUT stddev float8, OUT "min" float8, OUT "max" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_count("public"."raster", int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_count"("public"."raster", int4, bool, float8); CREATE FUNCTION "public"."_st_count"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 1) RETURNS "int8" AS $BODY$ DECLARE rtn bigint; BEGIN IF exclude_nodata_value IS FALSE THEN SELECT width * height INTO rtn FROM ST_Metadata(rast); ELSE SELECT count INTO rtn FROM _st_summarystats($1, $2, $3, $4); END IF; RETURN rtn; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_count"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_count("public"."raster", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_count"("public"."raster", int4, bool); CREATE FUNCTION "public"."st_count"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, $3, 1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_count"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_count"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool) IS 'args: rast, nband=1, exclude_nodata_value=true - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.'; -- ---------------------------- -- Function structure for public.st_count("public"."raster", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_count"("public"."raster", bool); CREATE FUNCTION "public"."st_count"(IN rast "public"."raster", IN exclude_nodata_value bool) RETURNS "int8" AS $BODY$ SELECT _st_count($1, 1, $2, 1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_count"(IN rast "public"."raster", IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_count"(IN rast "public"."raster", IN exclude_nodata_value bool) IS 'args: rast, exclude_nodata_value - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.'; -- ---------------------------- -- Function structure for public.st_approxcount("public"."raster", int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxcount"("public"."raster", int4, bool, float8); CREATE FUNCTION "public"."st_approxcount"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 0.1) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxcount"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxcount("public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxcount"("public"."raster", int4, float8); CREATE FUNCTION "public"."st_approxcount"(IN rast "public"."raster", IN nband int4, IN sample_percent float8) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, TRUE, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxcount"(IN rast "public"."raster", IN nband int4, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxcount("public"."raster", bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxcount"("public"."raster", bool, float8); CREATE FUNCTION "public"."st_approxcount"(IN rast "public"."raster", IN exclude_nodata_value bool, IN sample_percent float8 DEFAULT 0.1) RETURNS "int8" AS $BODY$ SELECT _st_count($1, 1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxcount"(IN rast "public"."raster", IN exclude_nodata_value bool, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxcount("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxcount"("public"."raster", float8); CREATE FUNCTION "public"."st_approxcount"(IN rast "public"."raster", IN sample_percent float8) RETURNS "int8" AS $BODY$ SELECT _st_count($1, 1, TRUE, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxcount"(IN rast "public"."raster", IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_count(text, text, int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_count"(text, text, int4, bool, float8); CREATE FUNCTION "public"."_st_count"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 1) RETURNS "int8" AS $BODY$ DECLARE curs refcursor; ctable text; ccolumn text; rast raster; rtn bigint; tmp bigint; BEGIN -- nband IF nband < 1 THEN RAISE WARNING 'Invalid band index (must use 1-based). Returning NULL'; RETURN NULL; END IF; -- sample percent IF sample_percent < 0 OR sample_percent > 1 THEN RAISE WARNING 'Invalid sample percentage (must be between 0 and 1). Returning NULL'; RETURN NULL; END IF; -- exclude_nodata_value IS TRUE IF exclude_nodata_value IS TRUE THEN SELECT count INTO rtn FROM _st_summarystats($1, $2, $3, $4, $5); RETURN rtn; END IF; -- clean rastertable and rastercolumn ctable := quote_ident(rastertable); ccolumn := quote_ident(rastercolumn); BEGIN OPEN curs FOR EXECUTE 'SELECT ' || ccolumn || ' FROM ' || ctable || ' WHERE ' || ccolumn || ' IS NOT NULL'; EXCEPTION WHEN OTHERS THEN RAISE WARNING 'Invalid table or column name. Returning NULL'; RETURN NULL; END; rtn := 0; LOOP FETCH curs INTO rast; EXIT WHEN NOT FOUND; SELECT (width * height) INTO tmp FROM ST_Metadata(rast); rtn := rtn + tmp; END LOOP; CLOSE curs; RETURN rtn; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_st_count"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_count(text, text, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_count"(text, text, int4, bool); CREATE FUNCTION "public"."st_count"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, $3, $4, 1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_count"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_count"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.'; -- ---------------------------- -- Function structure for public.st_count(text, text, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_count"(text, text, bool); CREATE FUNCTION "public"."st_count"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, 1, $3, 1) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_count"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_count"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool) IS 'args: rastertable, rastercolumn, exclude_nodata_value - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.'; -- ---------------------------- -- Function structure for public.st_approxcount(text, text, int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxcount"(text, text, int4, bool, float8); CREATE FUNCTION "public"."st_approxcount"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 0.1) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, $3, $4, $5) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxcount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxcount(text, text, int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxcount"(text, text, int4, float8); CREATE FUNCTION "public"."st_approxcount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, $3, TRUE, $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxcount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxcount(text, text, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxcount"(text, text, bool, float8); CREATE FUNCTION "public"."st_approxcount"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, IN sample_percent float8 DEFAULT 0.1) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, 1, $3, $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxcount"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxcount(text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxcount"(text, text, float8); CREATE FUNCTION "public"."st_approxcount"(IN rastertable text, IN rastercolumn text, IN sample_percent float8) RETURNS "int8" AS $BODY$ SELECT _st_count($1, $2, 1, TRUE, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxcount"(IN rastertable text, IN rastercolumn text, IN sample_percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_histogram("public"."raster", int4, bool, float8, int4, _float8, bool, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_histogram"("public"."raster", int4, bool, float8, int4, _float8, bool, float8, float8); CREATE FUNCTION "public"."_st_histogram"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 1, IN bins int4 DEFAULT 0, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, IN "min" float8 DEFAULT NULL::double precision, IN "max" float8 DEFAULT NULL::double precision, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_histogram' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_histogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN bins int4, IN width _float8, IN "right" bool, IN "min" float8, IN "max" float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, int4, bool, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, int4, bool, float8, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, $3, $4, $5, ARRAY[$6]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_histogram("public"."raster", int4, bool, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_histogram"("public"."raster", int4, bool, int4, _float8, bool); CREATE FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN bins int4 DEFAULT 0, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, $3, 1, $4, $5, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) IS 'args: rast, nband=1, exclude_nodata_value=true, bins=autocomputed, width=NULL, right=false - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; -- ---------------------------- -- Function structure for public.st_histogram("public"."raster", int4, bool, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_histogram"("public"."raster", int4, bool, int4, bool); CREATE FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, $3, 1, $4, NULL, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) IS 'args: rast, nband, exclude_nodata_value, bins, right - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; -- ---------------------------- -- Function structure for public.st_histogram("public"."raster", int4, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_histogram"("public"."raster", int4, int4, _float8, bool); CREATE FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN bins int4, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, 1, $3, $4, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) IS 'args: rast, nband, bins, width=NULL, right=false - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; -- ---------------------------- -- Function structure for public.st_histogram("public"."raster", int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_histogram"("public"."raster", int4, int4, bool); CREATE FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, 1, $3, NULL, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_histogram"(IN rast "public"."raster", IN nband int4, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) IS 'args: rast, nband, bins, right - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; -- ---------------------------- -- Function structure for public.st_approxhistogram("public"."raster", int4, bool, float8, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"("public"."raster", int4, bool, float8, int4, _float8, bool); CREATE FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 0.1, IN bins int4 DEFAULT 0, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, $3, $4, $5, $6, $7) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram("public"."raster", int4, bool, float8, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"("public"."raster", int4, bool, float8, int4, bool); CREATE FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, $3, $4, $5, NULL, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram("public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"("public"."raster", int4, float8); CREATE FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, $3, 0, NULL, FALSE) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"("public"."raster", float8); CREATE FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN sample_percent float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, 1, TRUE, $2, 0, NULL, FALSE) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN sample_percent float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram("public"."raster", int4, float8, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"("public"."raster", int4, float8, int4, _float8, bool); CREATE FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, IN bins int4, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, $3, $4, $5, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram("public"."raster", int4, float8, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"("public"."raster", int4, float8, int4, bool); CREATE FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, $3, $4, NULL, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram(text, text, int4, float8, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"(text, text, int4, float8, int4, _float8, bool); CREATE FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, IN bins int4, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, TRUE, $4, $5, $6, $7) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_histogram(text, text, int4, bool, float8, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_histogram"(text, text, int4, bool, float8, int4, _float8, bool); CREATE FUNCTION "public"."_st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 1, IN bins int4 DEFAULT 0, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_histogramCoverage' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_histogram(text, text, int4, bool, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_histogram"(text, text, int4, bool, int4, _float8, bool); CREATE FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN bins int4 DEFAULT 0, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, $4, 1, $5, $6, $7) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true, bins=autocomputed, width=NULL, right=false - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; -- ---------------------------- -- Function structure for public.st_histogram(text, text, int4, bool, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_histogram"(text, text, int4, bool, int4, bool); CREATE FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, $4, 1, $5, NULL, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) IS 'args: rastertable, rastercolumn, nband, exclude_nodata_value, bins, right - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; -- ---------------------------- -- Function structure for public.st_histogram(text, text, int4, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_histogram"(text, text, int4, int4, _float8, bool); CREATE FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN bins int4, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, TRUE, 1, $4, $5, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) IS 'args: rastertable, rastercolumn, nband=1, bins, width=NULL, right=false - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; -- ---------------------------- -- Function structure for public.st_histogram(text, text, int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_histogram"(text, text, int4, int4, bool); CREATE FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, TRUE, 1, $4, NULL, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_histogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) IS 'args: rastertable, rastercolumn, nband, bins, right - Returns a set of record summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; -- ---------------------------- -- Function structure for public.st_approxhistogram(text, text, int4, bool, float8, int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"(text, text, int4, bool, float8, int4, _float8, bool); CREATE FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 0.1, IN bins int4 DEFAULT 0, IN width _float8 DEFAULT NULL::double precision[], IN "right" bool DEFAULT false, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, $4, $5, $6, $7, $8) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN bins int4, IN width _float8, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram(text, text, int4, bool, float8, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"(text, text, int4, bool, float8, int4, bool); CREATE FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, $4, $5, $6, NULL, $7) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram(text, text, int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"(text, text, int4, float8); CREATE FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, TRUE, $4, 0, NULL, FALSE) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram(text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"(text, text, float8); CREATE FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN sample_percent float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, 1, TRUE, $3, 0, NULL, FALSE) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN sample_percent float8, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxhistogram(text, text, int4, float8, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxhistogram"(text, text, int4, float8, int4, bool); CREATE FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_histogram($1, $2, $3, TRUE, $4, $5, NULL, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxhistogram"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, IN bins int4, IN "right" bool, OUT "min" float8, OUT "max" float8, OUT "count" int8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_quantile("public"."raster", int4, bool, float8, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_quantile"("public"."raster", int4, bool, float8, _float8); CREATE FUNCTION "public"."_st_quantile"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 1, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_quantile' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_quantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_quantile("public"."raster", int4, bool, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"("public"."raster", int4, bool, _float8); CREATE FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, $3, 1, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN quantiles _float8, OUT quantile float8, OUT "value" float8) IS 'args: rast, nband=1, exclude_nodata_value=true, quantiles=NULL - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_quantile("public"."raster", int4, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"("public"."raster", int4, _float8); CREATE FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN quantiles _float8, OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, TRUE, 1, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN quantiles _float8, OUT quantile float8, OUT "value" float8) IS 'args: rast, nband, quantiles - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_quantile("public"."raster", _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"("public"."raster", _float8); CREATE FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN quantiles _float8, OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, 1, TRUE, 1, $2) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN quantiles _float8, OUT quantile float8, OUT "value" float8) IS 'args: rast, quantiles - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_quantile("public"."raster", int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"("public"."raster", int4, bool, float8); CREATE FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, $3, 1, ARRAY[$4]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN quantile float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN quantile float8) IS 'args: rast, nband, exclude_nodata_value, quantile - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_quantile("public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"("public"."raster", int4, float8); CREATE FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, TRUE, 1, ARRAY[$3]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN quantile float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN nband int4, IN quantile float8) IS 'args: rast, nband, quantile - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_quantile("public"."raster", bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"("public"."raster", bool, float8); CREATE FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN exclude_nodata_value bool, IN quantile float8 DEFAULT NULL::double precision) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, 1, $2, 1, ARRAY[$3]::double precision[])).value $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN exclude_nodata_value bool, IN quantile float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN exclude_nodata_value bool, IN quantile float8) IS 'args: rast, exclude_nodata_value, quantile=NULL - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_quantile("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"("public"."raster", float8); CREATE FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, 1, TRUE, 1, ARRAY[$2]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN quantile float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rast "public"."raster", IN quantile float8) IS 'args: rast, quantile - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", int4, bool, float8, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", int4, bool, float8, _float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 0.1, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, $3, $4, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", int4, float8, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", int4, float8, _float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, TRUE, $3, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", float8, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", float8, _float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN sample_percent float8, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, 1, TRUE, $2, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN sample_percent float8, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", _float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN quantiles _float8, OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, 1, TRUE, 0.1, $2) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", int4, bool, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", int4, bool, float8, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, $3, $4, ARRAY[$5]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", int4, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", int4, float8, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, TRUE, $3, ARRAY[$4]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN nband int4, IN sample_percent float8, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN sample_percent float8, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, 1, TRUE, $2, ARRAY[$3]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN sample_percent float8, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_setskew("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setskew"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_setskew"(IN rast "public"."raster", IN skewx float8, IN skewy float8) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setSkewXY' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setskew"(IN rast "public"."raster", IN skewx float8, IN skewy float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setskew"(IN rast "public"."raster", IN skewx float8, IN skewy float8) IS 'args: rast, skewx, skewy - Sets the georeference X and Y skew (or rotation parameter). If only one is passed in, sets X and Y to the same value.'; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", bool, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN exclude_nodata_value bool, IN quantile float8 DEFAULT NULL::double precision) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, 1, $2, 0.1, ARRAY[$3]::double precision[])).value $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN exclude_nodata_value bool, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"("public"."raster", float8); CREATE FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, 1, TRUE, 0.1, ARRAY[$2]::double precision[])).value $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rast "public"."raster", IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_quantile(text, text, int4, bool, float8, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_quantile"(text, text, int4, bool, float8, _float8); CREATE FUNCTION "public"."_st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 1, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_quantileCoverage' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_quantile(text, text, int4, bool, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"(text, text, int4, bool, _float8); CREATE FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, $3, $4, 1, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN quantiles _float8, OUT quantile float8, OUT "value" float8) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true, quantiles=NULL - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_quantile(text, text, int4, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"(text, text, int4, _float8); CREATE FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN quantiles _float8, OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, $3, TRUE, 1, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN quantiles _float8, OUT quantile float8, OUT "value" float8) IS 'args: rastertable, rastercolumn, nband, quantiles - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; -- ---------------------------- -- Function structure for public.st_quantile(text, text, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"(text, text, _float8); CREATE FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN quantiles _float8, OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, 1, TRUE, 1, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_quantile(text, text, int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"(text, text, int4, bool, float8); CREATE FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, $3, $4, 1, ARRAY[$5]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_quantile(text, text, int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"(text, text, int4, float8); CREATE FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, $3, TRUE, 1, ARRAY[$4]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_quantile(text, text, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"(text, text, bool, float8); CREATE FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, IN quantile float8 DEFAULT NULL::double precision) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, 1, $3, 1, ARRAY[$4]::double precision[])).value $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_quantile(text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_quantile"(text, text, float8); CREATE FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, 1, TRUE, 1, ARRAY[$3]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_quantile"(IN rastertable text, IN rastercolumn text, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, int4, bool, float8, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, int4, bool, float8, _float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN sample_percent float8 DEFAULT 0.1, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, $3, $4, $5, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN sample_percent float8, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, int4, float8, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, int4, float8, _float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, $3, TRUE, $4, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, float8, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, float8, _float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN sample_percent float8, IN quantiles _float8 DEFAULT NULL::double precision[], OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, 1, TRUE, $3, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN sample_percent float8, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, _float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN quantiles _float8, OUT quantile float8, OUT "value" float8) RETURNS SETOF "record" AS $BODY$ SELECT _st_quantile($1, $2, 1, TRUE, 0.1, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN quantiles _float8, OUT quantile float8, OUT "value" float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, int4, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, int4, float8, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, $3, TRUE, $4, ARRAY[$5]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN nband int4, IN sample_percent float8, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, float8, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN sample_percent float8, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, 1, TRUE, $3, ARRAY[$4]::double precision[])).value $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN sample_percent float8, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, bool, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, IN quantile float8 DEFAULT NULL::double precision) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, 1, $3, 0.1, ARRAY[$4]::double precision[])).value $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN exclude_nodata_value bool, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_approxquantile(text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_approxquantile"(text, text, float8); CREATE FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN quantile float8) RETURNS "float8" AS $BODY$ SELECT (_st_quantile($1, $2, 1, TRUE, 0.1, ARRAY[$3]::double precision[])).value $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_approxquantile"(IN rastertable text, IN rastercolumn text, IN quantile float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_valuecount("public"."raster", int4, bool, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_valuecount"("public"."raster", int4, bool, _float8, float8); CREATE FUNCTION "public"."_st_valuecount"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN searchvalues _float8 DEFAULT NULL::double precision[], IN roundto float8 DEFAULT 0, OUT "value" float8, OUT "count" int4, OUT percent float8) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_valueCount' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_valuecount"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuecount("public"."raster", int4, bool, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"("public"."raster", int4, bool, _float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN searchvalues _float8 DEFAULT NULL::double precision[], IN roundto float8 DEFAULT 0, OUT "value" float8, OUT "count" int4) RETURNS SETOF "record" AS $BODY$ SELECT value, count FROM _st_valuecount($1, $2, $3, $4, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) IS 'args: rast, nband=1, exclude_nodata_value=true, searchvalues=NULL, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount("public"."raster", int4, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"("public"."raster", int4, _float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN searchvalues _float8, IN roundto float8 DEFAULT 0, OUT "value" float8, OUT "count" int4) RETURNS SETOF "record" AS $BODY$ SELECT value, count FROM _st_valuecount($1, $2, TRUE, $3, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) IS 'args: rast, nband, searchvalues, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount("public"."raster", _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"("public"."raster", _float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN searchvalues _float8, IN roundto float8 DEFAULT 0, OUT "value" float8, OUT "count" int4) RETURNS SETOF "record" AS $BODY$ SELECT value, count FROM _st_valuecount($1, 1, TRUE, $2, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) IS 'args: rast, searchvalues, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount("public"."raster", int4, bool, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"("public"."raster", int4, bool, float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "int4" AS $BODY$ SELECT (_st_valuecount($1, $2, $3, ARRAY[$4]::double precision[], $5)).count $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8) IS 'args: rast, nband, exclude_nodata_value, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount("public"."raster", int4, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"("public"."raster", int4, float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "int4" AS $BODY$ SELECT (_st_valuecount($1, $2, TRUE, ARRAY[$3]::double precision[], $4)).count $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN nband int4, IN searchvalue float8, IN roundto float8) IS 'args: rast, nband, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "int4" AS $BODY$ SELECT (_st_valuecount($1, 1, TRUE, ARRAY[$2]::double precision[], $3)).count $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rast "public"."raster", IN searchvalue float8, IN roundto float8) IS 'args: rast, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount(text, text, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"(text, text, _float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN searchvalues _float8, IN roundto float8 DEFAULT 0, OUT "value" float8, OUT "count" int4) RETURNS SETOF "record" AS $BODY$ SELECT value, count FROM _st_valuecount($1, $2, 1, TRUE, $3, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) IS 'args: rastertable, rastercolumn, searchvalues, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuepercent("public"."raster", int4, bool, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"("public"."raster", int4, bool, _float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN searchvalues _float8 DEFAULT NULL::double precision[], IN roundto float8 DEFAULT 0, OUT "value" float8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT value, percent FROM _st_valuecount($1, $2, $3, $4, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent("public"."raster", int4, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"("public"."raster", int4, _float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN nband int4, IN searchvalues _float8, IN roundto float8 DEFAULT 0, OUT "value" float8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT value, percent FROM _st_valuecount($1, $2, TRUE, $3, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN nband int4, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent("public"."raster", _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"("public"."raster", _float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN searchvalues _float8, IN roundto float8 DEFAULT 0, OUT "value" float8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT value, percent FROM _st_valuecount($1, 1, TRUE, $2, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent("public"."raster", int4, bool, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"("public"."raster", int4, bool, float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "float8" AS $BODY$ SELECT (_st_valuecount($1, $2, $3, ARRAY[$4]::double precision[], $5)).percent $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent("public"."raster", int4, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"("public"."raster", int4, float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN nband int4, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "float8" AS $BODY$ SELECT (_st_valuecount($1, $2, TRUE, ARRAY[$3]::double precision[], $4)).percent $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN nband int4, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "float8" AS $BODY$ SELECT (_st_valuecount($1, 1, TRUE, ARRAY[$2]::double precision[], $3)).percent $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rast "public"."raster", IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_valuecount(text, text, int4, bool, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_valuecount"(text, text, int4, bool, _float8, float8); CREATE FUNCTION "public"."_st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN searchvalues _float8 DEFAULT NULL::double precision[], IN roundto float8 DEFAULT 0, OUT "value" float8, OUT "count" int4, OUT percent float8) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_valueCountCoverage' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuecount(text, text, int4, bool, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"(text, text, int4, bool, _float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN searchvalues _float8 DEFAULT NULL::double precision[], IN roundto float8 DEFAULT 0, OUT "value" float8, OUT "count" int4) RETURNS SETOF "record" AS $BODY$ SELECT value, count FROM _st_valuecount($1, $2, $3, $4, $5, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true, searchvalues=NULL, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount(text, text, int4, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"(text, text, int4, _float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalues _float8, IN roundto float8 DEFAULT 0, OUT "value" float8, OUT "count" int4) RETURNS SETOF "record" AS $BODY$ SELECT value, count FROM _st_valuecount($1, $2, $3, TRUE, $4, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT "count" int4) IS 'args: rastertable, rastercolumn, nband, searchvalues, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_setsrid("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setsrid"("public"."raster", int4); CREATE FUNCTION "public"."st_setsrid"(IN rast "public"."raster", IN srid int4) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setSRID' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setsrid"(IN rast "public"."raster", IN srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setsrid"(IN rast "public"."raster", IN srid int4) IS 'args: rast, srid - Sets the SRID of a raster to a particular integer srid defined in the spatial_ref_sys table.'; -- ---------------------------- -- Function structure for public.st_valuecount(text, text, int4, bool, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"(text, text, int4, bool, float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "int4" AS $BODY$ SELECT (_st_valuecount($1, $2, $3, $4, ARRAY[$5]::double precision[], $6)).count $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8) IS 'args: rastertable, rastercolumn, nband, exclude_nodata_value, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount(text, text, int4, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"(text, text, int4, float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "int4" AS $BODY$ SELECT (_st_valuecount($1, $2, $3, TRUE, ARRAY[$4]::double precision[], $5)).count $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalue float8, IN roundto float8) IS 'args: rastertable, rastercolumn, nband, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuecount(text, text, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuecount"(text, text, float8, float8); CREATE FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "int4" AS $BODY$ SELECT (_st_valuecount($1, $2, 1, TRUE, ARRAY[$3]::double precision[], $4)).count $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_valuecount"(IN rastertable text, IN rastercolumn text, IN searchvalue float8, IN roundto float8) IS 'args: rastertable, rastercolumn, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; -- ---------------------------- -- Function structure for public.st_valuepercent(text, text, int4, bool, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"(text, text, int4, bool, _float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN nband int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, IN searchvalues _float8 DEFAULT NULL::double precision[], IN roundto float8 DEFAULT 0, OUT "value" float8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT value, percent FROM _st_valuecount($1, $2, $3, $4, $5, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent(text, text, int4, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"(text, text, int4, _float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalues _float8, IN roundto float8 DEFAULT 0, OUT "value" float8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT value, percent FROM _st_valuecount($1, $2, $3, TRUE, $4, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent(text, text, _float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"(text, text, _float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN searchvalues _float8, IN roundto float8 DEFAULT 0, OUT "value" float8, OUT percent float8) RETURNS SETOF "record" AS $BODY$ SELECT value, percent FROM _st_valuecount($1, $2, 1, TRUE, $3, $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN searchvalues _float8, IN roundto float8, OUT "value" float8, OUT percent float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent(text, text, int4, bool, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"(text, text, int4, bool, float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "float8" AS $BODY$ SELECT (_st_valuecount($1, $2, $3, $4, ARRAY[$5]::double precision[], $6)).percent $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN nband int4, IN exclude_nodata_value bool, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent(text, text, int4, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"(text, text, int4, float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "float8" AS $BODY$ SELECT (_st_valuecount($1, $2, $3, TRUE, ARRAY[$4]::double precision[], $5)).percent $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN nband int4, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_valuepercent(text, text, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_valuepercent"(text, text, float8, float8); CREATE FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN searchvalue float8, IN roundto float8 DEFAULT 0) RETURNS "float8" AS $BODY$ SELECT (_st_valuecount($1, $2, 1, TRUE, ARRAY[$3]::double precision[], $4)).percent $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_valuepercent"(IN rastertable text, IN rastercolumn text, IN searchvalue float8, IN roundto float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_reclass("public"."raster", "public"."_reclassarg") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_reclass"("public"."raster", "public"."_reclassarg"); CREATE FUNCTION "public"."_st_reclass"(IN rast "public"."raster", INOUT reclassargset "public"."_reclassarg") RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_reclass' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_reclass"(IN rast "public"."raster", INOUT reclassargset "public"."_reclassarg") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_reclass("public"."raster", "public"."_reclassarg") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_reclass"("public"."raster", "public"."_reclassarg"); CREATE FUNCTION "public"."st_reclass"(IN rast "public"."raster", INOUT reclassargset "public"."_reclassarg") RETURNS "public"."raster" AS $BODY$ DECLARE i int; expr text; BEGIN -- for each reclassarg, validate elements as all except nodataval cannot be NULL FOR i IN SELECT * FROM generate_subscripts($2, 1) LOOP IF $2[i].nband IS NULL OR $2[i].reclassexpr IS NULL OR $2[i].pixeltype IS NULL THEN RAISE WARNING 'Values are required for the nband, reclassexpr and pixeltype attributes.'; RETURN rast; END IF; END LOOP; RETURN _st_reclass($1, VARIADIC $2); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_reclass"(IN rast "public"."raster", INOUT reclassargset "public"."_reclassarg") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_setupperleft("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setupperleft"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_setupperleft"(IN rast "public"."raster", IN upperleftx float8, IN upperlefty float8) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setUpperLeftXY' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setupperleft"(IN rast "public"."raster", IN upperleftx float8, IN upperlefty float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setupperleft"(IN rast "public"."raster", IN upperleftx float8, IN upperlefty float8) IS 'args: rast, x, y - Sets the value of the upper left corner of the pixel to projected X and Y coordinates.'; -- ---------------------------- -- Function structure for public.st_reclass("public"."raster", int4, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_reclass"("public"."raster", int4, text, text, float8); CREATE FUNCTION "public"."st_reclass"(IN rast "public"."raster", IN nband int4, IN reclassexpr text, IN pixeltype text, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT st_reclass($1, ROW($2, $3, $4, $5)) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_reclass"(IN rast "public"."raster", IN nband int4, IN reclassexpr text, IN pixeltype text, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_reclass("public"."raster", text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_reclass"("public"."raster", text, text); CREATE FUNCTION "public"."st_reclass"(IN rast "public"."raster", IN reclassexpr text, IN pixeltype text) RETURNS "public"."raster" AS $BODY$ SELECT st_reclass($1, ROW(1, $2, $3, NULL)) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_reclass"(IN rast "public"."raster", IN reclassexpr text, IN pixeltype text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_colormap("public"."raster", int4, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_colormap"("public"."raster", int4, text, text); CREATE FUNCTION "public"."_st_colormap"(IN rast "public"."raster", IN nband int4, IN colormap text, IN "method" text DEFAULT 'INTERPOLATE'::text) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_colorMap' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_colormap"(IN rast "public"."raster", IN nband int4, IN colormap text, IN "method" text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_colormap("public"."raster", int4, text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_colormap"("public"."raster", int4, text, text); CREATE FUNCTION "public"."st_colormap"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN colormap text DEFAULT 'grayscale'::text, IN "method" text DEFAULT 'INTERPOLATE'::text) RETURNS "public"."raster" AS $BODY$ DECLARE _ismap boolean; _colormap text; _element text[]; BEGIN _ismap := TRUE; -- clean colormap to see what it is _colormap := split_part(colormap, E'\n', 1); _colormap := regexp_replace(_colormap, E':+', ' ', 'g'); _colormap := regexp_replace(_colormap, E',+', ' ', 'g'); _colormap := regexp_replace(_colormap, E'\\t+', ' ', 'g'); _colormap := regexp_replace(_colormap, E' +', ' ', 'g'); _element := regexp_split_to_array(_colormap, ' '); -- treat as colormap IF (array_length(_element, 1) > 1) THEN _colormap := colormap; -- treat as keyword ELSE method := 'INTERPOLATE'; CASE lower(trim(both from _colormap)) WHEN 'grayscale', 'greyscale' THEN _colormap := ' 100% 0 0% 254 nv 255 '; WHEN 'pseudocolor' THEN _colormap := ' 100% 255 0 0 255 50% 0 255 0 255 0% 0 0 255 255 nv 0 0 0 0 '; WHEN 'fire' THEN _colormap := ' 100% 243 255 221 255 93.75% 242 255 178 255 87.5% 255 255 135 255 81.25% 255 228 96 255 75% 255 187 53 255 68.75% 255 131 7 255 62.5% 255 84 0 255 56.25% 255 42 0 255 50% 255 0 0 255 43.75% 255 42 0 255 37.5% 224 74 0 255 31.25% 183 91 0 255 25% 140 93 0 255 18.75% 99 82 0 255 12.5% 58 58 1 255 6.25% 12 15 0 255 0% 0 0 0 255 nv 0 0 0 0 '; WHEN 'bluered' THEN _colormap := ' 100.00% 165 0 33 255 94.12% 216 21 47 255 88.24% 247 39 53 255 82.35% 255 61 61 255 76.47% 255 120 86 255 70.59% 255 172 117 255 64.71% 255 214 153 255 58.82% 255 241 188 255 52.94% 255 255 234 255 47.06% 234 255 255 255 41.18% 188 249 255 255 35.29% 153 234 255 255 29.41% 117 211 255 255 23.53% 86 176 255 255 17.65% 61 135 255 255 11.76% 40 87 255 255 5.88% 24 28 247 255 0.00% 36 0 216 255 nv 0 0 0 0 '; ELSE RAISE EXCEPTION 'Unknown colormap keyword: %', colormap; END CASE; END IF; RETURN _st_colormap($1, $2, _colormap, $4); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_colormap"(IN rast "public"."raster", IN nband int4, IN colormap text, IN "method" text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_colormap("public"."raster", text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_colormap"("public"."raster", text, text); CREATE FUNCTION "public"."st_colormap"(IN rast "public"."raster", IN colormap text, IN "method" text DEFAULT 'INTERPOLATE'::text) RETURNS "public"."raster" AS $BODY$ SELECT ST_ColorMap($1, 1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_colormap"(IN rast "public"."raster", IN colormap text, IN "method" text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_fromgdalraster(bytea, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_fromgdalraster"(bytea, int4); CREATE FUNCTION "public"."st_fromgdalraster"(IN gdaldata bytea, IN srid int4 DEFAULT NULL::integer) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_fromGDALRaster' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_fromgdalraster"(IN gdaldata bytea, IN srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_fromgdalraster"(IN gdaldata bytea, IN srid int4) IS 'args: gdaldata, srid=NULL - Returns a raster from a supported GDAL raster file.'; -- ---------------------------- -- Function structure for public.st_gdaldrivers() -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_gdaldrivers"(); CREATE FUNCTION "public"."st_gdaldrivers"(OUT idx int4, OUT short_name text, OUT long_name text, OUT create_options text) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_getGDALDrivers' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_gdaldrivers"(OUT idx int4, OUT short_name text, OUT long_name text, OUT create_options text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_gdaldrivers"(OUT idx int4, OUT short_name text, OUT long_name text, OUT create_options text) IS 'args: OUT idx, OUT short_name, OUT long_name, OUT create_options - Returns a list of raster formats supported by your lib gdal. These are the formats you can output your raster using ST_AsGDALRaster.'; -- ---------------------------- -- Function structure for public.st_asgdalraster("public"."raster", text, _text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asgdalraster"("public"."raster", text, _text, int4); CREATE FUNCTION "public"."st_asgdalraster"(IN rast "public"."raster", IN format text, IN "options" _text DEFAULT NULL::text[], IN srid int4 DEFAULT NULL::integer) RETURNS "bytea" AS '$libdir/rtpostgis-2.1','RASTER_asGDALRaster' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asgdalraster"(IN rast "public"."raster", IN format text, IN "options" _text, IN srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asgdalraster"(IN rast "public"."raster", IN format text, IN "options" _text, IN srid int4) IS 'args: rast, format, options=NULL, srid=sameassource - Return the raster tile in the designated GDAL Raster format. Raster formats are one of those supported by your compiled library. Use ST_GDALRasters() to get a list of formats supported by your library.'; -- ---------------------------- -- Function structure for public.st_astiff("public"."raster", _text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_astiff"("public"."raster", _text, int4); CREATE FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN "options" _text DEFAULT NULL::text[], IN srid int4 DEFAULT NULL::integer) RETURNS "bytea" AS $BODY$ DECLARE i int; num_bands int; nodata double precision; last_nodata double precision; BEGIN num_bands := st_numbands($1); -- TIFF only allows one NODATA value for ALL bands FOR i IN 1..num_bands LOOP nodata := st_bandnodatavalue($1, i); IF last_nodata IS NULL THEN last_nodata := nodata; ELSEIF nodata != last_nodata THEN RAISE NOTICE 'The TIFF format only permits one NODATA value for all bands. The value used will be the last band with a NODATA value.'; END IF; END LOOP; RETURN st_asgdalraster($1, 'GTiff', $2, $3); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN "options" _text, IN srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN "options" _text, IN srid int4) IS 'args: rast, options='', srid=sameassource - Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands.'; -- ---------------------------- -- Function structure for public.st_astiff("public"."raster", _int4, _text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_astiff"("public"."raster", _int4, _text, int4); CREATE FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN nbands _int4, IN "options" _text DEFAULT NULL::text[], IN srid int4 DEFAULT NULL::integer) RETURNS "bytea" AS $BODY$ SELECT st_astiff(st_band($1, $2), $3, $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN nbands _int4, IN "options" _text, IN srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN nbands _int4, IN "options" _text, IN srid int4) IS 'args: rast, nbands, options, srid=sameassource - Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands.'; -- ---------------------------- -- Function structure for public.st_astiff("public"."raster", text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_astiff"("public"."raster", text, int4); CREATE FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN compression text, IN srid int4 DEFAULT NULL::integer) RETURNS "bytea" AS $BODY$ DECLARE compression2 text; c_type text; c_level int; i int; num_bands int; options text[]; BEGIN compression2 := trim(both from upper(compression)); IF length(compression2) > 0 THEN -- JPEG IF position('JPEG' in compression2) != 0 THEN c_type := 'JPEG'; c_level := substring(compression2 from '[0-9]+$'); IF c_level IS NOT NULL THEN IF c_level > 100 THEN c_level := 100; ELSEIF c_level < 1 THEN c_level := 1; END IF; options := array_append(options, 'JPEG_QUALITY=' || c_level); END IF; -- per band pixel type check num_bands := st_numbands($1); FOR i IN 1..num_bands LOOP IF st_bandpixeltype($1, i) != '8BUI' THEN RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI. JPEG compression can only be used with the 8BUI pixel type.', i; END IF; END LOOP; -- DEFLATE ELSEIF position('DEFLATE' in compression2) != 0 THEN c_type := 'DEFLATE'; c_level := substring(compression2 from '[0-9]+$'); IF c_level IS NOT NULL THEN IF c_level > 9 THEN c_level := 9; ELSEIF c_level < 1 THEN c_level := 1; END IF; options := array_append(options, 'ZLEVEL=' || c_level); END IF; ELSE c_type := compression2; -- CCITT IF position('CCITT' in compression2) THEN -- per band pixel type check num_bands := st_numbands($1); FOR i IN 1..num_bands LOOP IF st_bandpixeltype($1, i) != '1BB' THEN RAISE EXCEPTION 'The pixel type of band % in the raster is not 1BB. CCITT compression can only be used with the 1BB pixel type.', i; END IF; END LOOP; END IF; END IF; -- compression type check IF ARRAY[c_type] <@ ARRAY['JPEG', 'LZW', 'PACKBITS', 'DEFLATE', 'CCITTRLE', 'CCITTFAX3', 'CCITTFAX4', 'NONE'] THEN options := array_append(options, 'COMPRESS=' || c_type); ELSE RAISE NOTICE 'Unknown compression type: %. The outputted TIFF will not be COMPRESSED.', c_type; END IF; END IF; RETURN st_astiff($1, options, $3); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN compression text, IN srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN compression text, IN srid int4) IS 'args: rast, compression='', srid=sameassource - Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands.'; -- ---------------------------- -- Function structure for public.st_setrotation("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setrotation"("public"."raster", float8); CREATE FUNCTION "public"."st_setrotation"(IN rast "public"."raster", IN rotation float8) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setRotation' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setrotation"(IN rast "public"."raster", IN rotation float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setrotation"(IN rast "public"."raster", IN rotation float8) IS 'args: rast, rotation - Set the rotation of the raster in radian.'; -- ---------------------------- -- Function structure for public.st_astiff("public"."raster", _int4, text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_astiff"("public"."raster", _int4, text, int4); CREATE FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN nbands _int4, IN compression text, IN srid int4 DEFAULT NULL::integer) RETURNS "bytea" AS $BODY$ SELECT st_astiff(st_band($1, $2), $3, $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN nbands _int4, IN compression text, IN srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_astiff"(IN rast "public"."raster", IN nbands _int4, IN compression text, IN srid int4) IS 'args: rast, nbands, compression='', srid=sameassource - Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands.'; -- ---------------------------- -- Function structure for public.st_asjpeg("public"."raster", _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asjpeg"("public"."raster", _text); CREATE FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN "options" _text DEFAULT NULL::text[]) RETURNS "bytea" AS $BODY$ DECLARE rast2 raster; num_bands int; i int; BEGIN num_bands := st_numbands($1); -- JPEG allows 1 or 3 bands IF num_bands <> 1 AND num_bands <> 3 THEN RAISE NOTICE 'The JPEG format only permits one or three bands. The first band will be used.'; rast2 := st_band(rast, ARRAY[1]); num_bands := st_numbands(rast); ELSE rast2 := rast; END IF; -- JPEG only supports 8BUI pixeltype FOR i IN 1..num_bands LOOP IF st_bandpixeltype(rast, i) != '8BUI' THEN RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI. The JPEG format can only be used with the 8BUI pixel type.', i; END IF; END LOOP; RETURN st_asgdalraster(rast2, 'JPEG', $2, NULL); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN "options" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN "options" _text) IS 'args: rast, options=NULL - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; -- ---------------------------- -- Function structure for public.st_asjpeg("public"."raster", _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asjpeg"("public"."raster", _int4, _text); CREATE FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nbands _int4, IN "options" _text DEFAULT NULL::text[]) RETURNS "bytea" AS $BODY$ SELECT st_asjpeg(st_band($1, $2), $3) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nbands _int4, IN "options" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nbands _int4, IN "options" _text) IS 'args: rast, nbands, options=NULL - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; -- ---------------------------- -- Function structure for public.st_asjpeg("public"."raster", _int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asjpeg"("public"."raster", _int4, int4); CREATE FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nbands _int4, IN quality int4) RETURNS "bytea" AS $BODY$ DECLARE quality2 int; options text[]; BEGIN IF quality IS NOT NULL THEN IF quality > 100 THEN quality2 := 100; ELSEIF quality < 10 THEN quality2 := 10; ELSE quality2 := quality; END IF; options := array_append(options, 'QUALITY=' || quality2); END IF; RETURN st_asjpeg(st_band($1, $2), options); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nbands _int4, IN quality int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nbands _int4, IN quality int4) IS 'args: rast, nbands, quality - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; -- ---------------------------- -- Function structure for public.st_asjpeg("public"."raster", int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asjpeg"("public"."raster", int4, _text); CREATE FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nband int4, IN "options" _text DEFAULT NULL::text[]) RETURNS "bytea" AS $BODY$ SELECT st_asjpeg(st_band($1, $2), $3) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nband int4, IN "options" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nband int4, IN "options" _text) IS 'args: rast, nband, options=NULL - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; -- ---------------------------- -- Function structure for public.st_asjpeg("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asjpeg"("public"."raster", int4, int4); CREATE FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nband int4, IN quality int4) RETURNS "bytea" AS $BODY$ SELECT st_asjpeg($1, ARRAY[$2], $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nband int4, IN quality int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asjpeg"(IN rast "public"."raster", IN nband int4, IN quality int4) IS 'args: rast, nband, quality - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; -- ---------------------------- -- Function structure for public.st_aspng("public"."raster", _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aspng"("public"."raster", _text); CREATE FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN "options" _text DEFAULT NULL::text[]) RETURNS "bytea" AS $BODY$ DECLARE rast2 raster; num_bands int; i int; pt text; BEGIN num_bands := st_numbands($1); -- PNG allows 1, 3 or 4 bands IF num_bands <> 1 AND num_bands <> 3 AND num_bands <> 4 THEN RAISE NOTICE 'The PNG format only permits one, three or four bands. The first band will be used.'; rast2 := st_band($1, ARRAY[1]); num_bands := st_numbands(rast2); ELSE rast2 := rast; END IF; -- PNG only supports 8BUI and 16BUI pixeltype FOR i IN 1..num_bands LOOP pt = st_bandpixeltype(rast, i); IF pt != '8BUI' AND pt != '16BUI' THEN RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types.', i; END IF; END LOOP; RETURN st_asgdalraster(rast2, 'PNG', $2, NULL); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN "options" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN "options" _text) IS 'args: rast, options=NULL - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; -- ---------------------------- -- Function structure for public.st_aspng("public"."raster", _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aspng"("public"."raster", _int4, _text); CREATE FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nbands _int4, IN "options" _text DEFAULT NULL::text[]) RETURNS "bytea" AS $BODY$ SELECT st_aspng(st_band($1, $2), $3) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nbands _int4, IN "options" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nbands _int4, IN "options" _text) IS 'args: rast, nbands, options=NULL - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; -- ---------------------------- -- Function structure for public.st_aspng("public"."raster", _int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aspng"("public"."raster", _int4, int4); CREATE FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nbands _int4, IN compression int4) RETURNS "bytea" AS $BODY$ DECLARE compression2 int; options text[]; BEGIN IF compression IS NOT NULL THEN IF compression > 9 THEN compression2 := 9; ELSEIF compression < 1 THEN compression2 := 1; ELSE compression2 := compression; END IF; options := array_append(options, 'ZLEVEL=' || compression2); END IF; RETURN st_aspng(st_band($1, $2), options); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nbands _int4, IN compression int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nbands _int4, IN compression int4) IS 'args: rast, nbands, compression - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; -- ---------------------------- -- Function structure for public.st_aspng("public"."raster", int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aspng"("public"."raster", int4, _text); CREATE FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nband int4, IN "options" _text DEFAULT NULL::text[]) RETURNS "bytea" AS $BODY$ SELECT st_aspng(st_band($1, $2), $3) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nband int4, IN "options" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nband int4, IN "options" _text) IS 'args: rast, nband, options=NULL - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; -- ---------------------------- -- Function structure for public.st_aspng("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aspng"("public"."raster", int4, int4); CREATE FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nband int4, IN compression int4) RETURNS "bytea" AS $BODY$ SELECT st_aspng($1, ARRAY[$2], $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nband int4, IN compression int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_aspng"(IN rast "public"."raster", IN nband int4, IN compression int4) IS 'args: rast, nband, compression - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; -- ---------------------------- -- Function structure for public._st_asraster("public"."geometry", float8, float8, int4, int4, _text, _float8, _float8, float8, float8, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_asraster"("public"."geometry", float8, float8, int4, int4, _text, _float8, _float8, float8, float8, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."_st_asraster"(IN geom "public"."geometry", IN scalex float8 DEFAULT 0, IN scaley float8 DEFAULT 0, IN width int4 DEFAULT 0, IN height int4 DEFAULT 0, IN pixeltype _text DEFAULT ARRAY['8BUI'::text], IN "value" _float8 DEFAULT ARRAY[(1)::double precision], IN nodataval _float8 DEFAULT ARRAY[(0)::double precision], IN upperleftx float8 DEFAULT NULL::double precision, IN upperlefty float8 DEFAULT NULL::double precision, IN gridx float8 DEFAULT NULL::double precision, IN gridy float8 DEFAULT NULL::double precision, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_asRaster' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN width int4, IN height int4, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN upperleftx float8, IN upperlefty float8, IN gridx float8, IN gridy float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", float8, float8, float8, float8, _text, _float8, _float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", float8, float8, float8, float8, _text, _float8, _float8, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN gridx float8 DEFAULT NULL::double precision, IN gridy float8 DEFAULT NULL::double precision, IN pixeltype _text DEFAULT ARRAY['8BUI'::text], IN "value" _float8 DEFAULT ARRAY[(1)::double precision], IN nodataval _float8 DEFAULT ARRAY[(0)::double precision], IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_asraster($1, $2, $3, NULL, NULL, $6, $7, $8, NULL, NULL, $4, $5, $9, $10, $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN gridx float8, IN gridy float8, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN gridx float8, IN gridy float8, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN skewx float8, IN skewy float8, IN touched bool) IS 'args: geom, scalex, scaley, gridx=NULL, gridy=NULL, pixeltype=ARRAY[''8BUI''], value=ARRAY[1], nodataval=ARRAY[0], skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", float8, float8, _text, _float8, _float8, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", float8, float8, _text, _float8, _float8, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN pixeltype _text, IN "value" _float8 DEFAULT ARRAY[(1)::double precision], IN nodataval _float8 DEFAULT ARRAY[(0)::double precision], IN upperleftx float8 DEFAULT NULL::double precision, IN upperlefty float8 DEFAULT NULL::double precision, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_asraster($1, $2, $3, NULL, NULL, $4, $5, $6, $7, $8, NULL, NULL, $9, $10, $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN upperleftx float8, IN upperlefty float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN upperleftx float8, IN upperlefty float8, IN skewx float8, IN skewy float8, IN touched bool) IS 'args: geom, scalex, scaley, pixeltype, value=ARRAY[1], nodataval=ARRAY[0], upperleftx=NULL, upperlefty=NULL, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", int4, int4, float8, float8, _text, _float8, _float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", int4, int4, float8, float8, _text, _float8, _float8, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN gridx float8 DEFAULT NULL::double precision, IN gridy float8 DEFAULT NULL::double precision, IN pixeltype _text DEFAULT ARRAY['8BUI'::text], IN "value" _float8 DEFAULT ARRAY[(1)::double precision], IN nodataval _float8 DEFAULT ARRAY[(0)::double precision], IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_asraster($1, NULL, NULL, $2, $3, $6, $7, $8, NULL, NULL, $4, $5, $9, $10, $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN gridx float8, IN gridy float8, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN gridx float8, IN gridy float8, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN skewx float8, IN skewy float8, IN touched bool) IS 'args: geom, width, height, gridx=NULL, gridy=NULL, pixeltype=ARRAY[''8BUI''], value=ARRAY[1], nodataval=ARRAY[0], skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", int4, int4, _text, _float8, _float8, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", int4, int4, _text, _float8, _float8, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN pixeltype _text, IN "value" _float8 DEFAULT ARRAY[(1)::double precision], IN nodataval _float8 DEFAULT ARRAY[(0)::double precision], IN upperleftx float8 DEFAULT NULL::double precision, IN upperlefty float8 DEFAULT NULL::double precision, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_asraster($1, NULL, NULL, $2, $3, $4, $5, $6, $7, $8, NULL, NULL, $9, $10, $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN upperleftx float8, IN upperlefty float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN upperleftx float8, IN upperlefty float8, IN skewx float8, IN skewy float8, IN touched bool) IS 'args: geom, width, height, pixeltype, value=ARRAY[1], nodataval=ARRAY[0], upperleftx=NULL, upperlefty=NULL, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", float8, float8, float8, float8, text, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", float8, float8, float8, float8, text, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN gridx float8, IN gridy float8, IN pixeltype text, IN "value" float8 DEFAULT 1, IN nodataval float8 DEFAULT 0, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_asraster($1, $2, $3, NULL, NULL, ARRAY[$6]::text[], ARRAY[$7]::double precision[], ARRAY[$8]::double precision[], NULL, NULL, $4, $5, $9, $10, $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN gridx float8, IN gridy float8, IN pixeltype text, IN "value" float8, IN nodataval float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN gridx float8, IN gridy float8, IN pixeltype text, IN "value" float8, IN nodataval float8, IN skewx float8, IN skewy float8, IN touched bool) IS 'args: geom, scalex, scaley, gridx, gridy, pixeltype, value=1, nodataval=0, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", float8, float8, text, float8, float8, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", float8, float8, text, float8, float8, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN pixeltype text, IN "value" float8 DEFAULT 1, IN nodataval float8 DEFAULT 0, IN upperleftx float8 DEFAULT NULL::double precision, IN upperlefty float8 DEFAULT NULL::double precision, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_asraster($1, $2, $3, NULL, NULL, ARRAY[$4]::text[], ARRAY[$5]::double precision[], ARRAY[$6]::double precision[], $7, $8, NULL, NULL, $9, $10, $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN pixeltype text, IN "value" float8, IN nodataval float8, IN upperleftx float8, IN upperlefty float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN scalex float8, IN scaley float8, IN pixeltype text, IN "value" float8, IN nodataval float8, IN upperleftx float8, IN upperlefty float8, IN skewx float8, IN skewy float8, IN touched bool) IS 'args: geom, scalex, scaley, pixeltype, value=1, nodataval=0, upperleftx=NULL, upperlefty=NULL, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", int4, int4, float8, float8, text, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", int4, int4, float8, float8, text, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN gridx float8, IN gridy float8, IN pixeltype text, IN "value" float8 DEFAULT 1, IN nodataval float8 DEFAULT 0, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_asraster($1, NULL, NULL, $2, $3, ARRAY[$6]::text[], ARRAY[$7]::double precision[], ARRAY[$8]::double precision[], NULL, NULL, $4, $5, $9, $10, $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN gridx float8, IN gridy float8, IN pixeltype text, IN "value" float8, IN nodataval float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN gridx float8, IN gridy float8, IN pixeltype text, IN "value" float8, IN nodataval float8, IN skewx float8, IN skewy float8, IN touched bool) IS 'args: geom, width, height, gridx, gridy, pixeltype, value=1, nodataval=0, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", int4, int4, text, float8, float8, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", int4, int4, text, float8, float8, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN pixeltype text, IN "value" float8 DEFAULT 1, IN nodataval float8 DEFAULT 0, IN upperleftx float8 DEFAULT NULL::double precision, IN upperlefty float8 DEFAULT NULL::double precision, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_asraster($1, NULL, NULL, $2, $3, ARRAY[$4]::text[], ARRAY[$5]::double precision[], ARRAY[$6]::double precision[], $7, $8, NULL, NULL,$9, $10, $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN pixeltype text, IN "value" float8, IN nodataval float8, IN upperleftx float8, IN upperlefty float8, IN skewx float8, IN skewy float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN width int4, IN height int4, IN pixeltype text, IN "value" float8, IN nodataval float8, IN upperleftx float8, IN upperlefty float8, IN skewx float8, IN skewy float8, IN touched bool) IS 'args: geom, width, height, pixeltype, value=1, nodataval=0, upperleftx=NULL, upperlefty=NULL, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", "public"."raster", _text, _float8, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", "public"."raster", _text, _float8, _float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN "ref" "public"."raster", IN pixeltype _text DEFAULT ARRAY['8BUI'::text], IN "value" _float8 DEFAULT ARRAY[(1)::double precision], IN nodataval _float8 DEFAULT ARRAY[(0)::double precision], IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ DECLARE g geometry; g_srid integer; ul_x double precision; ul_y double precision; scale_x double precision; scale_y double precision; skew_x double precision; skew_y double precision; sr_id integer; BEGIN SELECT upperleftx, upperlefty, scalex, scaley, skewx, skewy, srid INTO ul_x, ul_y, scale_x, scale_y, skew_x, skew_y, sr_id FROM ST_Metadata(ref); --RAISE NOTICE '%, %, %, %, %, %, %', ul_x, ul_y, scale_x, scale_y, skew_x, skew_y, sr_id; -- geometry and raster has different SRID g_srid := ST_SRID(geom); IF g_srid != sr_id THEN RAISE NOTICE 'The geometry''s SRID (%) is not the same as the raster''s SRID (%). The geometry will be transformed to the raster''s projection', g_srid, sr_id; g := ST_Transform(geom, sr_id); ELSE g := geom; END IF; RETURN _st_asraster(g, scale_x, scale_y, NULL, NULL, $3, $4, $5, NULL, NULL, ul_x, ul_y, skew_x, skew_y, $6); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN "ref" "public"."raster", IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN "ref" "public"."raster", IN pixeltype _text, IN "value" _float8, IN nodataval _float8, IN touched bool) IS 'args: geom, ref, pixeltype=ARRAY[''8BUI''], value=ARRAY[1], nodataval=ARRAY[0], touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public.st_asraster("public"."geometry", "public"."raster", text, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asraster"("public"."geometry", "public"."raster", text, float8, float8, bool); CREATE FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN "ref" "public"."raster", IN pixeltype text, IN "value" float8 DEFAULT 1, IN nodataval float8 DEFAULT 0, IN touched bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT st_asraster($1, $2, ARRAY[$3]::text[], ARRAY[$4]::double precision[], ARRAY[$5]::double precision[], $6) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN "ref" "public"."raster", IN pixeltype text, IN "value" float8, IN nodataval float8, IN touched bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asraster"(IN geom "public"."geometry", IN "ref" "public"."raster", IN pixeltype text, IN "value" float8, IN nodataval float8, IN touched bool) IS 'args: geom, ref, pixeltype, value=1, nodataval=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; -- ---------------------------- -- Function structure for public._st_gdalwarp("public"."raster", text, float8, int4, float8, float8, float8, float8, float8, float8, int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_gdalwarp"("public"."raster", text, float8, int4, float8, float8, float8, float8, float8, float8, int4, int4); CREATE FUNCTION "public"."_st_gdalwarp"(IN rast "public"."raster", IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125, IN srid int4 DEFAULT NULL::integer, IN scalex float8 DEFAULT 0, IN scaley float8 DEFAULT 0, IN gridx float8 DEFAULT NULL::double precision, IN gridy float8 DEFAULT NULL::double precision, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN width int4 DEFAULT NULL::integer, IN height int4 DEFAULT NULL::integer) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_GDALWarp' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_st_gdalwarp"(IN rast "public"."raster", IN algorithm text, IN maxerr float8, IN srid int4, IN scalex float8, IN scaley float8, IN gridx float8, IN gridy float8, IN skewx float8, IN skewy float8, IN width int4, IN height int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_resample("public"."raster", float8, float8, float8, float8, float8, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_resample"("public"."raster", float8, float8, float8, float8, float8, float8, text, float8); CREATE FUNCTION "public"."st_resample"(IN rast "public"."raster", IN scalex float8 DEFAULT 0, IN scaley float8 DEFAULT 0, IN gridx float8 DEFAULT NULL::double precision, IN gridy float8 DEFAULT NULL::double precision, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $8, $9, NULL, $2, $3, $4, $5, $6, $7) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_resample"(IN rast "public"."raster", IN scalex float8, IN scaley float8, IN gridx float8, IN gridy float8, IN skewx float8, IN skewy float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_resample"(IN rast "public"."raster", IN scalex float8, IN scaley float8, IN gridx float8, IN gridy float8, IN skewx float8, IN skewy float8, IN algorithm text, IN maxerr float8) IS 'args: rast, scalex=0, scaley=0, gridx=NULL, gridy=NULL, skewx=0, skewy=0, algorithm=NearestNeighbor, maxerr=0.125 - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster.'; -- ---------------------------- -- Function structure for public.st_resample("public"."raster", int4, int4, float8, float8, float8, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_resample"("public"."raster", int4, int4, float8, float8, float8, float8, text, float8); CREATE FUNCTION "public"."st_resample"(IN rast "public"."raster", IN width int4, IN height int4, IN gridx float8 DEFAULT NULL::double precision, IN gridy float8 DEFAULT NULL::double precision, IN skewx float8 DEFAULT 0, IN skewy float8 DEFAULT 0, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $8, $9, NULL, NULL, NULL, $4, $5, $6, $7, $2, $3) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_resample"(IN rast "public"."raster", IN width int4, IN height int4, IN gridx float8, IN gridy float8, IN skewx float8, IN skewy float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_resample"(IN rast "public"."raster", IN width int4, IN height int4, IN gridx float8, IN gridy float8, IN skewx float8, IN skewy float8, IN algorithm text, IN maxerr float8) IS 'args: rast, width, height, gridx=NULL, gridy=NULL, skewx=0, skewy=0, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster.'; -- ---------------------------- -- Function structure for public.st_resample("public"."raster", "public"."raster", text, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_resample"("public"."raster", "public"."raster", text, float8, bool); CREATE FUNCTION "public"."st_resample"(IN rast "public"."raster", IN "ref" "public"."raster", IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125, IN usescale bool DEFAULT true) RETURNS "public"."raster" AS $BODY$ DECLARE rastsrid int; _srid int; _dimx int; _dimy int; _scalex double precision; _scaley double precision; _gridx double precision; _gridy double precision; _skewx double precision; _skewy double precision; BEGIN SELECT srid, width, height, scalex, scaley, upperleftx, upperlefty, skewx, skewy INTO _srid, _dimx, _dimy, _scalex, _scaley, _gridx, _gridy, _skewx, _skewy FROM st_metadata($2); rastsrid := ST_SRID($1); -- both rasters must have the same SRID IF (rastsrid != _srid) THEN RAISE EXCEPTION 'The raster to be resampled has a different SRID from the reference raster'; RETURN NULL; END IF; IF usescale IS TRUE THEN _dimx := NULL; _dimy := NULL; ELSE _scalex := NULL; _scaley := NULL; END IF; RETURN _st_gdalwarp($1, $3, $4, NULL, _scalex, _scaley, _gridx, _gridy, _skewx, _skewy, _dimx, _dimy); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_resample"(IN rast "public"."raster", IN "ref" "public"."raster", IN algorithm text, IN maxerr float8, IN usescale bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_resample"(IN rast "public"."raster", IN "ref" "public"."raster", IN algorithm text, IN maxerr float8, IN usescale bool) IS 'args: rast, ref, algorithm=NearestNeighbour, maxerr=0.125, usescale=true - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster.'; -- ---------------------------- -- Function structure for public.st_resample("public"."raster", "public"."raster", bool, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_resample"("public"."raster", "public"."raster", bool, text, float8); CREATE FUNCTION "public"."st_resample"(IN rast "public"."raster", IN "ref" "public"."raster", IN usescale bool, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT st_resample($1, $2, $4, $5, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_resample"(IN rast "public"."raster", IN "ref" "public"."raster", IN usescale bool, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_resample"(IN rast "public"."raster", IN "ref" "public"."raster", IN usescale bool, IN algorithm text, IN maxerr float8) IS 'args: rast, ref, usescale, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster.'; -- ---------------------------- -- Function structure for public.st_transform("public"."raster", int4, text, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_transform"("public"."raster", int4, text, float8, float8, float8); CREATE FUNCTION "public"."st_transform"(IN rast "public"."raster", IN srid int4, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125, IN scalex float8 DEFAULT 0, IN scaley float8 DEFAULT 0) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $3, $4, $2, $5, $6) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_transform"(IN rast "public"."raster", IN srid int4, IN algorithm text, IN maxerr float8, IN scalex float8, IN scaley float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_transform"(IN rast "public"."raster", IN srid int4, IN algorithm text, IN maxerr float8, IN scalex float8, IN scaley float8) IS 'args: rast, srid, algorithm=NearestNeighbor, maxerr=0.125, scalex, scaley - Reprojects a raster in a known spatial reference system to another known spatial reference system using specified resampling algorithm. Options are NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_transform("public"."raster", int4, float8, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_transform"("public"."raster", int4, float8, float8, text, float8); CREATE FUNCTION "public"."st_transform"(IN rast "public"."raster", IN srid int4, IN scalex float8, IN scaley float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $5, $6, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_transform"(IN rast "public"."raster", IN srid int4, IN scalex float8, IN scaley float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_transform"(IN rast "public"."raster", IN srid int4, IN scalex float8, IN scaley float8, IN algorithm text, IN maxerr float8) IS 'args: rast, srid, scalex, scaley, algorithm=NearestNeighbor, maxerr=0.125 - Reprojects a raster in a known spatial reference system to another known spatial reference system using specified resampling algorithm. Options are NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_transform("public"."raster", int4, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_transform"("public"."raster", int4, float8, text, float8); CREATE FUNCTION "public"."st_transform"(IN rast "public"."raster", IN srid int4, IN scalexy float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $4, $5, $2, $3, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_transform"(IN rast "public"."raster", IN srid int4, IN scalexy float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_transform("public"."raster", "public"."raster", text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_transform"("public"."raster", "public"."raster", text, float8); CREATE FUNCTION "public"."st_transform"(IN rast "public"."raster", IN alignto "public"."raster", IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ DECLARE _srid integer; _scalex double precision; _scaley double precision; _gridx double precision; _gridy double precision; _skewx double precision; _skewy double precision; BEGIN SELECT srid, scalex, scaley, upperleftx, upperlefty, skewx, skewy INTO _srid, _scalex, _scaley, _gridx, _gridy, _skewx, _skewy FROM st_metadata($2); RETURN _st_gdalwarp($1, $3, $4, _srid, _scalex, _scaley, _gridx, _gridy, _skewx, _skewy, NULL, NULL); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_transform"(IN rast "public"."raster", IN alignto "public"."raster", IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_transform"(IN rast "public"."raster", IN alignto "public"."raster", IN algorithm text, IN maxerr float8) IS 'args: rast, alignto, algorithm=NearestNeighbor, maxerr=0.125 - Reprojects a raster in a known spatial reference system to another known spatial reference system using specified resampling algorithm. Options are NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_rescale("public"."raster", float8, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rescale"("public"."raster", float8, float8, text, float8); CREATE FUNCTION "public"."st_rescale"(IN rast "public"."raster", IN scalex float8, IN scaley float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $4, $5, NULL, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_rescale"(IN rast "public"."raster", IN scalex float8, IN scaley float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rescale"(IN rast "public"."raster", IN scalex float8, IN scaley float8, IN algorithm text, IN maxerr float8) IS 'args: rast, scalex, scaley, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by adjusting only its scale (or pixel size). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_rescale("public"."raster", float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rescale"("public"."raster", float8, text, float8); CREATE FUNCTION "public"."st_rescale"(IN rast "public"."raster", IN scalexy float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $3, $4, NULL, $2, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_rescale"(IN rast "public"."raster", IN scalexy float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rescale"(IN rast "public"."raster", IN scalexy float8, IN algorithm text, IN maxerr float8) IS 'args: rast, scalexy, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by adjusting only its scale (or pixel size). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_reskew("public"."raster", float8, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_reskew"("public"."raster", float8, float8, text, float8); CREATE FUNCTION "public"."st_reskew"(IN rast "public"."raster", IN skewx float8, IN skewy float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $4, $5, NULL, 0, 0, NULL, NULL, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_reskew"(IN rast "public"."raster", IN skewx float8, IN skewy float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_reskew"(IN rast "public"."raster", IN skewx float8, IN skewy float8, IN algorithm text, IN maxerr float8) IS 'args: rast, skewx, skewy, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by adjusting only its skew (or rotation parameters). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_setgeotransform("public"."raster", float8, float8, float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setgeotransform"("public"."raster", float8, float8, float8, float8, float8, float8); CREATE FUNCTION "public"."st_setgeotransform"(IN rast "public"."raster", IN imag float8, IN jmag float8, IN theta_i float8, IN theta_ij float8, IN xoffset float8, IN yoffset float8) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setGeotransform' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setgeotransform"(IN rast "public"."raster", IN imag float8, IN jmag float8, IN theta_i float8, IN theta_ij float8, IN xoffset float8, IN yoffset float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_reskew("public"."raster", float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_reskew"("public"."raster", float8, text, float8); CREATE FUNCTION "public"."st_reskew"(IN rast "public"."raster", IN skewxy float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $3, $4, NULL, 0, 0, NULL, NULL, $2, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_reskew"(IN rast "public"."raster", IN skewxy float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_reskew"(IN rast "public"."raster", IN skewxy float8, IN algorithm text, IN maxerr float8) IS 'args: rast, skewxy, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by adjusting only its skew (or rotation parameters). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_snaptogrid("public"."raster", float8, float8, text, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_snaptogrid"("public"."raster", float8, float8, text, float8, float8, float8); CREATE FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125, IN scalex float8 DEFAULT 0, IN scaley float8 DEFAULT 0) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $4, $5, NULL, $6, $7, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN algorithm text, IN maxerr float8, IN scalex float8, IN scaley float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN algorithm text, IN maxerr float8, IN scalex float8, IN scaley float8) IS 'args: rast, gridx, gridy, algorithm=NearestNeighbour, maxerr=0.125, scalex=DEFAULT 0, scaley=DEFAULT 0 - Resample a raster by snapping it to a grid. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_snaptogrid("public"."raster", float8, float8, float8, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_snaptogrid"("public"."raster", float8, float8, float8, float8, text, float8); CREATE FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN scalex float8, IN scaley float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $6, $7, NULL, $4, $5, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN scalex float8, IN scaley float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN scalex float8, IN scaley float8, IN algorithm text, IN maxerr float8) IS 'args: rast, gridx, gridy, scalex, scaley, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by snapping it to a grid. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_snaptogrid("public"."raster", float8, float8, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_snaptogrid"("public"."raster", float8, float8, float8, text, float8); CREATE FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN scalexy float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $5, $6, NULL, $4, $4, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN scalexy float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_snaptogrid"(IN rast "public"."raster", IN gridx float8, IN gridy float8, IN scalexy float8, IN algorithm text, IN maxerr float8) IS 'args: rast, gridx, gridy, scalexy, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by snapping it to a grid. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; -- ---------------------------- -- Function structure for public.st_resize("public"."raster", text, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_resize"("public"."raster", text, text, text, float8); CREATE FUNCTION "public"."st_resize"(IN rast "public"."raster", IN width text, IN height text, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ DECLARE i integer; wh text[2]; whi integer[2]; whd double precision[2]; _width integer; _height integer; BEGIN wh[1] := trim(both from $2); wh[2] := trim(both from $3); -- see if width and height are percentages FOR i IN 1..2 LOOP IF position('%' in wh[i]) > 0 THEN BEGIN wh[i] := (regexp_matches(wh[i], E'^(\\d*.?\\d*)%{1}$'))[1]; IF length(wh[i]) < 1 THEN RAISE invalid_parameter_value; END IF; whd[i] := wh[i]::double precision * 0.01; EXCEPTION WHEN OTHERS THEN RAISE EXCEPTION 'Invalid percentage value provided for width/height'; RETURN NULL; END; ELSE BEGIN whi[i] := abs(wh[i]::integer); EXCEPTION WHEN OTHERS THEN RAISE EXCEPTION 'Non-integer value provided for width/height'; RETURN NULL; END; END IF; END LOOP; IF whd[1] IS NOT NULL OR whd[2] IS NOT NULL THEN SELECT foo.width, foo.height INTO _width, _height FROM ST_Metadata($1) AS foo; IF whd[1] IS NOT NULL THEN whi[1] := round(_width::double precision * whd[1])::integer; END IF; IF whd[2] IS NOT NULL THEN whi[2] := round(_height::double precision * whd[2])::integer; END IF; END IF; -- should NEVER be here IF whi[1] IS NULL OR whi[2] IS NULL THEN RAISE EXCEPTION 'Unable to determine appropriate width or height'; RETURN NULL; END IF; FOR i IN 1..2 LOOP IF whi[i] < 1 THEN whi[i] = 1; END IF; END LOOP; RETURN _st_gdalwarp( $1, $4, $5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, whi[1], whi[2] ); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_resize"(IN rast "public"."raster", IN width text, IN height text, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_resize"(IN rast "public"."raster", IN width text, IN height text, IN algorithm text, IN maxerr float8) IS 'args: rast, width, height, algorithm=NearestNeighbor, maxerr=0.125 - Resize a raster to a new width/height'; -- ---------------------------- -- Function structure for public.st_resize("public"."raster", int4, int4, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_resize"("public"."raster", int4, int4, text, float8); CREATE FUNCTION "public"."st_resize"(IN rast "public"."raster", IN width int4, IN height int4, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ SELECT _st_gdalwarp($1, $4, $5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, abs($2), abs($3)) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_resize"(IN rast "public"."raster", IN width int4, IN height int4, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_resize"(IN rast "public"."raster", IN width int4, IN height int4, IN algorithm text, IN maxerr float8) IS 'args: rast, width, height, algorithm=NearestNeighbor, maxerr=0.125 - Resize a raster to a new width/height'; -- ---------------------------- -- Function structure for public.st_resize("public"."raster", float8, float8, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_resize"("public"."raster", float8, float8, text, float8); CREATE FUNCTION "public"."st_resize"(IN rast "public"."raster", IN percentwidth float8, IN percentheight float8, IN algorithm text DEFAULT 'NearestNeighbour'::text, IN maxerr float8 DEFAULT 0.125) RETURNS "public"."raster" AS $BODY$ DECLARE _width integer; _height integer; BEGIN -- range check IF $2 <= 0. OR $2 > 1. OR $3 <= 0. OR $3 > 1. THEN RAISE EXCEPTION 'Percentages must be a value greater than zero and less than or equal to one, e.g. 0.5 for 50%%'; END IF; SELECT width, height INTO _width, _height FROM ST_Metadata($1); _width := round(_width::double precision * $2)::integer; _height:= round(_height::double precision * $3)::integer; IF _width < 1 THEN _width := 1; END IF; IF _height < 1 THEN _height := 1; END IF; RETURN _st_gdalwarp( $1, $4, $5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, _width, _height ); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_resize"(IN rast "public"."raster", IN percentwidth float8, IN percentheight float8, IN algorithm text, IN maxerr float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_resize"(IN rast "public"."raster", IN percentwidth float8, IN percentheight float8, IN algorithm text, IN maxerr float8) IS 'args: rast, percentwidth, percentheight, algorithm=NearestNeighbor, maxerr=0.125 - Resize a raster to a new width/height'; -- ---------------------------- -- Function structure for public.st_mapalgebraexpr("public"."raster", int4, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebraexpr"("public"."raster", int4, text, text, float8); CREATE FUNCTION "public"."st_mapalgebraexpr"(IN rast "public"."raster", IN band int4, IN pixeltype text, IN expression text, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_mapAlgebraExpr' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mapalgebraexpr"(IN rast "public"."raster", IN band int4, IN pixeltype text, IN expression text, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebraexpr("public"."raster", text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebraexpr"("public"."raster", text, text, float8); CREATE FUNCTION "public"."st_mapalgebraexpr"(IN rast "public"."raster", IN pixeltype text, IN expression text, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebraexpr($1, 1, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_mapalgebraexpr"(IN rast "public"."raster", IN pixeltype text, IN expression text, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", int4, text, regprocedure, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", int4, text, regprocedure, _text); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN band int4, IN pixeltype text, IN onerastuserfunc regprocedure, INOUT args _text) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_mapAlgebraFct' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN band int4, IN pixeltype text, IN onerastuserfunc regprocedure, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", int4, text, regprocedure) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", int4, text, regprocedure); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN band int4, IN pixeltype text, IN onerastuserfunc regprocedure) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebrafct($1, $2, $3, $4, NULL) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN band int4, IN pixeltype text, IN onerastuserfunc regprocedure) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", int4, regprocedure, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", int4, regprocedure, _text); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN band int4, IN onerastuserfunc regprocedure, INOUT args _text) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebrafct($1, $2, NULL, $3, VARIADIC $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN band int4, IN onerastuserfunc regprocedure, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", int4, regprocedure) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", int4, regprocedure); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN band int4, IN onerastuserfunc regprocedure) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebrafct($1, $2, NULL, $3, NULL) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN band int4, IN onerastuserfunc regprocedure) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", text, regprocedure, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", text, regprocedure, _text); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN pixeltype text, IN onerastuserfunc regprocedure, INOUT args _text) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebrafct($1, 1, $2, $3, VARIADIC $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN pixeltype text, IN onerastuserfunc regprocedure, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", text, regprocedure) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", text, regprocedure); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN pixeltype text, IN onerastuserfunc regprocedure) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebrafct($1, 1, $2, $3, NULL) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN pixeltype text, IN onerastuserfunc regprocedure) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", regprocedure, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", regprocedure, _text); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN onerastuserfunc regprocedure, INOUT args _text) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebrafct($1, 1, NULL, $2, VARIADIC $3) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN onerastuserfunc regprocedure, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", regprocedure) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", regprocedure); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN onerastuserfunc regprocedure) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebrafct($1, 1, NULL, $2, NULL) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast "public"."raster", IN onerastuserfunc regprocedure) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebraexpr("public"."raster", int4, "public"."raster", int4, text, text, text, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebraexpr"("public"."raster", int4, "public"."raster", int4, text, text, text, text, text, float8); CREATE FUNCTION "public"."st_mapalgebraexpr"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN expression text, IN pixeltype text DEFAULT NULL::text, IN extenttype text DEFAULT 'INTERSECTION'::text, IN nodata1expr text DEFAULT NULL::text, IN nodata2expr text DEFAULT NULL::text, IN nodatanodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_mapAlgebra2' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebraexpr"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN expression text, IN pixeltype text, IN extenttype text, IN nodata1expr text, IN nodata2expr text, IN nodatanodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebraexpr("public"."raster", "public"."raster", text, text, text, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebraexpr"("public"."raster", "public"."raster", text, text, text, text, text, float8); CREATE FUNCTION "public"."st_mapalgebraexpr"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN expression text, IN pixeltype text DEFAULT NULL::text, IN extenttype text DEFAULT 'INTERSECTION'::text, IN nodata1expr text DEFAULT NULL::text, IN nodata2expr text DEFAULT NULL::text, IN nodatanodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebraexpr($1, 1, $2, 1, $3, $4, $5, $6, $7, $8) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebraexpr"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN expression text, IN pixeltype text, IN extenttype text, IN nodata1expr text, IN nodata2expr text, IN nodatanodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", int4, "public"."raster", int4, regprocedure, text, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", int4, "public"."raster", int4, regprocedure, text, text, _text); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN tworastuserfunc regprocedure DEFAULT NULL::text, IN pixeltype text DEFAULT 'INTERSECTION'::text, IN extenttype text DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_mapAlgebra2' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN tworastuserfunc regprocedure, IN pixeltype text, IN extenttype text, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafct("public"."raster", "public"."raster", regprocedure, text, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafct"("public"."raster", "public"."raster", regprocedure, text, text, _text); CREATE FUNCTION "public"."st_mapalgebrafct"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN tworastuserfunc regprocedure DEFAULT NULL::text, IN pixeltype text DEFAULT 'INTERSECTION'::text, IN extenttype text DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebrafct($1, 1, $2, 1, $3, $4, $5, VARIADIC $6) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebrafct"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN tworastuserfunc regprocedure, IN pixeltype text, IN extenttype text, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebra("public"."raster", text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebra"("public"."raster", text, text, float8); CREATE FUNCTION "public"."st_mapalgebra"(IN rast "public"."raster", IN pixeltype text, IN expression text, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebra($1, 1, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebra"(IN rast "public"."raster", IN pixeltype text, IN expression text, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebrafctngb("public"."raster", int4, text, int4, int4, regprocedure, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebrafctngb"("public"."raster", int4, text, int4, int4, regprocedure, text, _text); CREATE FUNCTION "public"."st_mapalgebrafctngb"(IN rast "public"."raster", IN band int4, IN pixeltype text, IN ngbwidth int4, IN ngbheight int4, IN onerastngbuserfunc regprocedure, IN nodatamode text, INOUT args _text) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_mapAlgebraFctNgb' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mapalgebrafctngb"(IN rast "public"."raster", IN band int4, IN pixeltype text, IN ngbwidth int4, IN ngbheight int4, IN onerastngbuserfunc regprocedure, IN nodatamode text, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_max4ma(_float8, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_max4ma"(_float8, text, _text); CREATE FUNCTION "public"."st_max4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) RETURNS "float8" AS $BODY$ DECLARE _matrix float[][]; max float; BEGIN _matrix := matrix; max := '-Infinity'::float; FOR x in array_lower(_matrix, 1)..array_upper(_matrix, 1) LOOP FOR y in array_lower(_matrix, 2)..array_upper(_matrix, 2) LOOP IF _matrix[x][y] IS NULL THEN IF NOT nodatamode = 'ignore' THEN _matrix[x][y] := nodatamode::float; END IF; END IF; IF max < _matrix[x][y] THEN max := _matrix[x][y]; END IF; END LOOP; END LOOP; RETURN max; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_max4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_min4ma(_float8, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_min4ma"(_float8, text, _text); CREATE FUNCTION "public"."st_min4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) RETURNS "float8" AS $BODY$ DECLARE _matrix float[][]; min float; BEGIN _matrix := matrix; min := 'Infinity'::float; FOR x in array_lower(_matrix, 1)..array_upper(_matrix, 1) LOOP FOR y in array_lower(_matrix, 2)..array_upper(_matrix, 2) LOOP IF _matrix[x][y] IS NULL THEN IF NOT nodatamode = 'ignore' THEN _matrix[x][y] := nodatamode::float; END IF; END IF; IF min > _matrix[x][y] THEN min := _matrix[x][y]; END IF; END LOOP; END LOOP; RETURN min; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_min4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_sum4ma(_float8, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_sum4ma"(_float8, text, _text); CREATE FUNCTION "public"."st_sum4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) RETURNS "float8" AS $BODY$ DECLARE _matrix float[][]; sum float; BEGIN _matrix := matrix; sum := 0; FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP IF _matrix[x][y] IS NULL THEN IF nodatamode = 'ignore' THEN _matrix[x][y] := 0; ELSE _matrix[x][y] := nodatamode::float; END IF; END IF; sum := sum + _matrix[x][y]; END LOOP; END LOOP; RETURN sum; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_sum4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mean4ma(_float8, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mean4ma"(_float8, text, _text); CREATE FUNCTION "public"."st_mean4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) RETURNS "float8" AS $BODY$ DECLARE _matrix float[][]; sum float; count float; BEGIN _matrix := matrix; sum := 0; count := 0; FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP IF _matrix[x][y] IS NULL THEN IF nodatamode = 'ignore' THEN _matrix[x][y] := 0; ELSE _matrix[x][y] := nodatamode::float; count := count + 1; END IF; ELSE count := count + 1; END IF; sum := sum + _matrix[x][y]; END LOOP; END LOOP; IF count = 0 THEN RETURN NULL; END IF; RETURN sum / count; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mean4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_range4ma(_float8, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_range4ma"(_float8, text, _text); CREATE FUNCTION "public"."st_range4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) RETURNS "float8" AS $BODY$ DECLARE _matrix float[][]; min float; max float; BEGIN _matrix := matrix; min := 'Infinity'::float; max := '-Infinity'::float; FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP IF _matrix[x][y] IS NULL THEN IF NOT nodatamode = 'ignore' THEN _matrix[x][y] := nodatamode::float; END IF; END IF; IF min > _matrix[x][y] THEN min = _matrix[x][y]; END IF; IF max < _matrix[x][y] THEN max = _matrix[x][y]; END IF; END LOOP; END LOOP; IF max = '-Infinity'::float OR min = 'Infinity'::float THEN RETURN NULL; END IF; RETURN max - min; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_range4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_distinct4ma(_float8, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_distinct4ma"(_float8, text, _text); CREATE FUNCTION "public"."st_distinct4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) RETURNS "float8" AS $BODY$ SELECT COUNT(DISTINCT unnest)::float FROM unnest($1) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_distinct4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_stddev4ma(_float8, text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_stddev4ma"(_float8, text, _text); CREATE FUNCTION "public"."st_stddev4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) RETURNS "float8" AS $BODY$ SELECT stddev(unnest) FROM unnest($1) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_stddev4ma"(IN matrix _float8, IN nodatamode text, INOUT args _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_mapalgebra("public"."_rastbandarg", regprocedure, text, int4, int4, text, "public"."raster", _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_mapalgebra"("public"."_rastbandarg", regprocedure, text, int4, int4, text, "public"."raster", _text); CREATE FUNCTION "public"."_st_mapalgebra"(IN rastbandargset "public"."_rastbandarg", IN callbackfunc regprocedure DEFAULT NULL::text, IN pixeltype text DEFAULT 0, IN distancex int4 DEFAULT 0, IN distancey int4 DEFAULT 'INTERSECTION'::text, IN extenttype text DEFAULT NULL::raster, IN customextent "public"."raster" DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_nMapAlgebra' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_st_mapalgebra"(IN rastbandargset "public"."_rastbandarg", IN callbackfunc regprocedure, IN pixeltype text, IN distancex int4, IN distancey int4, IN extenttype text, IN customextent "public"."raster", INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.bytea("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."bytea"("public"."raster"); CREATE FUNCTION "public"."bytea"(IN "public"."raster") RETURNS "bytea" AS '$libdir/rtpostgis-2.1','RASTER_to_bytea' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."bytea"(IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebra("public"."_rastbandarg", regprocedure, text, text, "public"."raster", int4, int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebra"("public"."_rastbandarg", regprocedure, text, text, "public"."raster", int4, int4, _text); CREATE FUNCTION "public"."st_mapalgebra"(IN rastbandargset "public"."_rastbandarg", IN callbackfunc regprocedure DEFAULT NULL::text, IN pixeltype text DEFAULT 'INTERSECTION'::text, IN extenttype text DEFAULT NULL::raster, IN customextent "public"."raster" DEFAULT 0, IN distancex int4 DEFAULT 0, IN distancey int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "public"."raster" AS $BODY$ SELECT _ST_MapAlgebra($1, $2, $3, $6, $7, $4, $5, VARIADIC $8) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebra"(IN rastbandargset "public"."_rastbandarg", IN callbackfunc regprocedure, IN pixeltype text, IN extenttype text, IN customextent "public"."raster", IN distancex int4, IN distancey int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebra("public"."raster", _int4, regprocedure, text, text, "public"."raster", int4, int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebra"("public"."raster", _int4, regprocedure, text, text, "public"."raster", int4, int4, _text); CREATE FUNCTION "public"."st_mapalgebra"(IN rast "public"."raster", IN nband _int4, IN callbackfunc regprocedure DEFAULT NULL::text, IN pixeltype text DEFAULT 'FIRST'::text, IN extenttype text DEFAULT NULL::raster, IN customextent "public"."raster" DEFAULT 0, IN distancex int4 DEFAULT 0, IN distancey int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "public"."raster" AS $BODY$ DECLARE x int; argset rastbandarg[]; BEGIN IF $2 IS NULL OR array_ndims($2) < 1 OR array_length($2, 1) < 1 THEN RAISE EXCEPTION 'Populated 1D array must be provided for nband'; RETURN NULL; END IF; FOR x IN array_lower($2, 1)..array_upper($2, 1) LOOP IF $2[x] IS NULL THEN CONTINUE; END IF; argset := argset || ROW($1, $2[x])::rastbandarg; END LOOP; IF array_length(argset, 1) < 1 THEN RAISE EXCEPTION 'Populated 1D array must be provided for nband'; RETURN NULL; END IF; RETURN _ST_MapAlgebra(argset, $3, $4, $7, $8, $5, $6, VARIADIC $9); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebra"(IN rast "public"."raster", IN nband _int4, IN callbackfunc regprocedure, IN pixeltype text, IN extenttype text, IN customextent "public"."raster", IN distancex int4, IN distancey int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebra("public"."raster", int4, regprocedure, text, text, "public"."raster", int4, int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebra"("public"."raster", int4, regprocedure, text, text, "public"."raster", int4, int4, _text); CREATE FUNCTION "public"."st_mapalgebra"(IN rast "public"."raster", IN nband int4, IN callbackfunc regprocedure DEFAULT NULL::text, IN pixeltype text DEFAULT 'FIRST'::text, IN extenttype text DEFAULT NULL::raster, IN customextent "public"."raster" DEFAULT 0, IN distancex int4 DEFAULT 0, IN distancey int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "public"."raster" AS $BODY$ SELECT _ST_MapAlgebra(ARRAY[ROW($1, $2)]::rastbandarg[], $3, $4, $7, $8, $5, $6, VARIADIC $9) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebra"(IN rast "public"."raster", IN nband int4, IN callbackfunc regprocedure, IN pixeltype text, IN extenttype text, IN customextent "public"."raster", IN distancex int4, IN distancey int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebra("public"."raster", int4, "public"."raster", int4, regprocedure, text, text, "public"."raster", int4, int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebra"("public"."raster", int4, "public"."raster", int4, regprocedure, text, text, "public"."raster", int4, int4, _text); CREATE FUNCTION "public"."st_mapalgebra"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN callbackfunc regprocedure DEFAULT NULL::text, IN pixeltype text DEFAULT 'INTERSECTION'::text, IN extenttype text DEFAULT NULL::raster, IN customextent "public"."raster" DEFAULT 0, IN distancex int4 DEFAULT 0, IN distancey int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "public"."raster" AS $BODY$ SELECT _ST_MapAlgebra(ARRAY[ROW($1, $2), ROW($3, $4)]::rastbandarg[], $5, $6, $9, $10, $7, $8, VARIADIC $11) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebra"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN callbackfunc regprocedure, IN pixeltype text, IN extenttype text, IN customextent "public"."raster", IN distancex int4, IN distancey int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_mapalgebra("public"."_rastbandarg", text, text, text, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_mapalgebra"("public"."_rastbandarg", text, text, text, text, text, float8); CREATE FUNCTION "public"."_st_mapalgebra"(IN rastbandargset "public"."_rastbandarg", IN expression text, IN pixeltype text DEFAULT NULL::text, IN extenttype text DEFAULT 'INTERSECTION'::text, IN nodata1expr text DEFAULT NULL::text, IN nodata2expr text DEFAULT NULL::text, IN nodatanodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_nMapAlgebraExpr' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_st_mapalgebra"(IN rastbandargset "public"."_rastbandarg", IN expression text, IN pixeltype text, IN extenttype text, IN nodata1expr text, IN nodata2expr text, IN nodatanodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebra("public"."raster", int4, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebra"("public"."raster", int4, text, text, float8); CREATE FUNCTION "public"."st_mapalgebra"(IN rast "public"."raster", IN nband int4, IN pixeltype text, IN expression text, IN nodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT _st_mapalgebra(ARRAY[ROW($1, $2)]::rastbandarg[], $4, $3, 'FIRST', $5::text) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebra"(IN rast "public"."raster", IN nband int4, IN pixeltype text, IN expression text, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_hash("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_hash"("public"."raster"); CREATE FUNCTION "public"."raster_hash"(IN "public"."raster") RETURNS "int4" AS $BODY$hashvarlena$BODY$ LANGUAGE internal COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_hash"(IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebra("public"."raster", int4, "public"."raster", int4, text, text, text, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebra"("public"."raster", int4, "public"."raster", int4, text, text, text, text, text, float8); CREATE FUNCTION "public"."st_mapalgebra"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN expression text, IN pixeltype text DEFAULT NULL::text, IN extenttype text DEFAULT 'INTERSECTION'::text, IN nodata1expr text DEFAULT NULL::text, IN nodata2expr text DEFAULT NULL::text, IN nodatanodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT _st_mapalgebra(ARRAY[ROW($1, $2), ROW($3, $4)]::rastbandarg[], $5, $6, $7, $8, $9, $10) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebra"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN expression text, IN pixeltype text, IN extenttype text, IN nodata1expr text, IN nodata2expr text, IN nodatanodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mapalgebra("public"."raster", "public"."raster", text, text, text, text, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mapalgebra"("public"."raster", "public"."raster", text, text, text, text, text, float8); CREATE FUNCTION "public"."st_mapalgebra"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN expression text, IN pixeltype text DEFAULT NULL::text, IN extenttype text DEFAULT 'INTERSECTION'::text, IN nodata1expr text DEFAULT NULL::text, IN nodata2expr text DEFAULT NULL::text, IN nodatanodataval float8 DEFAULT NULL::double precision) RETURNS "public"."raster" AS $BODY$ SELECT st_mapalgebra($1, 1, $2, 1, $3, $4, $5, $6, $7, $8) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_mapalgebra"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN expression text, IN pixeltype text, IN extenttype text, IN nodata1expr text, IN nodata2expr text, IN nodatanodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_convertarray4ma(_float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_convertarray4ma"(_float8); CREATE FUNCTION "public"."_st_convertarray4ma"(IN "value" _float8) RETURNS "_float8" AS $BODY$ DECLARE _value double precision[][][]; x int; y int; BEGIN IF array_ndims(value) != 2 THEN RAISE EXCEPTION 'Function parameter must be a 2-dimension array'; END IF; _value := array_fill(NULL::double precision, ARRAY[1, array_length(value, 1), array_length(value, 2)]::int[], ARRAY[1, array_lower(value, 1), array_lower(value, 2)]::int[]); -- row FOR y IN array_lower(value, 1)..array_upper(value, 1) LOOP -- column FOR x IN array_lower(value, 2)..array_upper(value, 2) LOOP _value[1][y][x] = value[y][x]; END LOOP; END LOOP; RETURN _value; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_convertarray4ma"(IN "value" _float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_max4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_max4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_max4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE _value double precision[][][]; max double precision; x int; y int; z int; ndims int; BEGIN max := '-Infinity'::double precision; ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- raster FOR z IN array_lower(_value, 1)..array_upper(_value, 1) LOOP -- row FOR y IN array_lower(_value, 2)..array_upper(_value, 2) LOOP -- column FOR x IN array_lower(_value, 3)..array_upper(_value, 3) LOOP IF _value[z][y][x] IS NULL THEN IF array_length(userargs, 1) > 0 THEN _value[z][y][x] = userargs[array_lower(userargs, 1)]::double precision; ELSE CONTINUE; END IF; END IF; IF _value[z][y][x] > max THEN max := _value[z][y][x]; END IF; END LOOP; END LOOP; END LOOP; IF max = '-Infinity'::double precision THEN RETURN NULL; END IF; RETURN max; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_max4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_min4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_min4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_min4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE _value double precision[][][]; min double precision; x int; y int; z int; ndims int; BEGIN min := 'Infinity'::double precision; ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- raster FOR z IN array_lower(_value, 1)..array_upper(_value, 1) LOOP -- row FOR y IN array_lower(_value, 2)..array_upper(_value, 2) LOOP -- column FOR x IN array_lower(_value, 3)..array_upper(_value, 3) LOOP IF _value[z][y][x] IS NULL THEN IF array_length(userargs, 1) > 0 THEN _value[z][y][x] = userargs[array_lower(userargs, 1)]::double precision; ELSE CONTINUE; END IF; END IF; IF _value[z][y][x] < min THEN min := _value[z][y][x]; END IF; END LOOP; END LOOP; END LOOP; IF min = 'Infinity'::double precision THEN RETURN NULL; END IF; RETURN min; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_min4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_sum4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_sum4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_sum4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE _value double precision[][][]; sum double precision; x int; y int; z int; ndims int; BEGIN sum := 0; ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- raster FOR z IN array_lower(_value, 1)..array_upper(_value, 1) LOOP -- row FOR y IN array_lower(_value, 2)..array_upper(_value, 2) LOOP -- column FOR x IN array_lower(_value, 3)..array_upper(_value, 3) LOOP IF _value[z][y][x] IS NULL THEN IF array_length(userargs, 1) > 0 THEN _value[z][y][x] = userargs[array_lower(userargs, 1)]::double precision; ELSE CONTINUE; END IF; END IF; sum := sum + _value[z][y][x]; END LOOP; END LOOP; END LOOP; RETURN sum; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_sum4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_bandpath("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bandpath"("public"."raster", int4); CREATE FUNCTION "public"."st_bandpath"(IN rast "public"."raster", IN band int4 DEFAULT 1) RETURNS "text" AS '$libdir/rtpostgis-2.1','RASTER_getBandPath' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bandpath"(IN rast "public"."raster", IN band int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_bandpath"(IN rast "public"."raster", IN band int4) IS 'args: rast, bandnum=1 - Returns system file path to a band stored in file system. If no bandnum specified, 1 is assumed.'; -- ---------------------------- -- Function structure for public.st_mean4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mean4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_mean4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE _value double precision[][][]; sum double precision; count int; x int; y int; z int; ndims int; BEGIN sum := 0; count := 0; ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- raster FOR z IN array_lower(_value, 1)..array_upper(_value, 1) LOOP -- row FOR y IN array_lower(_value, 2)..array_upper(_value, 2) LOOP -- column FOR x IN array_lower(_value, 3)..array_upper(_value, 3) LOOP IF _value[z][y][x] IS NULL THEN IF array_length(userargs, 1) > 0 THEN _value[z][y][x] = userargs[array_lower(userargs, 1)]::double precision; ELSE CONTINUE; END IF; END IF; sum := sum + _value[z][y][x]; count := count + 1; END LOOP; END LOOP; END LOOP; IF count < 1 THEN RETURN NULL; END IF; RETURN sum / count::double precision; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mean4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_range4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_range4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_range4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE _value double precision[][][]; min double precision; max double precision; x int; y int; z int; ndims int; BEGIN min := 'Infinity'::double precision; max := '-Infinity'::double precision; ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- raster FOR z IN array_lower(_value, 1)..array_upper(_value, 1) LOOP -- row FOR y IN array_lower(_value, 2)..array_upper(_value, 2) LOOP -- column FOR x IN array_lower(_value, 3)..array_upper(_value, 3) LOOP IF _value[z][y][x] IS NULL THEN IF array_length(userargs, 1) > 0 THEN _value[z][y][x] = userargs[array_lower(userargs, 1)]::double precision; ELSE CONTINUE; END IF; END IF; IF _value[z][y][x] < min THEN min := _value[z][y][x]; END IF; IF _value[z][y][x] > max THEN max := _value[z][y][x]; END IF; END LOOP; END LOOP; END LOOP; IF max = '-Infinity'::double precision OR min = 'Infinity'::double precision THEN RETURN NULL; END IF; RETURN max - min; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_range4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_distinct4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_distinct4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_distinct4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ SELECT COUNT(DISTINCT unnest)::double precision FROM unnest($1) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_distinct4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_stddev4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_stddev4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_stddev4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ SELECT stddev(unnest) FROM unnest($1) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_stddev4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_invdistweight4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_invdistweight4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_invdistweight4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE _value double precision[][][]; ndims int; k double precision DEFAULT 1.; _k double precision DEFAULT 1.; z double precision[]; d double precision[]; _d double precision; z0 double precision; _z integer; x integer; y integer; cx integer; cy integer; cv double precision; cw double precision DEFAULT NULL; w integer; h integer; max_dx double precision; max_dy double precision; BEGIN -- RAISE NOTICE 'value = %', value; -- RAISE NOTICE 'userargs = %', userargs; ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- only use the first raster passed to this function IF array_length(_value, 1) > 1 THEN RAISE NOTICE 'Only using the values from the first raster'; END IF; _z := array_lower(_value, 1); -- width and height (0-based) h := array_upper(_value, 2) - array_lower(_value, 2); w := array_upper(_value, 3) - array_lower(_value, 3); -- max distance from center pixel max_dx := w / 2; max_dy := h / 2; -- RAISE NOTICE 'max_dx, max_dy = %, %', max_dx, max_dy; -- correct width and height (1-based) w := w + 1; h := h + 1; -- RAISE NOTICE 'w, h = %, %', w, h; -- width and height should be odd numbers IF w % 2. != 1 THEN RAISE EXCEPTION 'Width of neighborhood array does not permit for a center pixel'; END IF; IF h % 2. != 1 THEN RAISE EXCEPTION 'Height of neighborhood array does not permit for a center pixel'; END IF; -- center pixel's coordinates cy := max_dy + array_lower(_value, 2); cx := max_dx + array_lower(_value, 3); -- RAISE NOTICE 'cx, cy = %, %', cx, cy; -- if userargs provided, only use the first two args IF userargs IS NOT NULL AND array_ndims(userargs) = 1 THEN -- first arg is power factor k := userargs[array_lower(userargs, 1)]::double precision; IF k IS NULL THEN k := _k; ELSEIF k < 0. THEN RAISE NOTICE 'Power factor (< 0) must be between 0 and 1. Defaulting to 0'; k := 0.; ELSEIF k > 1. THEN RAISE NOTICE 'Power factor (> 1) must be between 0 and 1. Defaulting to 1'; k := 1.; END IF; -- second arg is what to do if center pixel has a value -- this will be a weight to apply for the center pixel IF array_length(userargs, 1) > 1 THEN cw := abs(userargs[array_lower(userargs, 1) + 1]::double precision); IF cw IS NOT NULL THEN IF cw < 0. THEN RAISE NOTICE 'Weight (< 0) of center pixel value must be between 0 and 1. Defaulting to 0'; cw := 0.; ELSEIF cw > 1 THEN RAISE NOTICE 'Weight (> 1) of center pixel value must be between 0 and 1. Defaulting to 1'; cw := 1.; END IF; END IF; END IF; END IF; -- RAISE NOTICE 'k = %', k; k = abs(k) * -1; -- center pixel value cv := _value[_z][cy][cx]; -- check to see if center pixel has value -- RAISE NOTICE 'cw = %', cw; IF cw IS NULL AND cv IS NOT NULL THEN RETURN cv; END IF; FOR y IN array_lower(_value, 2)..array_upper(_value, 2) LOOP FOR x IN array_lower(_value, 3)..array_upper(_value, 3) LOOP -- RAISE NOTICE 'value[%][%][%] = %', _z, y, x, _value[_z][y][x]; -- skip NODATA values and center pixel IF _value[_z][y][x] IS NULL OR (x = cx AND y = cy) THEN CONTINUE; END IF; z := z || _value[_z][y][x]; -- use pythagorean theorem _d := sqrt(power(cx - x, 2) + power(cy - y, 2)); -- RAISE NOTICE 'distance = %', _d; d := d || _d; END LOOP; END LOOP; -- RAISE NOTICE 'z = %', z; -- RAISE NOTICE 'd = %', d; -- neighborhood is NODATA IF z IS NULL OR array_length(z, 1) < 1 THEN -- center pixel has value IF cv IS NOT NULL THEN RETURN cv; ELSE RETURN NULL; END IF; END IF; z0 := 0; _d := 0; FOR x IN array_lower(z, 1)..array_upper(z, 1) LOOP d[x] := power(d[x], k); z[x] := z[x] * d[x]; _d := _d + d[x]; z0 := z0 + z[x]; END LOOP; z0 := z0 / _d; -- RAISE NOTICE 'z0 = %', z0; -- apply weight for center pixel if center pixel has value IF cv IS NOT NULL THEN z0 := (cw * cv) + ((1 - cw) * z0); -- RAISE NOTICE '*z0 = %', z0; END IF; RETURN z0; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_invdistweight4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_mindist4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_mindist4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."st_mindist4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE _value double precision[][][]; ndims int; d double precision DEFAULT NULL; _d double precision; z integer; x integer; y integer; cx integer; cy integer; cv double precision; w integer; h integer; max_dx double precision; max_dy double precision; BEGIN ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- only use the first raster passed to this function IF array_length(_value, 1) > 1 THEN RAISE NOTICE 'Only using the values from the first raster'; END IF; z := array_lower(_value, 1); -- width and height (0-based) h := array_upper(_value, 2) - array_lower(_value, 2); w := array_upper(_value, 3) - array_lower(_value, 3); -- max distance from center pixel max_dx := w / 2; max_dy := h / 2; -- correct width and height (1-based) w := w + 1; h := h + 1; -- width and height should be odd numbers IF w % 2. != 1 THEN RAISE EXCEPTION 'Width of neighborhood array does not permit for a center pixel'; END IF; IF h % 2. != 1 THEN RAISE EXCEPTION 'Height of neighborhood array does not permit for a center pixel'; END IF; -- center pixel's coordinates cy := max_dy + array_lower(_value, 2); cx := max_dx + array_lower(_value, 3); -- center pixel value cv := _value[z][cy][cx]; -- check to see if center pixel has value IF cv IS NOT NULL THEN RETURN 0.; END IF; FOR y IN array_lower(_value, 2)..array_upper(_value, 2) LOOP FOR x IN array_lower(_value, 3)..array_upper(_value, 3) LOOP -- skip NODATA values and center pixel IF _value[z][y][x] IS NULL OR (x = cx AND y = cy) THEN CONTINUE; END IF; -- use pythagorean theorem _d := sqrt(power(cx - x, 2) + power(cy - y, 2)); -- RAISE NOTICE 'distance = %', _d; IF d IS NULL OR _d < d THEN d := _d; END IF; END LOOP; END LOOP; -- RAISE NOTICE 'd = %', d; RETURN d; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_mindist4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_slope4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_slope4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."_st_slope4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE x integer; y integer; z integer; _pixwidth double precision; _pixheight double precision; _width double precision; _height double precision; _units text; _scale double precision; dz_dx double precision; dz_dy double precision; slope double precision; _value double precision[][][]; ndims int; BEGIN ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- only use the first raster passed to this function IF array_length(_value, 1) > 1 THEN RAISE NOTICE 'Only using the values from the first raster'; END IF; z := array_lower(_value, 1); IF ( array_lower(_value, 2) != 1 OR array_upper(_value, 2) != 3 OR array_lower(_value, 3) != 1 OR array_upper(_value, 3) != 3 ) THEN RAISE EXCEPTION 'First parameter of function must be a 1x3x3 array with each of the lower bounds starting from 1'; END IF; IF array_length(userargs, 1) < 6 THEN RAISE EXCEPTION 'At least six elements must be provided for the third parameter'; END IF; _pixwidth := userargs[1]::double precision; _pixheight := userargs[2]::double precision; _width := userargs[3]::double precision; _height := userargs[4]::double precision; _units := userargs[5]; _scale := userargs[6]::double precision; -- check that center pixel isn't NODATA IF _value[z][2][2] IS NULL THEN RETURN NULL; -- substitute center pixel for any neighbor pixels that are NODATA ELSE FOR y IN 1..3 LOOP FOR x IN 1..3 LOOP IF _value[z][y][x] IS NULL THEN _value[z][y][x] = _value[z][2][2]; END IF; END LOOP; END LOOP; END IF; dz_dy := ((_value[z][3][1] + _value[z][3][2] + _value[z][3][2] + _value[z][3][3]) - (_value[z][1][1] + _value[z][1][2] + _value[z][1][2] + _value[z][1][3])) / _pixheight; dz_dx := ((_value[z][1][3] + _value[z][2][3] + _value[z][2][3] + _value[z][3][3]) - (_value[z][1][1] + _value[z][2][1] + _value[z][2][1] + _value[z][3][1])) / _pixwidth; slope := sqrt(dz_dx * dz_dx + dz_dy * dz_dy) / (8 * _scale); -- output depends on user preference CASE substring(upper(trim(leading from _units)) for 3) -- percentages WHEN 'PER' THEN slope := 100.0 * slope; -- radians WHEN 'rad' THEN slope := atan(slope); -- degrees (default) ELSE slope := degrees(atan(slope)); END CASE; RETURN slope; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_slope4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_setscale("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setscale"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_setscale"(IN rast "public"."raster", IN scalex float8, IN scaley float8) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setScaleXY' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setscale"(IN rast "public"."raster", IN scalex float8, IN scaley float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setscale"(IN rast "public"."raster", IN scalex float8, IN scaley float8) IS 'args: rast, x, y - Sets the X and Y size of pixels in units of coordinate reference system. Number units/pixel width/height.'; -- ---------------------------- -- Function structure for public.st_slope("public"."raster", int4, "public"."raster", text, text, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_slope"("public"."raster", int4, "public"."raster", text, text, float8, bool); CREATE FUNCTION "public"."st_slope"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text DEFAULT '32BF'::text, IN units text DEFAULT 'DEGREES'::text, IN "scale" float8 DEFAULT 1.0, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ DECLARE _rast raster; _nband integer; _pixtype text; _pixwidth double precision; _pixheight double precision; _width integer; _height integer; _customextent raster; _extenttype text; BEGIN _customextent := customextent; IF _customextent IS NULL THEN _extenttype := 'FIRST'; ELSE _extenttype := 'CUSTOM'; END IF; IF interpolate_nodata IS TRUE THEN _rast := ST_MapAlgebra( ARRAY[ROW(rast, nband)]::rastbandarg[], 'st_invdistweight4ma(double precision[][][], integer[][], text[])'::regprocedure, pixeltype, 'FIRST', NULL, 1, 1 ); _nband := 1; _pixtype := NULL; ELSE _rast := rast; _nband := nband; _pixtype := pixeltype; END IF; -- get properties _pixwidth := ST_PixelWidth(_rast); _pixheight := ST_PixelHeight(_rast); SELECT width, height INTO _width, _height FROM ST_Metadata(_rast); RETURN ST_MapAlgebra( ARRAY[ROW(_rast, _nband)]::rastbandarg[], '_st_slope4ma(double precision[][][], integer[][], text[])'::regprocedure, _pixtype, _extenttype, _customextent, 1, 1, _pixwidth::text, _pixheight::text, _width::text, _height::text, units::text, scale::text ); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_slope"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text, IN units text, IN "scale" float8, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_slope("public"."raster", int4, text, text, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_slope"("public"."raster", int4, text, text, float8, bool); CREATE FUNCTION "public"."st_slope"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN pixeltype text DEFAULT '32BF'::text, IN units text DEFAULT 'DEGREES'::text, IN "scale" float8 DEFAULT 1.0, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT st_slope($1, $2, NULL::raster, $3, $4, $5, $6) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_slope"(IN rast "public"."raster", IN nband int4, IN pixeltype text, IN units text, IN "scale" float8, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_aspect4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_aspect4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."_st_aspect4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE x integer; y integer; z integer; _width double precision; _height double precision; _units text; dz_dx double precision; dz_dy double precision; aspect double precision; halfpi double precision; _value double precision[][][]; ndims int; BEGIN ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; IF ( array_lower(_value, 2) != 1 OR array_upper(_value, 2) != 3 OR array_lower(_value, 3) != 1 OR array_upper(_value, 3) != 3 ) THEN RAISE EXCEPTION 'First parameter of function must be a 1x3x3 array with each of the lower bounds starting from 1'; END IF; IF array_length(userargs, 1) < 3 THEN RAISE EXCEPTION 'At least three elements must be provided for the third parameter'; END IF; -- only use the first raster passed to this function IF array_length(_value, 1) > 1 THEN RAISE NOTICE 'Only using the values from the first raster'; END IF; z := array_lower(_value, 1); _width := userargs[1]::double precision; _height := userargs[2]::double precision; _units := userargs[3]; -- check that center pixel isn't NODATA IF _value[z][2][2] IS NULL THEN RETURN NULL; -- substitute center pixel for any neighbor pixels that are NODATA ELSE FOR y IN 1..3 LOOP FOR x IN 1..3 LOOP IF _value[z][y][x] IS NULL THEN _value[z][y][x] = _value[z][2][2]; END IF; END LOOP; END LOOP; END IF; dz_dy := ((_value[z][3][1] + _value[z][3][2] + _value[z][3][2] + _value[z][3][3]) - (_value[z][1][1] + _value[z][1][2] + _value[z][1][2] + _value[z][1][3])); dz_dx := ((_value[z][1][3] + _value[z][2][3] + _value[z][2][3] + _value[z][3][3]) - (_value[z][1][1] + _value[z][2][1] + _value[z][2][1] + _value[z][3][1])); -- aspect is flat IF abs(dz_dx) = 0::double precision AND abs(dz_dy) = 0::double precision THEN RETURN -1; END IF; -- aspect is in radians aspect := atan2(dz_dy, -dz_dx); -- north = 0, pi/2 = east, 3pi/2 = west halfpi := pi() / 2.0; IF aspect > halfpi THEN aspect := (5.0 * halfpi) - aspect; ELSE aspect := halfpi - aspect; END IF; IF aspect = 2 * pi() THEN aspect := 0.; END IF; -- output depends on user preference CASE substring(upper(trim(leading from _units)) for 3) -- radians WHEN 'rad' THEN RETURN aspect; -- degrees (default) ELSE RETURN degrees(aspect); END CASE; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_aspect4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_aspect("public"."raster", int4, "public"."raster", text, text, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aspect"("public"."raster", int4, "public"."raster", text, text, bool); CREATE FUNCTION "public"."st_aspect"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text DEFAULT '32BF'::text, IN units text DEFAULT 'DEGREES'::text, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ DECLARE _rast raster; _nband integer; _pixtype text; _width integer; _height integer; _customextent raster; _extenttype text; BEGIN _customextent := customextent; IF _customextent IS NULL THEN _extenttype := 'FIRST'; ELSE _extenttype := 'CUSTOM'; END IF; IF interpolate_nodata IS TRUE THEN _rast := ST_MapAlgebra( ARRAY[ROW(rast, nband)]::rastbandarg[], 'st_invdistweight4ma(double precision[][][], integer[][], text[])'::regprocedure, pixeltype, 'FIRST', NULL, 1, 1 ); _nband := 1; _pixtype := NULL; ELSE _rast := rast; _nband := nband; _pixtype := pixeltype; END IF; -- get properties SELECT width, height INTO _width, _height FROM ST_Metadata(_rast); RETURN ST_MapAlgebra( ARRAY[ROW(_rast, _nband)]::rastbandarg[], '_st_aspect4ma(double precision[][][], integer[][], text[])'::regprocedure, _pixtype, _extenttype, _customextent, 1, 1, _width::text, _height::text, units::text ); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aspect"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text, IN units text, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_aspect("public"."raster", int4, text, text, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_aspect"("public"."raster", int4, text, text, bool); CREATE FUNCTION "public"."st_aspect"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN pixeltype text DEFAULT '32BF'::text, IN units text DEFAULT 'DEGREES'::text, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT st_aspect($1, $2, NULL::raster, $3, $4, $5) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_aspect"(IN rast "public"."raster", IN nband int4, IN pixeltype text, IN units text, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_bandisnodata("public"."raster", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bandisnodata"("public"."raster", int4, bool); CREATE FUNCTION "public"."st_bandisnodata"(IN rast "public"."raster", IN band int4 DEFAULT 1, IN forcechecking bool DEFAULT false) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_bandIsNoData' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bandisnodata"(IN rast "public"."raster", IN band int4, IN forcechecking bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_bandisnodata"(IN rast "public"."raster", IN band int4, IN forcechecking bool) IS 'args: rast, band, forceChecking=true - Returns true if the band is filled with only nodata values.'; -- ---------------------------- -- Function structure for public._st_hillshade4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_hillshade4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."_st_hillshade4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE _pixwidth double precision; _pixheight double precision; _width double precision; _height double precision; _azimuth double precision; _altitude double precision; _bright double precision; _scale double precision; dz_dx double precision; dz_dy double precision; azimuth double precision; zenith double precision; slope double precision; aspect double precision; shade double precision; _value double precision[][][]; ndims int; z int; BEGIN ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; IF ( array_lower(_value, 2) != 1 OR array_upper(_value, 2) != 3 OR array_lower(_value, 3) != 1 OR array_upper(_value, 3) != 3 ) THEN RAISE EXCEPTION 'First parameter of function must be a 1x3x3 array with each of the lower bounds starting from 1'; END IF; IF array_length(userargs, 1) < 8 THEN RAISE EXCEPTION 'At least eight elements must be provided for the third parameter'; END IF; -- only use the first raster passed to this function IF array_length(_value, 1) > 1 THEN RAISE NOTICE 'Only using the values from the first raster'; END IF; z := array_lower(_value, 1); _pixwidth := userargs[1]::double precision; _pixheight := userargs[2]::double precision; _width := userargs[3]::double precision; _height := userargs[4]::double precision; _azimuth := userargs[5]::double precision; _altitude := userargs[6]::double precision; _bright := userargs[7]::double precision; _scale := userargs[8]::double precision; -- check that pixel is not edge pixel IF (pos[1][1] = 1 OR pos[1][2] = 1) OR (pos[1][1] = _width OR pos[1][2] = _height) THEN RETURN NULL; END IF; -- clamp azimuth IF _azimuth < 0. THEN RAISE NOTICE 'Clamping provided azimuth value % to 0', _azimuth; _azimuth := 0.; ELSEIF _azimuth >= 360. THEN RAISE NOTICE 'Converting provided azimuth value % to be between 0 and 360', _azimuth; _azimuth := _azimuth - (360. * floor(_azimuth / 360.)); END IF; azimuth := 360. - _azimuth + 90.; IF azimuth >= 360. THEN azimuth := azimuth - 360.; END IF; azimuth := radians(azimuth); --RAISE NOTICE 'azimuth = %', azimuth; -- clamp altitude IF _altitude < 0. THEN RAISE NOTICE 'Clamping provided altitude value % to 0', _altitude; _altitude := 0.; ELSEIF _altitude > 90. THEN RAISE NOTICE 'Clamping provided altitude value % to 90', _altitude; _altitude := 90.; END IF; zenith := radians(90. - _altitude); --RAISE NOTICE 'zenith = %', zenith; -- clamp bright IF _bright < 0. THEN RAISE NOTICE 'Clamping provided bright value % to 0', _bright; _bright := 0.; ELSEIF _bright > 255. THEN RAISE NOTICE 'Clamping provided bright value % to 255', _bright; _bright := 255.; END IF; dz_dy := ((_value[z][3][1] + _value[z][3][2] + _value[z][3][2] + _value[z][3][3]) - (_value[z][1][1] + _value[z][1][2] + _value[z][1][2] + _value[z][1][3])) / (8 * _pixheight); dz_dx := ((_value[z][1][3] + _value[z][2][3] + _value[z][2][3] + _value[z][3][3]) - (_value[z][1][1] + _value[z][2][1] + _value[z][2][1] + _value[z][3][1])) / (8 * _pixwidth); slope := atan(sqrt(dz_dx * dz_dx + dz_dy * dz_dy) / _scale); IF dz_dx != 0. THEN aspect := atan2(dz_dy, -dz_dx); IF aspect < 0. THEN aspect := aspect + (2.0 * pi()); END IF; ELSE IF dz_dy > 0. THEN aspect := pi() / 2.; ELSEIF dz_dy < 0. THEN aspect := (2. * pi()) - (pi() / 2.); -- set to pi as that is the expected PostgreSQL answer in Linux ELSE aspect := pi(); END IF; END IF; shade := _bright * ((cos(zenith) * cos(slope)) + (sin(zenith) * sin(slope) * cos(azimuth - aspect))); IF shade < 0. THEN shade := 0; END IF; RETURN shade; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_hillshade4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_hillshade("public"."raster", int4, "public"."raster", text, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_hillshade"("public"."raster", int4, "public"."raster", text, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."st_hillshade"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text DEFAULT '32BF'::text, IN azimuth float8 DEFAULT 315.0, IN altitude float8 DEFAULT 45.0, IN max_bright float8 DEFAULT 255.0, IN "scale" float8 DEFAULT 1.0, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ DECLARE _rast raster; _nband integer; _pixtype text; _pixwidth double precision; _pixheight double precision; _width integer; _height integer; _customextent raster; _extenttype text; BEGIN _customextent := customextent; IF _customextent IS NULL THEN _extenttype := 'FIRST'; ELSE _extenttype := 'CUSTOM'; END IF; IF interpolate_nodata IS TRUE THEN _rast := ST_MapAlgebra( ARRAY[ROW(rast, nband)]::rastbandarg[], 'st_invdistweight4ma(double precision[][][], integer[][], text[])'::regprocedure, pixeltype, 'FIRST', NULL, 1, 1 ); _nband := 1; _pixtype := NULL; ELSE _rast := rast; _nband := nband; _pixtype := pixeltype; END IF; -- get properties _pixwidth := ST_PixelWidth(_rast); _pixheight := ST_PixelHeight(_rast); SELECT width, height, scalex INTO _width, _height FROM ST_Metadata(_rast); RETURN ST_MapAlgebra( ARRAY[ROW(_rast, _nband)]::rastbandarg[], '_st_hillshade4ma(double precision[][][], integer[][], text[])'::regprocedure, _pixtype, _extenttype, _customextent, 1, 1, _pixwidth::text, _pixheight::text, _width::text, _height::text, $5::text, $6::text, $7::text, $8::text ); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_hillshade"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text, IN azimuth float8, IN altitude float8, IN max_bright float8, IN "scale" float8, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_hillshade("public"."raster", int4, text, float8, float8, float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_hillshade"("public"."raster", int4, text, float8, float8, float8, float8, bool); CREATE FUNCTION "public"."st_hillshade"(IN rast "public"."raster", IN nband int4 DEFAULT 1, IN pixeltype text DEFAULT '32BF'::text, IN azimuth float8 DEFAULT 315.0, IN altitude float8 DEFAULT 45.0, IN max_bright float8 DEFAULT 255.0, IN "scale" float8 DEFAULT 1.0, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT st_hillshade($1, $2, NULL::raster, $3, $4, $5, $6, $7, $8) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_hillshade"(IN rast "public"."raster", IN nband int4, IN pixeltype text, IN azimuth float8, IN altitude float8, IN max_bright float8, IN "scale" float8, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_tpi4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_tpi4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."_st_tpi4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE x integer; y integer; z integer; Z1 double precision; Z2 double precision; Z3 double precision; Z4 double precision; Z5 double precision; Z6 double precision; Z7 double precision; Z8 double precision; Z9 double precision; tpi double precision; mean double precision; _value double precision[][][]; ndims int; BEGIN ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- only use the first raster passed to this function IF array_length(_value, 1) > 1 THEN RAISE NOTICE 'Only using the values from the first raster'; END IF; z := array_lower(_value, 1); IF ( array_lower(_value, 2) != 1 OR array_upper(_value, 2) != 3 OR array_lower(_value, 3) != 1 OR array_upper(_value, 3) != 3 ) THEN RAISE EXCEPTION 'First parameter of function must be a 1x3x3 array with each of the lower bounds starting from 1'; END IF; -- check that center pixel isn't NODATA IF _value[z][2][2] IS NULL THEN RETURN NULL; -- substitute center pixel for any neighbor pixels that are NODATA ELSE FOR y IN 1..3 LOOP FOR x IN 1..3 LOOP IF _value[z][y][x] IS NULL THEN _value[z][y][x] = _value[z][2][2]; END IF; END LOOP; END LOOP; END IF; ------------------------------------------------- --| Z1= Z(-1,1) | Z2= Z(0,1) | Z3= Z(1,1) |-- ------------------------------------------------- --| Z4= Z(-1,0) | Z5= Z(0,0) | Z6= Z(1,0) |-- ------------------------------------------------- --| Z7= Z(-1,-1)| Z8= Z(0,-1)| Z9= Z(1,-1)|-- ------------------------------------------------- Z1 := _value[z][1][1]; Z2 := _value[z][2][1]; Z3 := _value[z][3][1]; Z4 := _value[z][1][2]; Z5 := _value[z][2][2]; Z6 := _value[z][3][2]; Z7 := _value[z][1][3]; Z8 := _value[z][2][3]; Z9 := _value[z][3][3]; mean := (Z1 + Z2 + Z3 + Z4 + Z6 + Z7 + Z8 + Z9)/8; tpi := Z5-mean; return tpi; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_tpi4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_tpi("public"."raster", int4, "public"."raster", text, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_tpi"("public"."raster", int4, "public"."raster", text, bool); CREATE FUNCTION "public"."st_tpi"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text DEFAULT '32BF'::text, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ DECLARE _rast raster; _nband integer; _pixtype text; _pixwidth double precision; _pixheight double precision; _width integer; _height integer; _customextent raster; _extenttype text; BEGIN _customextent := customextent; IF _customextent IS NULL THEN _extenttype := 'FIRST'; ELSE _extenttype := 'CUSTOM'; END IF; IF interpolate_nodata IS TRUE THEN _rast := ST_MapAlgebra( ARRAY[ROW(rast, nband)]::rastbandarg[], 'st_invdistweight4ma(double precision[][][], integer[][], text[])'::regprocedure, pixeltype, 'FIRST', NULL, 1, 1 ); _nband := 1; _pixtype := NULL; ELSE _rast := rast; _nband := nband; _pixtype := pixeltype; END IF; -- get properties _pixwidth := ST_PixelWidth(_rast); _pixheight := ST_PixelHeight(_rast); SELECT width, height INTO _width, _height FROM ST_Metadata(_rast); RETURN ST_MapAlgebra( ARRAY[ROW(_rast, _nband)]::rastbandarg[], '_st_tpi4ma(double precision[][][], integer[][], text[])'::regprocedure, _pixtype, _extenttype, _customextent, 1, 1); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_tpi"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_bandisnodata("public"."raster", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bandisnodata"("public"."raster", bool); CREATE FUNCTION "public"."st_bandisnodata"(IN rast "public"."raster", IN forcechecking bool) RETURNS "bool" AS $BODY$ SELECT st_bandisnodata($1, 1, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bandisnodata"(IN rast "public"."raster", IN forcechecking bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_bandisnodata"(IN rast "public"."raster", IN forcechecking bool) IS 'args: rast, forceChecking=true - Returns true if the band is filled with only nodata values.'; -- ---------------------------- -- Function structure for public._st_roughness4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_roughness4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."_st_roughness4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE x integer; y integer; z integer; minimum double precision; maximum double precision; _value double precision[][][]; ndims int; BEGIN ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- only use the first raster passed to this function IF array_length(_value, 1) > 1 THEN RAISE NOTICE 'Only using the values from the first raster'; END IF; z := array_lower(_value, 1); IF ( array_lower(_value, 2) != 1 OR array_upper(_value, 2) != 3 OR array_lower(_value, 3) != 1 OR array_upper(_value, 3) != 3 ) THEN RAISE EXCEPTION 'First parameter of function must be a 1x3x3 array with each of the lower bounds starting from 1'; END IF; -- check that center pixel isn't NODATA IF _value[z][2][2] IS NULL THEN RETURN NULL; -- substitute center pixel for any neighbor pixels that are NODATA ELSE FOR y IN 1..3 LOOP FOR x IN 1..3 LOOP IF _value[z][y][x] IS NULL THEN _value[z][y][x] = _value[z][2][2]; END IF; END LOOP; END LOOP; END IF; minimum := _value[z][1][1]; maximum := _value[z][1][1]; FOR Y IN 1..3 LOOP FOR X IN 1..3 LOOP IF _value[z][y][x] < minimum THEN minimum := _value[z][y][x]; ELSIF _value[z][y][x] > maximum THEN maximum := _value[z][y][x]; END IF; END LOOP; END LOOP; RETURN maximum - minimum; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_roughness4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_roughness("public"."raster", int4, "public"."raster", text, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_roughness"("public"."raster", int4, "public"."raster", text, bool); CREATE FUNCTION "public"."st_roughness"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text DEFAULT '32BF'::text, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ DECLARE _rast raster; _nband integer; _pixtype text; _pixwidth double precision; _pixheight double precision; _width integer; _height integer; _customextent raster; _extenttype text; BEGIN _customextent := customextent; IF _customextent IS NULL THEN _extenttype := 'FIRST'; ELSE _extenttype := 'CUSTOM'; END IF; IF interpolate_nodata IS TRUE THEN _rast := ST_MapAlgebra( ARRAY[ROW(rast, nband)]::rastbandarg[], 'st_invdistweight4ma(double precision[][][], integer[][], text[])'::regprocedure, pixeltype, 'FIRST', NULL, 1, 1 ); _nband := 1; _pixtype := NULL; ELSE _rast := rast; _nband := nband; _pixtype := pixeltype; END IF; RETURN ST_MapAlgebra( ARRAY[ROW(_rast, _nband)]::rastbandarg[], '_st_roughness4ma(double precision[][][], integer[][], text[])'::regprocedure, _pixtype, _extenttype, _customextent, 1, 1); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_roughness"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_tri4ma(_float8, _int4, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_tri4ma"(_float8, _int4, _text); CREATE FUNCTION "public"."_st_tri4ma"(IN "value" _float8, IN pos _int4 DEFAULT NULL::text[], INOUT userargs _text DEFAULT (null)) RETURNS "float8" AS $BODY$ DECLARE x integer; y integer; z integer; Z1 double precision; Z2 double precision; Z3 double precision; Z4 double precision; Z5 double precision; Z6 double precision; Z7 double precision; Z8 double precision; Z9 double precision; tri double precision; _value double precision[][][]; ndims int; BEGIN ndims := array_ndims(value); -- add a third dimension if 2-dimension IF ndims = 2 THEN _value := _st_convertarray4ma(value); ELSEIF ndims != 3 THEN RAISE EXCEPTION 'First parameter of function must be a 3-dimension array'; ELSE _value := value; END IF; -- only use the first raster passed to this function IF array_length(_value, 1) > 1 THEN RAISE NOTICE 'Only using the values from the first raster'; END IF; z := array_lower(_value, 1); IF ( array_lower(_value, 2) != 1 OR array_upper(_value, 2) != 3 OR array_lower(_value, 3) != 1 OR array_upper(_value, 3) != 3 ) THEN RAISE EXCEPTION 'First parameter of function must be a 1x3x3 array with each of the lower bounds starting from 1'; END IF; -- check that center pixel isn't NODATA IF _value[z][2][2] IS NULL THEN RETURN NULL; -- substitute center pixel for any neighbor pixels that are NODATA ELSE FOR y IN 1..3 LOOP FOR x IN 1..3 LOOP IF _value[z][y][x] IS NULL THEN _value[z][y][x] = _value[z][2][2]; END IF; END LOOP; END LOOP; END IF; ------------------------------------------------- --| Z1= Z(-1,1) | Z2= Z(0,1) | Z3= Z(1,1) |-- ------------------------------------------------- --| Z4= Z(-1,0) | Z5= Z(0,0) | Z6= Z(1,0) |-- ------------------------------------------------- --| Z7= Z(-1,-1)| Z8= Z(0,-1)| Z9= Z(1,-1)|-- ------------------------------------------------- -- _scale width and height units / z units to make z units equal to height width units Z1 := _value[z][1][1]; Z2 := _value[z][2][1]; Z3 := _value[z][3][1]; Z4 := _value[z][1][2]; Z5 := _value[z][2][2]; Z6 := _value[z][3][2]; Z7 := _value[z][1][3]; Z8 := _value[z][2][3]; Z9 := _value[z][3][3]; tri := ( abs(Z1 - Z5 ) + abs( Z2 - Z5 ) + abs( Z3 - Z5 ) + abs( Z4 - Z5 ) + abs( Z6 - Z5 ) + abs( Z7 - Z5 ) + abs( Z8 - Z5 ) + abs ( Z9 - Z5 )) / 8; return tri; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_tri4ma"(IN "value" _float8, IN pos _int4, INOUT userargs _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_tri("public"."raster", int4, "public"."raster", text, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_tri"("public"."raster", int4, "public"."raster", text, bool); CREATE FUNCTION "public"."st_tri"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text DEFAULT '32BF'::text, IN interpolate_nodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ DECLARE _rast raster; _nband integer; _pixtype text; _pixwidth double precision; _pixheight double precision; _width integer; _height integer; _customextent raster; _extenttype text; BEGIN _customextent := customextent; IF _customextent IS NULL THEN _extenttype := 'FIRST'; ELSE _extenttype := 'CUSTOM'; END IF; IF interpolate_nodata IS TRUE THEN _rast := ST_MapAlgebra( ARRAY[ROW(rast, nband)]::rastbandarg[], 'st_invdistweight4ma(double precision[][][], integer[][], text[])'::regprocedure, pixeltype, 'FIRST', NULL, 1, 1 ); _nband := 1; _pixtype := NULL; ELSE _rast := rast; _nband := nband; _pixtype := pixeltype; END IF; -- get properties _pixwidth := ST_PixelWidth(_rast); _pixheight := ST_PixelHeight(_rast); SELECT width, height INTO _width, _height FROM ST_Metadata(_rast); RETURN ST_MapAlgebra( ARRAY[ROW(_rast, _nband)]::rastbandarg[], '_st_tri4ma(double precision[][][], integer[][], text[])'::regprocedure, _pixtype, _extenttype, _customextent, 1, 1); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_tri"(IN rast "public"."raster", IN nband int4, IN customextent "public"."raster", IN pixeltype text, IN interpolate_nodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_isempty("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_isempty"("public"."raster"); CREATE FUNCTION "public"."st_isempty"(IN rast "public"."raster") RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_isEmpty' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_isempty"(IN rast "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_isempty"(IN rast "public"."raster") IS 'args: rast - Returns true if the raster is empty (width = 0 and height = 0). Otherwise, returns false.'; -- ---------------------------- -- Function structure for public.st_hasnoband("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_hasnoband"("public"."raster", int4); CREATE FUNCTION "public"."st_hasnoband"(IN rast "public"."raster", IN nband int4 DEFAULT 1) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_hasNoBand' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_hasnoband"(IN rast "public"."raster", IN nband int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_hasnoband"(IN rast "public"."raster", IN nband int4) IS 'args: rast, bandnum=1 - Returns true if there is no band with given band number. If no band number is specified, then band number 1 is assumed.'; -- ---------------------------- -- Function structure for public.st_bandnodatavalue("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bandnodatavalue"("public"."raster", int4); CREATE FUNCTION "public"."st_bandnodatavalue"(IN rast "public"."raster", IN band int4 DEFAULT 1) RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getBandNoDataValue' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bandnodatavalue"(IN rast "public"."raster", IN band int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_bandnodatavalue"(IN rast "public"."raster", IN band int4) IS 'args: rast, bandnum=1 - Returns the value in a given band that represents no data. If no band num 1 is assumed.'; -- ---------------------------- -- Function structure for public.st_setskew("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setskew"("public"."raster", float8); CREATE FUNCTION "public"."st_setskew"(IN rast "public"."raster", IN skew float8) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setSkew' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setskew"(IN rast "public"."raster", IN skew float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setskew"(IN rast "public"."raster", IN skew float8) IS 'args: rast, skewxy - Sets the georeference X and Y skew (or rotation parameter). If only one is passed in, sets X and Y to the same value.'; -- ---------------------------- -- Function structure for public.st_bandpixeltype("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bandpixeltype"("public"."raster", int4); CREATE FUNCTION "public"."st_bandpixeltype"(IN rast "public"."raster", IN band int4 DEFAULT 1) RETURNS "text" AS '$libdir/rtpostgis-2.1','RASTER_getBandPixelTypeName' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bandpixeltype"(IN rast "public"."raster", IN band int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_bandpixeltype"(IN rast "public"."raster", IN band int4) IS 'args: rast, bandnum=1 - Returns the type of pixel for given band. If no bandnum specified, 1 is assumed.'; -- ---------------------------- -- Function structure for public.st_bandmetadata("public"."raster", _int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bandmetadata"("public"."raster", _int4); CREATE FUNCTION "public"."st_bandmetadata"(IN rast "public"."raster", IN band _int4, OUT bandnum int4, OUT pixeltype text, OUT nodatavalue float8, OUT isoutdb bool, OUT "path" text) RETURNS "record" AS '$libdir/rtpostgis-2.1','RASTER_bandmetadata' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bandmetadata"(IN rast "public"."raster", IN band _int4, OUT bandnum int4, OUT pixeltype text, OUT nodatavalue float8, OUT isoutdb bool, OUT "path" text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_bandmetadata("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_bandmetadata"("public"."raster", int4); CREATE FUNCTION "public"."st_bandmetadata"(IN rast "public"."raster", IN band int4 DEFAULT 1, OUT pixeltype text, OUT nodatavalue float8, OUT isoutdb bool, OUT "path" text) RETURNS "record" AS $BODY$ SELECT pixeltype, nodatavalue, isoutdb, path FROM st_bandmetadata($1, ARRAY[$2]::int[]) LIMIT 1 $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_bandmetadata"(IN rast "public"."raster", IN band int4, OUT pixeltype text, OUT nodatavalue float8, OUT isoutdb bool, OUT "path" text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_bandmetadata"(IN rast "public"."raster", IN band int4, OUT pixeltype text, OUT nodatavalue float8, OUT isoutdb bool, OUT "path" text) IS 'args: rast, bandnum=1 - Returns basic meta data for a specific raster band. band num 1 is assumed if none-specified.'; -- ---------------------------- -- Function structure for public.st_value("public"."raster", int4, int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_value"("public"."raster", int4, int4, int4, bool); CREATE FUNCTION "public"."st_value"(IN rast "public"."raster", IN band int4, IN x int4, IN y int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_getPixelValue' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_value"(IN rast "public"."raster", IN band int4, IN x int4, IN y int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_value"(IN rast "public"."raster", IN band int4, IN x int4, IN y int4, IN exclude_nodata_value bool) IS 'args: rast, bandnum, columnx, rowy, exclude_nodata_value=true - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.'; -- ---------------------------- -- Function structure for public.st_value("public"."raster", int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_value"("public"."raster", int4, int4, bool); CREATE FUNCTION "public"."st_value"(IN rast "public"."raster", IN x int4, IN y int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "float8" AS $BODY$ SELECT st_value($1, 1, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_value"(IN rast "public"."raster", IN x int4, IN y int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_value"(IN rast "public"."raster", IN x int4, IN y int4, IN exclude_nodata_value bool) IS 'args: rast, columnx, rowy, exclude_nodata_value=true - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.'; -- ---------------------------- -- Function structure for public.st_value("public"."raster", int4, "public"."geometry", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_value"("public"."raster", int4, "public"."geometry", bool); CREATE FUNCTION "public"."st_value"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN exclude_nodata_value bool DEFAULT true) RETURNS "float8" AS $BODY$ DECLARE x float8; y float8; gtype text; BEGIN gtype := st_geometrytype(pt); IF ( gtype != 'ST_Point' ) THEN RAISE EXCEPTION 'Attempting to get the value of a pixel with a non-point geometry'; END IF; IF ST_SRID(pt) != ST_SRID(rast) THEN RAISE EXCEPTION 'Raster and geometry do not have the same SRID'; END IF; x := st_x(pt); y := st_y(pt); RETURN st_value(rast, band, st_worldtorastercoordx(rast, x, y), st_worldtorastercoordy(rast, x, y), exclude_nodata_value); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_value"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_value"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN exclude_nodata_value bool) IS 'args: rast, bandnum, pt, exclude_nodata_value=true - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.'; -- ---------------------------- -- Function structure for public.st_value("public"."raster", "public"."geometry", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_value"("public"."raster", "public"."geometry", bool); CREATE FUNCTION "public"."st_value"(IN rast "public"."raster", IN pt "public"."geometry", IN exclude_nodata_value bool DEFAULT true) RETURNS "float8" AS $BODY$ SELECT st_value($1, 1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_value"(IN rast "public"."raster", IN pt "public"."geometry", IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_value"(IN rast "public"."raster", IN pt "public"."geometry", IN exclude_nodata_value bool) IS 'args: rast, pt, exclude_nodata_value=true - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.'; -- ---------------------------- -- Function structure for public.st_pixelofvalue("public"."raster", int4, _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelofvalue"("public"."raster", int4, _float8, bool); CREATE FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN nband int4, IN "search" _float8, IN exclude_nodata_value bool DEFAULT true, OUT val float8, OUT x int4, OUT y int4) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_pixelOfValue' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN nband int4, IN "search" _float8, IN exclude_nodata_value bool, OUT val float8, OUT x int4, OUT y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN nband int4, IN "search" _float8, IN exclude_nodata_value bool, OUT val float8, OUT x int4, OUT y int4) IS 'args: rast, nband, search, exclude_nodata_value=true - Get the columnx, rowy coordinates of the pixel whose value equals the search value.'; -- ---------------------------- -- Function structure for public.st_pixelofvalue("public"."raster", _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelofvalue"("public"."raster", _float8, bool); CREATE FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN "search" _float8, IN exclude_nodata_value bool DEFAULT true, OUT val float8, OUT x int4, OUT y int4) RETURNS SETOF "record" AS $BODY$ SELECT val, x, y FROM st_pixelofvalue($1, 1, $2, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN "search" _float8, IN exclude_nodata_value bool, OUT val float8, OUT x int4, OUT y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN "search" _float8, IN exclude_nodata_value bool, OUT val float8, OUT x int4, OUT y int4) IS 'args: rast, search, exclude_nodata_value=true - Get the columnx, rowy coordinates of the pixel whose value equals the search value.'; -- ---------------------------- -- Function structure for public.st_pixelofvalue("public"."raster", int4, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelofvalue"("public"."raster", int4, float8, bool); CREATE FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN nband int4, IN "search" float8, IN exclude_nodata_value bool DEFAULT true, OUT x int4, OUT y int4) RETURNS SETOF "record" AS $BODY$ SELECT x, y FROM st_pixelofvalue($1, $2, ARRAY[$3], $4) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN nband int4, IN "search" float8, IN exclude_nodata_value bool, OUT x int4, OUT y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN nband int4, IN "search" float8, IN exclude_nodata_value bool, OUT x int4, OUT y int4) IS 'args: rast, nband, search, exclude_nodata_value=true - Get the columnx, rowy coordinates of the pixel whose value equals the search value.'; -- ---------------------------- -- Function structure for public.st_pixelofvalue("public"."raster", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelofvalue"("public"."raster", float8, bool); CREATE FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN "search" float8, IN exclude_nodata_value bool DEFAULT true, OUT x int4, OUT y int4) RETURNS SETOF "record" AS $BODY$ SELECT x, y FROM st_pixelofvalue($1, 1, ARRAY[$2], $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN "search" float8, IN exclude_nodata_value bool, OUT x int4, OUT y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelofvalue"(IN rast "public"."raster", IN "search" float8, IN exclude_nodata_value bool, OUT x int4, OUT y int4) IS 'args: rast, search, exclude_nodata_value=true - Get the columnx, rowy coordinates of the pixel whose value equals the search value.'; -- ---------------------------- -- Function structure for public.st_georeference("public"."raster", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_georeference"("public"."raster", text); CREATE FUNCTION "public"."st_georeference"(IN rast "public"."raster", IN format text DEFAULT 'GDAL'::text) RETURNS "text" AS $BODY$ DECLARE scale_x numeric; scale_y numeric; skew_x numeric; skew_y numeric; ul_x numeric; ul_y numeric; result text; BEGIN SELECT scalex::numeric, scaley::numeric, skewx::numeric, skewy::numeric, upperleftx::numeric, upperlefty::numeric INTO scale_x, scale_y, skew_x, skew_y, ul_x, ul_y FROM ST_Metadata(rast); -- scale x result := trunc(scale_x, 10) || E'\n'; -- skew y result := result || trunc(skew_y, 10) || E'\n'; -- skew x result := result || trunc(skew_x, 10) || E'\n'; -- scale y result := result || trunc(scale_y, 10) || E'\n'; IF format = 'ESRI' THEN -- upper left x result := result || trunc((ul_x + scale_x * 0.5), 10) || E'\n'; -- upper left y result = result || trunc((ul_y + scale_y * 0.5), 10) || E'\n'; ELSE -- IF format = 'GDAL' THEN -- upper left x result := result || trunc(ul_x, 10) || E'\n'; -- upper left y result := result || trunc(ul_y, 10) || E'\n'; END IF; RETURN result; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_georeference"(IN rast "public"."raster", IN format text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_georeference"(IN rast "public"."raster", IN format text) IS 'args: rast, format=GDAL - Returns the georeference meta data in GDAL or ESRI format as commonly seen in a world file. Default is GDAL.'; -- ---------------------------- -- Function structure for public.st_setscale("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setscale"("public"."raster", float8); CREATE FUNCTION "public"."st_setscale"(IN rast "public"."raster", IN "scale" float8) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setScale' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setscale"(IN rast "public"."raster", IN "scale" float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setscale"(IN rast "public"."raster", IN "scale" float8) IS 'args: rast, xy - Sets the X and Y size of pixels in units of coordinate reference system. Number units/pixel width/height.'; -- ---------------------------- -- Function structure for public.raster_eq("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_eq"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_eq"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$ SELECT raster_hash($1) = raster_hash($2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_eq"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_setgeoreference("public"."raster", text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setgeoreference"("public"."raster", text, text); CREATE FUNCTION "public"."st_setgeoreference"(IN rast "public"."raster", IN georef text, IN format text DEFAULT 'GDAL'::text) RETURNS "public"."raster" AS $BODY$ DECLARE params text[]; rastout raster; BEGIN IF rast IS NULL THEN RAISE WARNING 'Cannot set georeferencing on a null raster in st_setgeoreference.'; RETURN rastout; END IF; SELECT regexp_matches(georef, E'(-?\\d+(?:\\.\\d+)?)\\s(-?\\d+(?:\\.\\d+)?)\\s(-?\\d+(?:\\.\\d+)?)\\s' || E'(-?\\d+(?:\\.\\d+)?)\\s(-?\\d+(?:\\.\\d+)?)\\s(-?\\d+(?:\\.\\d+)?)') INTO params; IF NOT FOUND THEN RAISE EXCEPTION 'st_setgeoreference requires a string with 6 floating point values.'; END IF; IF format = 'ESRI' THEN -- params array is now: -- {scalex, skewy, skewx, scaley, upperleftx, upperlefty} rastout := st_setscale(rast, params[1]::float8, params[4]::float8); rastout := st_setskew(rastout, params[3]::float8, params[2]::float8); rastout := st_setupperleft(rastout, params[5]::float8 - (params[1]::float8 * 0.5), params[6]::float8 - (params[4]::float8 * 0.5)); ELSE IF format != 'GDAL' THEN RAISE WARNING 'Format ''%'' is not recognized, defaulting to GDAL format.', format; END IF; -- params array is now: -- {scalex, skewy, skewx, scaley, upperleftx, upperlefty} rastout := st_setscale(rast, params[1]::float8, params[4]::float8); rastout := st_setskew( rastout, params[3]::float8, params[2]::float8); rastout := st_setupperleft(rastout, params[5]::float8, params[6]::float8); END IF; RETURN rastout; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setgeoreference"(IN rast "public"."raster", IN georef text, IN format text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setgeoreference"(IN rast "public"."raster", IN georef text, IN format text) IS 'args: rast, georefcoords, format=GDAL - Set Georeference 6 georeference parameters in a single call. Numbers should be separated by white space. Accepts inputs in GDAL or ESRI format. Default is GDAL.'; -- ---------------------------- -- Function structure for public.st_setgeoreference("public"."raster", float8, float8, float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setgeoreference"("public"."raster", float8, float8, float8, float8, float8, float8); CREATE FUNCTION "public"."st_setgeoreference"(IN rast "public"."raster", IN upperleftx float8, IN upperlefty float8, IN scalex float8, IN scaley float8, IN skewx float8, IN skewy float8) RETURNS "public"."raster" AS $BODY$ SELECT st_setgeoreference($1, array_to_string(ARRAY[$4, $7, $6, $5, $2, $3], ' ')) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setgeoreference"(IN rast "public"."raster", IN upperleftx float8, IN upperlefty float8, IN scalex float8, IN scaley float8, IN skewx float8, IN skewy float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setgeoreference"(IN rast "public"."raster", IN upperleftx float8, IN upperlefty float8, IN scalex float8, IN scaley float8, IN skewx float8, IN skewy float8) IS 'args: rast, upperleftx, upperlefty, scalex, scaley, skewx, skewy - Set Georeference 6 georeference parameters in a single call. Numbers should be separated by white space. Accepts inputs in GDAL or ESRI format. Default is GDAL.'; -- ---------------------------- -- Function structure for public._st_tile("public"."raster", int4, int4, _int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_tile"("public"."raster", int4, int4, _int4, bool, float8); CREATE FUNCTION "public"."_st_tile"(IN rast "public"."raster", IN width int4, IN height int4, IN nband _int4 DEFAULT NULL::integer[], IN padwithnodata bool DEFAULT false, IN nodataval float8 DEFAULT NULL::double precision) RETURNS SETOF "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_tile' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_tile"(IN rast "public"."raster", IN width int4, IN height int4, IN nband _int4, IN padwithnodata bool, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_tile("public"."raster", _int4, int4, int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_tile"("public"."raster", _int4, int4, int4, bool, float8); CREATE FUNCTION "public"."st_tile"(IN rast "public"."raster", IN nband _int4, IN width int4, IN height int4, IN padwithnodata bool DEFAULT false, IN nodataval float8 DEFAULT NULL::double precision) RETURNS SETOF "public"."raster" AS $BODY$ SELECT _st_tile($1, $3, $4, $2, $5, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_tile"(IN rast "public"."raster", IN nband _int4, IN width int4, IN height int4, IN padwithnodata bool, IN nodataval float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_tile"(IN rast "public"."raster", IN nband _int4, IN width int4, IN height int4, IN padwithnodata bool, IN nodataval float8) IS 'args: rast, nband, width, height, padwithnodata=FALSE, nodataval=NULL - Returns a set of rasters resulting from the split of the input raster based upon the desired dimensions of the output rasters.'; -- ---------------------------- -- Function structure for public.st_tile("public"."raster", int4, int4, int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_tile"("public"."raster", int4, int4, int4, bool, float8); CREATE FUNCTION "public"."st_tile"(IN rast "public"."raster", IN nband int4, IN width int4, IN height int4, IN padwithnodata bool DEFAULT false, IN nodataval float8 DEFAULT NULL::double precision) RETURNS SETOF "public"."raster" AS $BODY$ SELECT _st_tile($1, $3, $4, ARRAY[$2]::integer[], $5, $6) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_tile"(IN rast "public"."raster", IN nband int4, IN width int4, IN height int4, IN padwithnodata bool, IN nodataval float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_tile"(IN rast "public"."raster", IN nband int4, IN width int4, IN height int4, IN padwithnodata bool, IN nodataval float8) IS 'args: rast, nband, width, height, padwithnodata=FALSE, nodataval=NULL - Returns a set of rasters resulting from the split of the input raster based upon the desired dimensions of the output rasters.'; -- ---------------------------- -- Function structure for public.st_tile("public"."raster", int4, int4, bool, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_tile"("public"."raster", int4, int4, bool, float8); CREATE FUNCTION "public"."st_tile"(IN rast "public"."raster", IN width int4, IN height int4, IN padwithnodata bool DEFAULT false, IN nodataval float8 DEFAULT NULL::double precision) RETURNS SETOF "public"."raster" AS $BODY$ SELECT _st_tile($1, $2, $3, NULL::integer[], $4, $5) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_tile"(IN rast "public"."raster", IN width int4, IN height int4, IN padwithnodata bool, IN nodataval float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_tile"(IN rast "public"."raster", IN width int4, IN height int4, IN padwithnodata bool, IN nodataval float8) IS 'args: rast, width, height, padwithnodata=FALSE, nodataval=NULL - Returns a set of rasters resulting from the split of the input raster based upon the desired dimensions of the output rasters.'; -- ---------------------------- -- Function structure for public.st_setbandnodatavalue("public"."raster", int4, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setbandnodatavalue"("public"."raster", int4, float8, bool); CREATE FUNCTION "public"."st_setbandnodatavalue"(IN rast "public"."raster", IN band int4, IN nodatavalue float8, IN forcechecking bool DEFAULT false) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setBandNoDataValue' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setbandnodatavalue"(IN rast "public"."raster", IN band int4, IN nodatavalue float8, IN forcechecking bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setbandnodatavalue"(IN rast "public"."raster", IN band int4, IN nodatavalue float8, IN forcechecking bool) IS 'args: rast, band, nodatavalue, forcechecking=false - Sets the value for the given band that represents no data. Band 1 is assumed if no band is specified. To mark a band as having no nodata value, set the nodata value = NULL.'; -- ---------------------------- -- Function structure for public.st_setbandnodatavalue("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setbandnodatavalue"("public"."raster", float8); CREATE FUNCTION "public"."st_setbandnodatavalue"(IN rast "public"."raster", IN nodatavalue float8) RETURNS "public"."raster" AS $BODY$ SELECT st_setbandnodatavalue($1, 1, $2, FALSE) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_setbandnodatavalue"(IN rast "public"."raster", IN nodatavalue float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setbandnodatavalue"(IN rast "public"."raster", IN nodatavalue float8) IS 'args: rast, nodatavalue - Sets the value for the given band that represents no data. Band 1 is assumed if no band is specified. To mark a band as having no nodata value, set the nodata value = NULL.'; -- ---------------------------- -- Function structure for public.st_setbandisnodata("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setbandisnodata"("public"."raster", int4); CREATE FUNCTION "public"."st_setbandisnodata"(IN rast "public"."raster", IN band int4 DEFAULT 1) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setBandIsNoData' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setbandisnodata"(IN rast "public"."raster", IN band int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setbandisnodata"(IN rast "public"."raster", IN band int4) IS 'args: rast, band=1 - Sets the isnodata flag of the band to TRUE.'; -- ---------------------------- -- Function structure for public._st_setvalues("public"."raster", int4, int4, int4, _float8, _bool, bool, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_setvalues"("public"."raster", int4, int4, int4, _float8, _bool, bool, float8, bool); CREATE FUNCTION "public"."_st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN newvalueset _float8, IN noset _bool DEFAULT NULL::boolean[], IN hasnosetvalue bool DEFAULT false, IN nosetvalue float8 DEFAULT NULL::double precision, IN keepnodata bool DEFAULT false) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setPixelValuesArray' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN newvalueset _float8, IN noset _bool, IN hasnosetvalue bool, IN nosetvalue float8, IN keepnodata bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_setvalues("public"."raster", int4, int4, int4, _float8, _bool, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalues"("public"."raster", int4, int4, int4, _float8, _bool, bool); CREATE FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN newvalueset _float8, IN noset _bool DEFAULT NULL::boolean[], IN keepnodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_setvalues($1, $2, $3, $4, $5, $6, FALSE, NULL, $7) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN newvalueset _float8, IN noset _bool, IN keepnodata bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN newvalueset _float8, IN noset _bool, IN keepnodata bool) IS 'args: rast, nband, columnx, rowy, newvalueset, noset=NULL, keepnodata=FALSE - Returns modified raster resulting from setting the values of a given band.'; -- ---------------------------- -- Function structure for public.st_setvalues("public"."raster", int4, int4, int4, _float8, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalues"("public"."raster", int4, int4, int4, _float8, float8, bool); CREATE FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN newvalueset _float8, IN nosetvalue float8, IN keepnodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ SELECT _st_setvalues($1, $2, $3, $4, $5, NULL, TRUE, $6, $7) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN newvalueset _float8, IN nosetvalue float8, IN keepnodata bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN newvalueset _float8, IN nosetvalue float8, IN keepnodata bool) IS 'args: rast, nband, columnx, rowy, newvalueset, nosetvalue, keepnodata=FALSE - Returns modified raster resulting from setting the values of a given band.'; -- ---------------------------- -- Function structure for public.st_setvalues("public"."raster", int4, int4, int4, int4, int4, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalues"("public"."raster", int4, int4, int4, int4, int4, float8, bool); CREATE FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN width int4, IN height int4, IN newvalue float8, IN keepnodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ BEGIN IF width <= 0 OR height <= 0 THEN RAISE EXCEPTION 'Values for width and height must be greater than zero'; RETURN NULL; END IF; RETURN _st_setvalues($1, $2, $3, $4, array_fill($7, ARRAY[$6, $5]::int[]), NULL, FALSE, NULL, $8); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN width int4, IN height int4, IN newvalue float8, IN keepnodata bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN x int4, IN y int4, IN width int4, IN height int4, IN newvalue float8, IN keepnodata bool) IS 'args: rast, nband, columnx, rowy, width, height, newvalue, keepnodata=FALSE - Returns modified raster resulting from setting the values of a given band.'; -- ---------------------------- -- Function structure for public.st_setvalues("public"."raster", int4, int4, int4, int4, float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalues"("public"."raster", int4, int4, int4, int4, float8, bool); CREATE FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN x int4, IN y int4, IN width int4, IN height int4, IN newvalue float8, IN keepnodata bool DEFAULT false) RETURNS "public"."raster" AS $BODY$ BEGIN IF width <= 0 OR height <= 0 THEN RAISE EXCEPTION 'Values for width and height must be greater than zero'; RETURN NULL; END IF; RETURN _st_setvalues($1, 1, $2, $3, array_fill($6, ARRAY[$5, $4]::int[]), NULL, FALSE, NULL, $7); END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN x int4, IN y int4, IN width int4, IN height int4, IN newvalue float8, IN keepnodata bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN x int4, IN y int4, IN width int4, IN height int4, IN newvalue float8, IN keepnodata bool) IS 'args: rast, columnx, rowy, width, height, newvalue, keepnodata=FALSE - Returns modified raster resulting from setting the values of a given band.'; -- ---------------------------- -- Function structure for public.st_setvalues("public"."raster", int4, "public"."_geomval", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalues"("public"."raster", int4, "public"."_geomval", bool); CREATE FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN geomvalset "public"."_geomval", IN keepnodata bool DEFAULT false) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setPixelValuesGeomval' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN geomvalset "public"."_geomval", IN keepnodata bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalues"(IN rast "public"."raster", IN nband int4, IN geomvalset "public"."_geomval", IN keepnodata bool) IS 'args: rast, nband, geomvalset, keepnodata=FALSE - Returns modified raster resulting from setting the values of a given band.'; -- ---------------------------- -- Function structure for public.st_setvalue("public"."raster", int4, int4, int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalue"("public"."raster", int4, int4, int4, float8); CREATE FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN band int4, IN x int4, IN y int4, IN newvalue float8) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_setPixelValue' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN band int4, IN x int4, IN y int4, IN newvalue float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN band int4, IN x int4, IN y int4, IN newvalue float8) IS 'args: rast, bandnum, columnx, rowy, newvalue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or the pixels that intersect a particular geometry. Band numbers start at 1 and assumed to be 1 if not specified.'; -- ---------------------------- -- Function structure for public.st_setvalue("public"."raster", int4, int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalue"("public"."raster", int4, int4, float8); CREATE FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN x int4, IN y int4, IN newvalue float8) RETURNS "public"."raster" AS $BODY$ SELECT st_setvalue($1, 1, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN x int4, IN y int4, IN newvalue float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN x int4, IN y int4, IN newvalue float8) IS 'args: rast, columnx, rowy, newvalue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or the pixels that intersect a particular geometry. Band numbers start at 1 and assumed to be 1 if not specified.'; -- ---------------------------- -- Function structure for public.st_setvalue("public"."raster", int4, "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalue"("public"."raster", int4, "public"."geometry", float8); CREATE FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry", IN newvalue float8) RETURNS "public"."raster" AS $BODY$ SELECT st_setvalues($1, $2, ARRAY[ROW($3, $4)]::geomval[], FALSE) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry", IN newvalue float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry", IN newvalue float8) IS 'args: rast, bandnum, geom, newvalue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or the pixels that intersect a particular geometry. Band numbers start at 1 and assumed to be 1 if not specified.'; -- ---------------------------- -- Function structure for public.st_setvalue("public"."raster", "public"."geometry", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_setvalue"("public"."raster", "public"."geometry", float8); CREATE FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN geom "public"."geometry", IN newvalue float8) RETURNS "public"."raster" AS $BODY$ SELECT st_setvalues($1, 1, ARRAY[ROW($2, $3)]::geomval[], FALSE) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN geom "public"."geometry", IN newvalue float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_setvalue"(IN rast "public"."raster", IN geom "public"."geometry", IN newvalue float8) IS 'args: rast, geom, newvalue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or the pixels that intersect a particular geometry. Band numbers start at 1 and assumed to be 1 if not specified.'; -- ---------------------------- -- Function structure for public.st_dumpaspolygons("public"."raster", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dumpaspolygons"("public"."raster", int4, bool); CREATE FUNCTION "public"."st_dumpaspolygons"(IN rast "public"."raster", IN band int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true) RETURNS SETOF "public"."geomval" AS '$libdir/rtpostgis-2.1','RASTER_dumpAsPolygons' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dumpaspolygons"(IN rast "public"."raster", IN band int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_dumpvalues("public"."raster", _int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dumpvalues"("public"."raster", _int4, bool); CREATE FUNCTION "public"."st_dumpvalues"(IN rast "public"."raster", IN nband _int4 DEFAULT NULL::integer[], IN exclude_nodata_value bool DEFAULT true, OUT nband int4, OUT valarray _float8) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_dumpValues' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dumpvalues"(IN rast "public"."raster", IN nband _int4, IN exclude_nodata_value bool, OUT nband int4, OUT valarray _float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dumpvalues"(IN rast "public"."raster", IN nband _int4, IN exclude_nodata_value bool, OUT nband int4, OUT valarray _float8) IS 'args: rast, nband, exclude_nodata_value=true - Get the values of the specified band as a 2-dimension array.'; -- ---------------------------- -- Function structure for public.st_dumpvalues("public"."raster", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dumpvalues"("public"."raster", int4, bool); CREATE FUNCTION "public"."st_dumpvalues"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "_float8" AS $BODY$ SELECT valarray FROM st_dumpvalues($1, ARRAY[$2]::integer[], $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dumpvalues"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dumpvalues"(IN rast "public"."raster", IN nband int4, IN exclude_nodata_value bool) IS 'args: rast, nband, exclude_nodata_value=true - Get the values of the specified band as a 2-dimension array.'; -- ---------------------------- -- Function structure for public.st_polygon("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_polygon"("public"."raster", int4); CREATE FUNCTION "public"."st_polygon"(IN rast "public"."raster", IN band int4 DEFAULT 1) RETURNS "public"."geometry" AS '$libdir/rtpostgis-2.1','RASTER_getPolygon' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_polygon"(IN rast "public"."raster", IN band int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_pixelaspolygons("public"."raster", int4, int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_pixelaspolygons"("public"."raster", int4, int4, int4, bool); CREATE FUNCTION "public"."_st_pixelaspolygons"(IN rast "public"."raster", IN band int4 DEFAULT 1, IN columnx int4 DEFAULT NULL::integer, IN rowy int4 DEFAULT NULL::integer, IN exclude_nodata_value bool DEFAULT true, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) RETURNS SETOF "record" AS '$libdir/rtpostgis-2.1','RASTER_getPixelPolygons' LANGUAGE c COST 1 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_pixelaspolygons"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN exclude_nodata_value bool, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_pixelaspolygons("public"."raster", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelaspolygons"("public"."raster", int4, bool); CREATE FUNCTION "public"."st_pixelaspolygons"(IN rast "public"."raster", IN band int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) RETURNS SETOF "record" AS $BODY$ SELECT geom, val, x, y FROM _st_pixelaspolygons($1, $2, NULL, NULL, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelaspolygons"(IN rast "public"."raster", IN band int4, IN exclude_nodata_value bool, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelaspolygons"(IN rast "public"."raster", IN band int4, IN exclude_nodata_value bool, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) IS 'args: rast, band=1, exclude_nodata_value=TRUE - Returns the polygon geometry that bounds every pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel.'; -- ---------------------------- -- Function structure for public.st_pixelaspolygon("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelaspolygon"("public"."raster", int4, int4); CREATE FUNCTION "public"."st_pixelaspolygon"(IN rast "public"."raster", IN x int4, IN y int4) RETURNS "public"."geometry" AS $BODY$ SELECT geom FROM _st_pixelaspolygons($1, NULL, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelaspolygon"(IN rast "public"."raster", IN x int4, IN y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelaspolygon"(IN rast "public"."raster", IN x int4, IN y int4) IS 'args: rast, columnx, rowy - Returns the polygon geometry that bounds the pixel for a particular row and column.'; -- ---------------------------- -- Function structure for public.st_pixelaspoints("public"."raster", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelaspoints"("public"."raster", int4, bool); CREATE FUNCTION "public"."st_pixelaspoints"(IN rast "public"."raster", IN band int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) RETURNS SETOF "record" AS $BODY$ SELECT ST_PointN(ST_ExteriorRing(geom), 1), val, x, y FROM _st_pixelaspolygons($1, $2, NULL, NULL, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelaspoints"(IN rast "public"."raster", IN band int4, IN exclude_nodata_value bool, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelaspoints"(IN rast "public"."raster", IN band int4, IN exclude_nodata_value bool, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) IS 'args: rast, band=1, exclude_nodata_value=TRUE - Returns a point geometry for each pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel. The coordinates of the point geometry are of the pixels upper-left corner.'; -- ---------------------------- -- Function structure for public.st_pixelaspoint("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelaspoint"("public"."raster", int4, int4); CREATE FUNCTION "public"."st_pixelaspoint"(IN rast "public"."raster", IN x int4, IN y int4) RETURNS "public"."geometry" AS $BODY$ SELECT ST_PointN(ST_ExteriorRing(geom), 1) FROM _st_pixelaspolygons($1, NULL, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelaspoint"(IN rast "public"."raster", IN x int4, IN y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelaspoint"(IN rast "public"."raster", IN x int4, IN y int4) IS 'args: rast, columnx, rowy - Returns a point geometry of the pixels upper-left corner.'; -- ---------------------------- -- Function structure for public.raster_overleft("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_overleft"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_overleft"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry &< $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_overleft"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_overright("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_overright"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_overright"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry &> $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_overright"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_pixelascentroids("public"."raster", int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelascentroids"("public"."raster", int4, bool); CREATE FUNCTION "public"."st_pixelascentroids"(IN rast "public"."raster", IN band int4 DEFAULT 1, IN exclude_nodata_value bool DEFAULT true, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) RETURNS SETOF "record" AS $BODY$ SELECT ST_Centroid(geom), val, x, y FROM _st_pixelaspolygons($1, $2, NULL, NULL, $3) $BODY$ LANGUAGE sql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelascentroids"(IN rast "public"."raster", IN band int4, IN exclude_nodata_value bool, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelascentroids"(IN rast "public"."raster", IN band int4, IN exclude_nodata_value bool, OUT geom "public"."geometry", OUT val float8, OUT x int4, OUT y int4) IS 'args: rast, band=1, exclude_nodata_value=TRUE - Returns the centroid (point geometry) for each pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel. The point geometry is the centroid of the area represented by a pixel.'; -- ---------------------------- -- Function structure for public.st_pixelascentroid("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_pixelascentroid"("public"."raster", int4, int4); CREATE FUNCTION "public"."st_pixelascentroid"(IN rast "public"."raster", IN x int4, IN y int4) RETURNS "public"."geometry" AS $BODY$ SELECT ST_Centroid(geom) FROM _st_pixelaspolygons($1, NULL, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_pixelascentroid"(IN rast "public"."raster", IN x int4, IN y int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_pixelascentroid"(IN rast "public"."raster", IN x int4, IN y int4) IS 'args: rast, columnx, rowy - Returns the centroid (point geometry) of the area represented by a pixel.'; -- ---------------------------- -- Function structure for public._st_worldtorastercoord("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_worldtorastercoord"("public"."raster", float8, float8); CREATE FUNCTION "public"."_st_worldtorastercoord"(IN rast "public"."raster", IN longitude float8 DEFAULT NULL::double precision, IN latitude float8 DEFAULT NULL::double precision, OUT columnx int4, OUT rowy int4) RETURNS "record" AS '$libdir/rtpostgis-2.1','RASTER_worldToRasterCoord' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_worldtorastercoord"(IN rast "public"."raster", IN longitude float8, IN latitude float8, OUT columnx int4, OUT rowy int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_worldtorastercoord("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_worldtorastercoord"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_worldtorastercoord"(IN rast "public"."raster", IN longitude float8, IN latitude float8, OUT columnx int4, OUT rowy int4) RETURNS "record" AS $BODY$ SELECT columnx, rowy FROM _st_worldtorastercoord($1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_worldtorastercoord"(IN rast "public"."raster", IN longitude float8, IN latitude float8, OUT columnx int4, OUT rowy int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_worldtorastercoord"(IN rast "public"."raster", IN longitude float8, IN latitude float8, OUT columnx int4, OUT rowy int4) IS 'args: rast, longitude, latitude - Returns the upper left corner as column and row given geometric X and Y (longitude and latitude) or a point geometry expressed in the spatial reference coordinate system of the raster.'; -- ---------------------------- -- Function structure for public.st_worldtorastercoord("public"."raster", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_worldtorastercoord"("public"."raster", "public"."geometry"); CREATE FUNCTION "public"."st_worldtorastercoord"(IN rast "public"."raster", IN pt "public"."geometry", OUT columnx int4, OUT rowy int4) RETURNS "record" AS $BODY$ DECLARE rx integer; ry integer; BEGIN IF st_geometrytype(pt) != 'ST_Point' THEN RAISE EXCEPTION 'Attempting to compute raster coordinate with a non-point geometry'; END IF; IF ST_SRID(rast) != ST_SRID(pt) THEN RAISE EXCEPTION 'Raster and geometry do not have the same SRID'; END IF; SELECT rc.columnx AS x, rc.rowy AS y INTO columnx, rowy FROM _st_worldtorastercoord($1, st_x(pt), st_y(pt)) AS rc; RETURN; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_worldtorastercoord"(IN rast "public"."raster", IN pt "public"."geometry", OUT columnx int4, OUT rowy int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_worldtorastercoord"(IN rast "public"."raster", IN pt "public"."geometry", OUT columnx int4, OUT rowy int4) IS 'args: rast, pt - Returns the upper left corner as column and row given geometric X and Y (longitude and latitude) or a point geometry expressed in the spatial reference coordinate system of the raster.'; -- ---------------------------- -- Function structure for public.st_worldtorastercoordx("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_worldtorastercoordx"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN xw float8, IN yw float8) RETURNS "int4" AS $BODY$ SELECT columnx FROM _st_worldtorastercoord($1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN xw float8, IN yw float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN xw float8, IN yw float8) IS 'args: rast, xw, yw - Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; -- ---------------------------- -- Function structure for public.st_worldtorastercoordx("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_worldtorastercoordx"("public"."raster", float8); CREATE FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN xw float8) RETURNS "int4" AS $BODY$ SELECT columnx FROM _st_worldtorastercoord($1, $2, NULL) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN xw float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN xw float8) IS 'args: rast, xw - Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; -- ---------------------------- -- Function structure for public.st_worldtorastercoordx("public"."raster", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_worldtorastercoordx"("public"."raster", "public"."geometry"); CREATE FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN pt "public"."geometry") RETURNS "int4" AS $BODY$ DECLARE xr integer; BEGIN IF ( st_geometrytype(pt) != 'ST_Point' ) THEN RAISE EXCEPTION 'Attempting to compute raster coordinate with a non-point geometry'; END IF; IF ST_SRID(rast) != ST_SRID(pt) THEN RAISE EXCEPTION 'Raster and geometry do not have the same SRID'; END IF; SELECT columnx INTO xr FROM _st_worldtorastercoord($1, st_x(pt), st_y(pt)); RETURN xr; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN pt "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_worldtorastercoordx"(IN rast "public"."raster", IN pt "public"."geometry") IS 'args: rast, pt - Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; -- ---------------------------- -- Function structure for public.st_worldtorastercoordy("public"."raster", float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_worldtorastercoordy"("public"."raster", float8, float8); CREATE FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN xw float8, IN yw float8) RETURNS "int4" AS $BODY$ SELECT rowy FROM _st_worldtorastercoord($1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN xw float8, IN yw float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN xw float8, IN yw float8) IS 'args: rast, xw, yw - Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; -- ---------------------------- -- Function structure for public.st_worldtorastercoordy("public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_worldtorastercoordy"("public"."raster", float8); CREATE FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN yw float8) RETURNS "int4" AS $BODY$ SELECT rowy FROM _st_worldtorastercoord($1, NULL, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN yw float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN yw float8) IS 'args: rast, xw - Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; -- ---------------------------- -- Function structure for public.st_worldtorastercoordy("public"."raster", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_worldtorastercoordy"("public"."raster", "public"."geometry"); CREATE FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN pt "public"."geometry") RETURNS "int4" AS $BODY$ DECLARE yr integer; BEGIN IF ( st_geometrytype(pt) != 'ST_Point' ) THEN RAISE EXCEPTION 'Attempting to compute raster coordinate with a non-point geometry'; END IF; IF ST_SRID(rast) != ST_SRID(pt) THEN RAISE EXCEPTION 'Raster and geometry do not have the same SRID'; END IF; SELECT rowy INTO yr FROM _st_worldtorastercoord($1, st_x(pt), st_y(pt)); RETURN yr; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN pt "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_worldtorastercoordy"(IN rast "public"."raster", IN pt "public"."geometry") IS 'args: rast, pt - Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; -- ---------------------------- -- Function structure for public._st_rastertoworldcoord("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_rastertoworldcoord"("public"."raster", int4, int4); CREATE FUNCTION "public"."_st_rastertoworldcoord"(IN rast "public"."raster", IN columnx int4 DEFAULT NULL::integer, IN rowy int4 DEFAULT NULL::integer, OUT longitude float8, OUT latitude float8) RETURNS "record" AS '$libdir/rtpostgis-2.1','RASTER_rasterToWorldCoord' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_rastertoworldcoord"(IN rast "public"."raster", IN columnx int4, IN rowy int4, OUT longitude float8, OUT latitude float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_rastertoworldcoord("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rastertoworldcoord"("public"."raster", int4, int4); CREATE FUNCTION "public"."st_rastertoworldcoord"(IN rast "public"."raster", IN columnx int4, IN rowy int4, OUT longitude float8, OUT latitude float8) RETURNS "record" AS $BODY$ SELECT longitude, latitude FROM _st_rastertoworldcoord($1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rastertoworldcoord"(IN rast "public"."raster", IN columnx int4, IN rowy int4, OUT longitude float8, OUT latitude float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rastertoworldcoord"(IN rast "public"."raster", IN columnx int4, IN rowy int4, OUT longitude float8, OUT latitude float8) IS 'args: rast, xcolumn, yrow - Returns the rasters upper left corner as geometric X and Y (longitude and latitude) given a column and row. Column and row starts at 1.'; -- ---------------------------- -- Function structure for public.st_rastertoworldcoordx("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rastertoworldcoordx"("public"."raster", int4, int4); CREATE FUNCTION "public"."st_rastertoworldcoordx"(IN rast "public"."raster", IN xr int4, IN yr int4) RETURNS "float8" AS $BODY$ SELECT longitude FROM _st_rastertoworldcoord($1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rastertoworldcoordx"(IN rast "public"."raster", IN xr int4, IN yr int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rastertoworldcoordx"(IN rast "public"."raster", IN xr int4, IN yr int4) IS 'args: rast, xcolumn, yrow - Returns the geometric X coordinate upper left of a raster, column and row. Numbering of columns and rows starts at 1.'; -- ---------------------------- -- Function structure for public.st_rastertoworldcoordx("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rastertoworldcoordx"("public"."raster", int4); CREATE FUNCTION "public"."st_rastertoworldcoordx"(IN rast "public"."raster", IN xr int4) RETURNS "float8" AS $BODY$ SELECT longitude FROM _st_rastertoworldcoord($1, $2, NULL) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rastertoworldcoordx"(IN rast "public"."raster", IN xr int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rastertoworldcoordx"(IN rast "public"."raster", IN xr int4) IS 'args: rast, xcolumn - Returns the geometric X coordinate upper left of a raster, column and row. Numbering of columns and rows starts at 1.'; -- ---------------------------- -- Function structure for public.st_rastertoworldcoordy("public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rastertoworldcoordy"("public"."raster", int4, int4); CREATE FUNCTION "public"."st_rastertoworldcoordy"(IN rast "public"."raster", IN xr int4, IN yr int4) RETURNS "float8" AS $BODY$ SELECT latitude FROM _st_rastertoworldcoord($1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rastertoworldcoordy"(IN rast "public"."raster", IN xr int4, IN yr int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rastertoworldcoordy"(IN rast "public"."raster", IN xr int4, IN yr int4) IS 'args: rast, xcolumn, yrow - Returns the geometric Y coordinate upper left corner of a raster, column and row. Numbering of columns and rows starts at 1.'; -- ---------------------------- -- Function structure for public.st_rastertoworldcoordy("public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_rastertoworldcoordy"("public"."raster", int4); CREATE FUNCTION "public"."st_rastertoworldcoordy"(IN rast "public"."raster", IN yr int4) RETURNS "float8" AS $BODY$ SELECT latitude FROM _st_rastertoworldcoord($1, NULL, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_rastertoworldcoordy"(IN rast "public"."raster", IN yr int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_rastertoworldcoordy"(IN rast "public"."raster", IN yr int4) IS 'args: rast, yrow - Returns the geometric Y coordinate upper left corner of a raster, column and row. Numbering of columns and rows starts at 1.'; -- ---------------------------- -- Function structure for public.st_minpossiblevalue(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_minpossiblevalue"(text); CREATE FUNCTION "public"."st_minpossiblevalue"(IN pixeltype text) RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_minPossibleValue' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_minpossiblevalue"(IN pixeltype text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_asbinary("public"."raster", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_asbinary"("public"."raster", bool); CREATE FUNCTION "public"."st_asbinary"(IN "public"."raster", IN outasin bool DEFAULT false) RETURNS "bytea" AS '$libdir/rtpostgis-2.1','RASTER_to_binary' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_asbinary"(IN "public"."raster", IN outasin bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_asbinary"(IN "public"."raster", IN outasin bool) IS 'args: rast, outasin=FALSE - Return the Well-Known Binary (WKB) representation of the raster without SRID meta data.'; -- ---------------------------- -- Function structure for public.raster_right("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_right"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_right"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry >> $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_right"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_overabove("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_overabove"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_overabove"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry |&> $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_overabove"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_overbelow("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_overbelow"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_overbelow"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry &<| $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_overbelow"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_above("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_above"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_above"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry |>> $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_above"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_below("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_below"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_below"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry <<| $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_below"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_same("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_same"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_same"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry ~= $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_same"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_contained("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_contained"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_contained"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry @ $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_contained"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_contain("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_contain"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_contain"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry ~ $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_contain"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_overlap("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_overlap"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."raster_overlap"(IN "public"."raster", IN "public"."raster") RETURNS "bool" AS $BODY$select $1::geometry && $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_overlap"(IN "public"."raster", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_geometry_contain("public"."raster", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_geometry_contain"("public"."raster", "public"."geometry"); CREATE FUNCTION "public"."raster_geometry_contain"(IN "public"."raster", IN "public"."geometry") RETURNS "bool" AS $BODY$select $1::geometry ~ $2$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_geometry_contain"(IN "public"."raster", IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.raster_geometry_overlap("public"."raster", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."raster_geometry_overlap"("public"."raster", "public"."geometry"); CREATE FUNCTION "public"."raster_geometry_overlap"(IN "public"."raster", IN "public"."geometry") RETURNS "bool" AS $BODY$select $1::geometry && $2$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."raster_geometry_overlap"(IN "public"."raster", IN "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_raster_contain("public"."geometry", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_raster_contain"("public"."geometry", "public"."raster"); CREATE FUNCTION "public"."geometry_raster_contain"(IN "public"."geometry", IN "public"."raster") RETURNS "bool" AS $BODY$select $1 ~ $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_raster_contain"(IN "public"."geometry", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.geometry_raster_overlap("public"."geometry", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."geometry_raster_overlap"("public"."geometry", "public"."raster"); CREATE FUNCTION "public"."geometry_raster_overlap"(IN "public"."geometry", IN "public"."raster") RETURNS "bool" AS $BODY$select $1 && $2::geometry$BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."geometry_raster_overlap"(IN "public"."geometry", IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_samealignment("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_samealignment"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_samealignment"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_sameAlignment' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_samealignment"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_samealignment"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Returns text stating if rasters are aligned and if not aligned, a reason why.'; -- ---------------------------- -- Function structure for public.st_samealignment(float8, float8, float8, float8, float8, float8, float8, float8, float8, float8, float8, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_samealignment"(float8, float8, float8, float8, float8, float8, float8, float8, float8, float8, float8, float8); CREATE FUNCTION "public"."st_samealignment"(IN ulx1 float8, IN uly1 float8, IN scalex1 float8, IN scaley1 float8, IN skewx1 float8, IN skewy1 float8, IN ulx2 float8, IN uly2 float8, IN scalex2 float8, IN scaley2 float8, IN skewx2 float8, IN skewy2 float8) RETURNS "bool" AS $BODY$ SELECT st_samealignment(st_makeemptyraster(1, 1, $1, $2, $3, $4, $5, $6), st_makeemptyraster(1, 1, $7, $8, $9, $10, $11, $12)) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_samealignment"(IN ulx1 float8, IN uly1 float8, IN scalex1 float8, IN scaley1 float8, IN skewx1 float8, IN skewy1 float8, IN ulx2 float8, IN uly2 float8, IN scalex2 float8, IN scaley2 float8, IN skewx2 float8, IN skewy2 float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_samealignment"(IN ulx1 float8, IN uly1 float8, IN scalex1 float8, IN scaley1 float8, IN skewx1 float8, IN skewy1 float8, IN ulx2 float8, IN uly2 float8, IN scalex2 float8, IN scaley2 float8, IN skewx2 float8, IN skewy2 float8) IS 'args: ulx1, uly1, scalex1, scaley1, skewx1, skewy1, ulx2, uly2, scalex2, scaley2, skewx2, skewy2 - Returns true if rasters have same skew, scale, spatial ref and false if they dont with notice detailing issue.'; -- ---------------------------- -- Function structure for public._st_samealignment_transfn("public"."agg_samealignment", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_samealignment_transfn"("public"."agg_samealignment", "public"."raster"); CREATE FUNCTION "public"."_st_samealignment_transfn"(IN agg "public"."agg_samealignment", IN rast "public"."raster") RETURNS "public"."agg_samealignment" AS $BODY$ DECLARE m record; aligned boolean; BEGIN IF agg IS NULL THEN agg.refraster := NULL; agg.aligned := NULL; END IF; IF rast IS NULL THEN agg.aligned := NULL; ELSE IF agg.refraster IS NULL THEN m := ST_Metadata(rast); agg.refraster := ST_MakeEmptyRaster(1, 1, m.upperleftx, m.upperlefty, m.scalex, m.scaley, m.skewx, m.skewy, m.srid); agg.aligned := TRUE; ELSE IF agg.aligned IS TRUE THEN agg.aligned := ST_SameAlignment(agg.refraster, rast); END IF; END IF; END IF; RETURN agg; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_samealignment_transfn"(IN agg "public"."agg_samealignment", IN rast "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_samealignment_finalfn("public"."agg_samealignment") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_samealignment_finalfn"("public"."agg_samealignment"); CREATE FUNCTION "public"."_st_samealignment_finalfn"(IN agg "public"."agg_samealignment") RETURNS "bool" AS $BODY$ SELECT $1.aligned $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_samealignment_finalfn"(IN agg "public"."agg_samealignment") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_notsamealignmentreason("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_notsamealignmentreason"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_notsamealignmentreason"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "text" AS '$libdir/rtpostgis-2.1','RASTER_notSameAlignmentReason' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_notsamealignmentreason"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_iscoveragetile("public"."raster", "public"."raster", int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_iscoveragetile"("public"."raster", "public"."raster", int4, int4); CREATE FUNCTION "public"."st_iscoveragetile"(IN rast "public"."raster", IN coverage "public"."raster", IN tilewidth int4, IN tileheight int4) RETURNS "bool" AS $BODY$ DECLARE _rastmeta record; _covmeta record; cr record; max integer[]; tile integer[]; edge integer[]; BEGIN IF NOT ST_SameAlignment(rast, coverage) THEN RAISE NOTICE 'Raster and coverage are not aligned'; RETURN FALSE; END IF; _rastmeta := ST_Metadata(rast); _covmeta := ST_Metadata(coverage); -- get coverage grid coordinates of upper-left of rast cr := ST_WorldToRasterCoord(coverage, _rastmeta.upperleftx, _rastmeta.upperlefty); -- rast is not part of coverage IF (cr.columnx < 1 OR cr.columnx > _covmeta.width) OR (cr.rowy < 1 OR cr.rowy > _covmeta.height) THEN RAISE NOTICE 'Raster is not in the coverage'; RETURN FALSE; END IF; -- rast isn't on the coverage's grid IF ((cr.columnx - 1) % tilewidth != 0) OR ((cr.rowy - 1) % tileheight != 0) THEN RAISE NOTICE 'Raster is not aligned to tile grid of coverage'; RETURN FALSE; END IF; -- max # of tiles on X and Y for coverage max[0] := ceil(_covmeta.width::double precision / tilewidth::double precision)::integer; max[1] := ceil(_covmeta.height::double precision / tileheight::double precision)::integer; -- tile # of rast in coverge tile[0] := (cr.columnx / tilewidth) + 1; tile[1] := (cr.rowy / tileheight) + 1; -- inner tile IF tile[0] < max[0] AND tile[1] < max[1] THEN IF (_rastmeta.width != tilewidth) OR (_rastmeta.height != tileheight) THEN RAISE NOTICE 'Raster width/height is invalid for interior tile of coverage'; RETURN FALSE; ELSE RETURN TRUE; END IF; END IF; -- edge tile -- edge tile may have same size as inner tile IF (_rastmeta.width = tilewidth) AND (_rastmeta.height = tileheight) THEN RETURN TRUE; END IF; -- get edge tile width and height edge[0] := _covmeta.width - ((max[0] - 1) * tilewidth); edge[1] := _covmeta.height - ((max[1] - 1) * tileheight); -- edge tile not of expected tile size -- right and bottom IF tile[0] = max[0] AND tile[1] = max[1] THEN IF _rastmeta.width != edge[0] OR _rastmeta.height != edge[1] THEN RAISE NOTICE 'Raster width/height is invalid for right-most AND bottom-most tile of coverage'; RETURN FALSE; END IF; ELSEIF tile[0] = max[0] THEN IF _rastmeta.width != edge[0] OR _rastmeta.height != tileheight THEN RAISE NOTICE 'Raster width/height is invalid for right-most tile of coverage'; RETURN FALSE; END IF; ELSE IF _rastmeta.width != tilewidth OR _rastmeta.height != edge[1] THEN RAISE NOTICE 'Raster width/height is invalid for bottom-most tile of coverage'; RETURN FALSE; END IF; END IF; RETURN TRUE; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_iscoveragetile"(IN rast "public"."raster", IN coverage "public"."raster", IN tilewidth int4, IN tileheight int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_intersects("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_intersects"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."_st_intersects"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_intersects' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_intersects"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersects("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersects"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_intersects"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_intersects(st_convexhull($1), st_convexhull($3)) ELSE _st_intersects($1, $2, $3, $4) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersects"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersects"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if raster rastA spatially intersects raster rastB.'; -- ---------------------------- -- Function structure for public.st_intersects("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersects"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_intersects"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_intersects($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersects"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersects"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if raster rastA spatially intersects raster rastB.'; -- ---------------------------- -- Function structure for public._st_intersects("public"."geometry", "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_intersects"("public"."geometry", "public"."raster", int4); CREATE FUNCTION "public"."_st_intersects"(IN geom "public"."geometry", IN rast "public"."raster", IN nband int4 DEFAULT NULL::integer) RETURNS "bool" AS $BODY$ DECLARE hasnodata boolean := TRUE; nodata float8 := 0.0; convexhull geometry; geomintersect geometry; x1w double precision := 0.0; x2w double precision := 0.0; y1w double precision := 0.0; y2w double precision := 0.0; x1 integer := 0; x2 integer := 0; x3 integer := 0; x4 integer := 0; y1 integer := 0; y2 integer := 0; y3 integer := 0; y4 integer := 0; x integer := 0; y integer := 0; xinc integer := 0; yinc integer := 0; pixelval double precision; bintersect boolean := FALSE; gtype text; scale float8; w int; h int; BEGIN IF ST_SRID(rast) != ST_SRID(geom) THEN RAISE EXCEPTION 'Raster and geometry do not have the same SRID'; END IF; convexhull := ST_ConvexHull(rast); IF nband IS NOT NULL THEN SELECT CASE WHEN bmd.nodatavalue IS NULL THEN FALSE ELSE NULL END INTO hasnodata FROM ST_BandMetaData(rast, nband) AS bmd; END IF; IF ST_Intersects(geom, convexhull) IS NOT TRUE THEN RETURN FALSE; ELSEIF nband IS NULL OR hasnodata IS FALSE THEN RETURN TRUE; END IF; -- Get the intersection between with the geometry. -- We will search for withvalue pixel only in this area. geomintersect := st_intersection(geom, convexhull); --RAISE NOTICE 'geomintersect=%', st_astext(geomintersect); -- If the intersection is empty, return false IF st_isempty(geomintersect) THEN RETURN FALSE; END IF; -- We create a minimalistic buffer around the intersection in order to scan every pixels -- that would touch the edge or intersect with the geometry SELECT sqrt(scalex * scalex + skewy * skewy), width, height INTO scale, w, h FROM ST_Metadata(rast); IF scale != 0 THEN geomintersect := st_buffer(geomintersect, scale / 1000000); END IF; --RAISE NOTICE 'geomintersect2=%', st_astext(geomintersect); -- Find the world coordinates of the bounding box of the intersecting area x1w := st_xmin(geomintersect); y1w := st_ymin(geomintersect); x2w := st_xmax(geomintersect); y2w := st_ymax(geomintersect); nodata := st_bandnodatavalue(rast, nband); --RAISE NOTICE 'x1w=%, y1w=%, x2w=%, y2w=%', x1w, y1w, x2w, y2w; -- Convert world coordinates to raster coordinates x1 := st_worldtorastercoordx(rast, x1w, y1w); y1 := st_worldtorastercoordy(rast, x1w, y1w); x2 := st_worldtorastercoordx(rast, x2w, y1w); y2 := st_worldtorastercoordy(rast, x2w, y1w); x3 := st_worldtorastercoordx(rast, x1w, y2w); y3 := st_worldtorastercoordy(rast, x1w, y2w); x4 := st_worldtorastercoordx(rast, x2w, y2w); y4 := st_worldtorastercoordy(rast, x2w, y2w); --RAISE NOTICE 'x1=%, y1=%, x2=%, y2=%, x3=%, y3=%, x4=%, y4=%', x1, y1, x2, y2, x3, y3, x4, y4; -- Order the raster coordinates for the upcoming FOR loop. x1 := int4smaller(int4smaller(int4smaller(x1, x2), x3), x4); y1 := int4smaller(int4smaller(int4smaller(y1, y2), y3), y4); x2 := int4larger(int4larger(int4larger(x1, x2), x3), x4); y2 := int4larger(int4larger(int4larger(y1, y2), y3), y4); -- Make sure the range is not lower than 1. -- This can happen when world coordinate are exactly on the left border -- of the raster and that they do not span on more than one pixel. x1 := int4smaller(int4larger(x1, 1), w); y1 := int4smaller(int4larger(y1, 1), h); -- Also make sure the range does not exceed the width and height of the raster. -- This can happen when world coordinate are exactly on the lower right border -- of the raster. x2 := int4smaller(x2, w); y2 := int4smaller(y2, h); --RAISE NOTICE 'x1=%, y1=%, x2=%, y2=%', x1, y1, x2, y2; -- Search exhaustively for withvalue pixel on a moving 3x3 grid -- (very often more efficient than searching on a mere 1x1 grid) FOR xinc in 0..2 LOOP FOR yinc in 0..2 LOOP FOR x IN x1+xinc..x2 BY 3 LOOP FOR y IN y1+yinc..y2 BY 3 LOOP -- Check first if the pixel intersects with the geometry. Often many won't. bintersect := NOT st_isempty(st_intersection(st_pixelaspolygon(rast, x, y), geom)); IF bintersect THEN -- If the pixel really intersects, check its value. Return TRUE if with value. pixelval := st_value(rast, nband, x, y); IF pixelval != nodata THEN RETURN TRUE; END IF; END IF; END LOOP; END LOOP; END LOOP; END LOOP; RETURN FALSE; END; $BODY$ LANGUAGE plpgsql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_intersects"(IN geom "public"."geometry", IN rast "public"."raster", IN nband int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersects("public"."geometry", "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersects"("public"."geometry", "public"."raster", int4); CREATE FUNCTION "public"."st_intersects"(IN geom "public"."geometry", IN rast "public"."raster", IN nband int4 DEFAULT NULL::integer) RETURNS "bool" AS $BODY$ SELECT $1 && $2::geometry AND _st_intersects($1, $2, $3); $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersects"(IN geom "public"."geometry", IN rast "public"."raster", IN nband int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersects"(IN geom "public"."geometry", IN rast "public"."raster", IN nband int4) IS 'args: geommin, rast, nband=NULL - Return true if raster rastA spatially intersects raster rastB.'; -- ---------------------------- -- Function structure for public.st_intersects("public"."raster", "public"."geometry", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersects"("public"."raster", "public"."geometry", int4); CREATE FUNCTION "public"."st_intersects"(IN rast "public"."raster", IN geom "public"."geometry", IN nband int4 DEFAULT NULL::integer) RETURNS "bool" AS $BODY$ SELECT $1::geometry && $2 AND _st_intersects($2, $1, $3) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersects"(IN rast "public"."raster", IN geom "public"."geometry", IN nband int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersects"(IN rast "public"."raster", IN geom "public"."geometry", IN nband int4) IS 'args: rast, geommin, nband=NULL - Return true if raster rastA spatially intersects raster rastB.'; -- ---------------------------- -- Function structure for public.st_intersects("public"."raster", int4, "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersects"("public"."raster", int4, "public"."geometry"); CREATE FUNCTION "public"."st_intersects"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry") RETURNS "bool" AS $BODY$ SELECT $1::geometry && $3 AND _st_intersects($3, $1, $2) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersects"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_intersects"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry") IS 'args: rast, nband, geommin - Return true if raster rastA spatially intersects raster rastB.'; -- ---------------------------- -- Function structure for public._st_overlaps("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_overlaps"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."_st_overlaps"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_overlaps' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_overlaps"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_overlaps("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_overlaps"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_overlaps"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_overlaps(st_convexhull($1), st_convexhull($3)) ELSE _st_overlaps($1, $2, $3, $4) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_overlaps"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_overlaps"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if raster rastA and rastB intersect but one does not completely contain the other.'; -- ---------------------------- -- Function structure for public.st_overlaps("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_overlaps"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_overlaps"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_overlaps($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_overlaps"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_overlaps"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if raster rastA and rastB intersect but one does not completely contain the other.'; -- ---------------------------- -- Function structure for public._st_touches("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_touches"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."_st_touches"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_touches' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_touches"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_touches("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_touches"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_touches"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_touches(st_convexhull($1), st_convexhull($3)) ELSE _st_touches($1, $2, $3, $4) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_touches"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_touches"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if raster rastA and rastB have at least one point in common but their interiors do not intersect.'; -- ---------------------------- -- Function structure for public.st_touches("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_touches"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_touches"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_touches($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_touches"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_touches"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if raster rastA and rastB have at least one point in common but their interiors do not intersect.'; -- ---------------------------- -- Function structure for public._st_contains("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_contains"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."_st_contains"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_contains' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_contains"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_contains("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_contains"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_contains"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_contains(st_convexhull($1), st_convexhull($3)) ELSE _st_contains($1, $2, $3, $4) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_contains"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_contains"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if no points of raster rastB lie in the exterior of raster rastA and at least one point of the interior of rastB lies in the interior of rastA.'; -- ---------------------------- -- Function structure for public.st_contains("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_contains"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_contains"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_contains($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_contains"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_contains"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if no points of raster rastB lie in the exterior of raster rastA and at least one point of the interior of rastB lies in the interior of rastA.'; -- ---------------------------- -- Function structure for public._st_containsproperly("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_containsproperly"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."_st_containsproperly"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_containsProperly' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_containsproperly"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_containsproperly("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_containsproperly"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_containsproperly"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_containsproperly(st_convexhull($1), st_convexhull($3)) ELSE _st_containsproperly($1, $2, $3, $4) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_containsproperly"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_containsproperly"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if rastB intersects the interior of rastA but not the boundary or exterior of rastA.'; -- ---------------------------- -- Function structure for public.st_containsproperly("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_containsproperly"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_containsproperly"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_containsproperly($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_containsproperly"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_containsproperly"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if rastB intersects the interior of rastA but not the boundary or exterior of rastA.'; -- ---------------------------- -- Function structure for public._st_covers("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_covers"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."_st_covers"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_covers' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_covers"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_covers("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_covers"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_covers"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_covers(st_convexhull($1), st_convexhull($3)) ELSE _st_covers($1, $2, $3, $4) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_covers"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_covers"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if no points of raster rastB lie outside raster rastA.'; -- ---------------------------- -- Function structure for public.st_covers("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_covers"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_covers"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_covers($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_covers"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_covers"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if no points of raster rastB lie outside raster rastA.'; -- ---------------------------- -- Function structure for public._st_coveredby("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_coveredby"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."_st_coveredby"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_coveredby' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_coveredby"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_coveredby("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_coveredby"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_coveredby"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_coveredby(st_convexhull($1), st_convexhull($3)) ELSE _st_coveredby($1, $2, $3, $4) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_coveredby"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_coveredby"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if no points of raster rastA lie outside raster rastB.'; -- ---------------------------- -- Function structure for public.st_coveredby("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_coveredby"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_coveredby"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_coveredby($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_coveredby"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_coveredby"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if no points of raster rastA lie outside raster rastB.'; -- ---------------------------- -- Function structure for public._st_within("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_within"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."_st_within"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT _st_contains($3, $4, $1, $2) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_within"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_within("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_within"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_within"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_within(st_convexhull($1), st_convexhull($3)) ELSE _st_contains($3, $4, $1, $2) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_within"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_within"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if no points of raster rastA lie in the exterior of raster rastB and at least one point of the interior of rastA lies in the interior of rastB.'; -- ---------------------------- -- Function structure for public.st_within("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_within"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_within"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_within($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_within"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_within"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if no points of raster rastA lie in the exterior of raster rastB and at least one point of the interior of rastA lies in the interior of rastB.'; -- ---------------------------- -- Function structure for public._st_dwithin("public"."raster", int4, "public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_dwithin"("public"."raster", int4, "public"."raster", int4, float8); CREATE FUNCTION "public"."_st_dwithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_dwithin' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_dwithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_dwithin("public"."raster", int4, "public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dwithin"("public"."raster", int4, "public"."raster", int4, float8); CREATE FUNCTION "public"."st_dwithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) RETURNS "bool" AS $BODY$ SELECT $1::geometry && ST_Expand(ST_ConvexHull($3), $5) AND $3::geometry && ST_Expand(ST_ConvexHull($1), $5) AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_dwithin(st_convexhull($1), st_convexhull($3), $5) ELSE _st_dwithin($1, $2, $3, $4, $5) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dwithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dwithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) IS 'args: rastA, nbandA, rastB, nbandB, distance_of_srid - Return true if rasters rastA and rastB are within the specified distance of each other.'; -- ---------------------------- -- Function structure for public.st_dwithin("public"."raster", "public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dwithin"("public"."raster", "public"."raster", float8); CREATE FUNCTION "public"."st_dwithin"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN distance float8) RETURNS "bool" AS $BODY$ SELECT st_dwithin($1, NULL::integer, $2, NULL::integer, $3) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dwithin"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN distance float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dwithin"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN distance float8) IS 'args: rastA, rastB, distance_of_srid - Return true if rasters rastA and rastB are within the specified distance of each other.'; -- ---------------------------- -- Function structure for public._st_dfullywithin("public"."raster", int4, "public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_dfullywithin"("public"."raster", int4, "public"."raster", int4, float8); CREATE FUNCTION "public"."_st_dfullywithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) RETURNS "bool" AS '$libdir/rtpostgis-2.1','RASTER_dfullywithin' LANGUAGE c COST 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_dfullywithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_dfullywithin("public"."raster", int4, "public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dfullywithin"("public"."raster", int4, "public"."raster", int4, float8); CREATE FUNCTION "public"."st_dfullywithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) RETURNS "bool" AS $BODY$ SELECT $1::geometry && ST_Expand(ST_ConvexHull($3), $5) AND $3::geometry && ST_Expand(ST_ConvexHull($1), $5) AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_dfullywithin(st_convexhull($1), st_convexhull($3), $5) ELSE _st_dfullywithin($1, $2, $3, $4, $5) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dfullywithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dfullywithin"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4, IN distance float8) IS 'args: rastA, nbandA, rastB, nbandB, distance_of_srid - Return true if rasters rastA and rastB are fully within the specified distance of each other.'; -- ---------------------------- -- Function structure for public.st_dfullywithin("public"."raster", "public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_dfullywithin"("public"."raster", "public"."raster", float8); CREATE FUNCTION "public"."st_dfullywithin"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN distance float8) RETURNS "bool" AS $BODY$ SELECT st_dfullywithin($1, NULL::integer, $2, NULL::integer, $3) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_dfullywithin"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN distance float8) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_dfullywithin"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN distance float8) IS 'args: rastA, rastB, distance_of_srid - Return true if rasters rastA and rastB are fully within the specified distance of each other.'; -- ---------------------------- -- Function structure for public.st_disjoint("public"."raster", int4, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_disjoint"("public"."raster", int4, "public"."raster", int4); CREATE FUNCTION "public"."st_disjoint"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) RETURNS "bool" AS $BODY$ SELECT CASE WHEN $2 IS NULL OR $4 IS NULL THEN st_disjoint(st_convexhull($1), st_convexhull($3)) ELSE NOT _st_intersects($1, $2, $3, $4) END $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_disjoint"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_disjoint"(IN rast1 "public"."raster", IN nband1 int4, IN rast2 "public"."raster", IN nband2 int4) IS 'args: rastA, nbandA, rastB, nbandB - Return true if raster rastA does not spatially intersect rastB.'; -- ---------------------------- -- Function structure for public.st_disjoint("public"."raster", "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_disjoint"("public"."raster", "public"."raster"); CREATE FUNCTION "public"."st_disjoint"(IN rast1 "public"."raster", IN rast2 "public"."raster") RETURNS "bool" AS $BODY$ SELECT st_disjoint($1, NULL::integer, $2, NULL::integer) $BODY$ LANGUAGE sql COST 1000 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_disjoint"(IN rast1 "public"."raster", IN rast2 "public"."raster") OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_disjoint"(IN rast1 "public"."raster", IN rast2 "public"."raster") IS 'args: rastA, rastB - Return true if raster rastA does not spatially intersect rastB.'; -- ---------------------------- -- Function structure for public.st_intersection("public"."geometry", "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."geometry", "public"."raster", int4); CREATE FUNCTION "public"."st_intersection"(IN geomin "public"."geometry", IN rast "public"."raster", IN band int4 DEFAULT 1) RETURNS SETOF "public"."geomval" AS $BODY$ DECLARE intersects boolean := FALSE; BEGIN intersects := ST_Intersects(geomin, rast, band); IF intersects THEN -- Return the intersections of the geometry with the vectorized parts of -- the raster and the values associated with those parts, if really their -- intersection is not empty. RETURN QUERY SELECT intgeom, val FROM ( SELECT ST_Intersection((gv).geom, geomin) AS intgeom, (gv).val FROM ST_DumpAsPolygons(rast, band) gv WHERE ST_Intersects((gv).geom, geomin) ) foo WHERE NOT ST_IsEmpty(intgeom); ELSE -- If the geometry does not intersect with the raster, return an empty -- geometry and a null value RETURN QUERY SELECT emptygeom, NULL::float8 FROM ST_GeomCollFromText('GEOMETRYCOLLECTION EMPTY', ST_SRID($1)) emptygeom; END IF; END; $BODY$ LANGUAGE plpgsql COST 100 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_intersection"(IN geomin "public"."geometry", IN rast "public"."raster", IN band int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", int4, "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", int4, "public"."geometry"); CREATE FUNCTION "public"."st_intersection"(IN rast "public"."raster", IN band int4, IN geomin "public"."geometry") RETURNS SETOF "public"."geomval" AS $BODY$ SELECT st_intersection($3, $1, $2) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast "public"."raster", IN band int4, IN geomin "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", "public"."geometry") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", "public"."geometry"); CREATE FUNCTION "public"."st_intersection"(IN rast "public"."raster", IN geomin "public"."geometry") RETURNS SETOF "public"."geomval" AS $BODY$ SELECT st_intersection($2, $1, 1) $BODY$ LANGUAGE sql COST 100 ROWS 1000 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast "public"."raster", IN geomin "public"."geometry") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", int4, "public"."raster", int4, text, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", int4, "public"."raster", int4, text, _float8); CREATE FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN returnband text DEFAULT 'BOTH'::text, IN nodataval _float8 DEFAULT NULL::double precision[]) RETURNS "public"."raster" AS $BODY$ DECLARE rtn raster; _returnband text; newnodata1 float8; newnodata2 float8; BEGIN IF ST_SRID(rast1) != ST_SRID(rast2) THEN RAISE EXCEPTION 'The two rasters do not have the same SRID'; END IF; newnodata1 := coalesce(nodataval[1], ST_BandNodataValue(rast1, band1), ST_MinPossibleValue(ST_BandPixelType(rast1, band1))); newnodata2 := coalesce(nodataval[2], ST_BandNodataValue(rast2, band2), ST_MinPossibleValue(ST_BandPixelType(rast2, band2))); _returnband := upper(returnband); rtn := NULL; CASE WHEN _returnband = 'BAND1' THEN rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1); rtn := ST_SetBandNodataValue(rtn, 1, newnodata1); WHEN _returnband = 'BAND2' THEN rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2); rtn := ST_SetBandNodataValue(rtn, 1, newnodata2); WHEN _returnband = 'BOTH' THEN rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1); rtn := ST_SetBandNodataValue(rtn, 1, newnodata1); rtn := ST_AddBand(rtn, ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2)); rtn := ST_SetBandNodataValue(rtn, 2, newnodata2); ELSE RAISE EXCEPTION 'Unknown value provided for returnband: %', returnband; RETURN NULL; END CASE; RETURN rtn; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN returnband text, IN nodataval _float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", int4, "public"."raster", int4, text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", int4, "public"."raster", int4, text, float8); CREATE FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN returnband text, IN nodataval float8) RETURNS "public"."raster" AS $BODY$ SELECT st_intersection($1, $2, $3, $4, $5, ARRAY[$6, $6]) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN returnband text, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", int4, "public"."raster", int4, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", int4, "public"."raster", int4, _float8); CREATE FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN nodataval _float8) RETURNS "public"."raster" AS $BODY$ SELECT st_intersection($1, $2, $3, $4, 'BOTH', $5) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN nodataval _float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", int4, "public"."raster", int4, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", int4, "public"."raster", int4, float8); CREATE FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN nodataval float8) RETURNS "public"."raster" AS $BODY$ SELECT st_intersection($1, $2, $3, $4, 'BOTH', ARRAY[$5, $5]) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN band1 int4, IN rast2 "public"."raster", IN band2 int4, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", "public"."raster", text, _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", "public"."raster", text, _float8); CREATE FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN returnband text DEFAULT 'BOTH'::text, IN nodataval _float8 DEFAULT NULL::double precision[]) RETURNS "public"."raster" AS $BODY$ SELECT st_intersection($1, 1, $2, 1, $3, $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN returnband text, IN nodataval _float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", "public"."raster", text, float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", "public"."raster", text, float8); CREATE FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN returnband text, IN nodataval float8) RETURNS "public"."raster" AS $BODY$ SELECT st_intersection($1, 1, $2, 1, $3, ARRAY[$4, $4]) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN returnband text, IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", "public"."raster", _float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", "public"."raster", _float8); CREATE FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN nodataval _float8) RETURNS "public"."raster" AS $BODY$ SELECT st_intersection($1, 1, $2, 1, 'BOTH', $3) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN nodataval _float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_intersection("public"."raster", "public"."raster", float8) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_intersection"("public"."raster", "public"."raster", float8); CREATE FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN nodataval float8) RETURNS "public"."raster" AS $BODY$ SELECT st_intersection($1, 1, $2, 1, 'BOTH', ARRAY[$3, $3]) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."st_intersection"(IN rast1 "public"."raster", IN rast2 "public"."raster", IN nodataval float8) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_union_finalfn(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_union_finalfn"(internal); CREATE FUNCTION "public"."_st_union_finalfn"(IN internal) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_union_finalfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_union_finalfn"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_union_transfn(internal, "public"."raster", "public"."_unionarg") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_union_transfn"(internal, "public"."raster", "public"."_unionarg"); CREATE FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster", IN "public"."_unionarg") RETURNS "internal" AS '$libdir/rtpostgis-2.1','RASTER_union_transfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster", IN "public"."_unionarg") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_union_transfn(internal, "public"."raster", int4, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_union_transfn"(internal, "public"."raster", int4, text); CREATE FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster", IN int4, IN text) RETURNS "internal" AS '$libdir/rtpostgis-2.1','RASTER_union_transfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster", IN int4, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_union_transfn(internal, "public"."raster", int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_union_transfn"(internal, "public"."raster", int4); CREATE FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster", IN int4) RETURNS "internal" AS '$libdir/rtpostgis-2.1','RASTER_union_transfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster", IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_union_transfn(internal, "public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_union_transfn"(internal, "public"."raster"); CREATE FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster") RETURNS "internal" AS '$libdir/rtpostgis-2.1','RASTER_union_transfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._st_union_transfn(internal, "public"."raster", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_union_transfn"(internal, "public"."raster", text); CREATE FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster", IN text) RETURNS "internal" AS '$libdir/rtpostgis-2.1','RASTER_union_transfn' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_union_transfn"(IN internal, IN "public"."raster", IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_clip("public"."raster", _int4, "public"."geometry", _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_clip"("public"."raster", _int4, "public"."geometry", _float8, bool); CREATE FUNCTION "public"."st_clip"(IN rast "public"."raster", IN nband _int4, IN geom "public"."geometry", IN nodataval _float8 DEFAULT NULL::double precision[], IN crop bool DEFAULT true) RETURNS "public"."raster" AS '$libdir/rtpostgis-2.1','RASTER_clip' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_clip"(IN rast "public"."raster", IN nband _int4, IN geom "public"."geometry", IN nodataval _float8, IN crop bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_clip("public"."raster", int4, "public"."geometry", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_clip"("public"."raster", int4, "public"."geometry", float8, bool); CREATE FUNCTION "public"."st_clip"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry", IN nodataval float8, IN crop bool DEFAULT true) RETURNS "public"."raster" AS $BODY$ SELECT ST_Clip($1, ARRAY[$2]::integer[], $3, ARRAY[$4]::double precision[], $5) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_clip"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry", IN nodataval float8, IN crop bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_clip("public"."raster", int4, "public"."geometry", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_clip"("public"."raster", int4, "public"."geometry", bool); CREATE FUNCTION "public"."st_clip"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry", IN crop bool) RETURNS "public"."raster" AS $BODY$ SELECT ST_Clip($1, ARRAY[$2]::integer[], $3, null::double precision[], $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_clip"(IN rast "public"."raster", IN nband int4, IN geom "public"."geometry", IN crop bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_clip("public"."raster", "public"."geometry", _float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_clip"("public"."raster", "public"."geometry", _float8, bool); CREATE FUNCTION "public"."st_clip"(IN rast "public"."raster", IN geom "public"."geometry", IN nodataval _float8 DEFAULT NULL::double precision[], IN crop bool DEFAULT true) RETURNS "public"."raster" AS $BODY$ SELECT ST_Clip($1, NULL, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_clip"(IN rast "public"."raster", IN geom "public"."geometry", IN nodataval _float8, IN crop bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_clip("public"."raster", "public"."geometry", float8, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_clip"("public"."raster", "public"."geometry", float8, bool); CREATE FUNCTION "public"."st_clip"(IN rast "public"."raster", IN geom "public"."geometry", IN nodataval float8, IN crop bool DEFAULT true) RETURNS "public"."raster" AS $BODY$ SELECT ST_Clip($1, NULL, $2, ARRAY[$3]::double precision[], $4) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_clip"(IN rast "public"."raster", IN geom "public"."geometry", IN nodataval float8, IN crop bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_clip("public"."raster", "public"."geometry", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_clip"("public"."raster", "public"."geometry", bool); CREATE FUNCTION "public"."st_clip"(IN rast "public"."raster", IN geom "public"."geometry", IN crop bool) RETURNS "public"."raster" AS $BODY$ SELECT ST_Clip($1, NULL, $2, null::double precision[], $3) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_clip"(IN rast "public"."raster", IN geom "public"."geometry", IN crop bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_nearestvalue("public"."raster", int4, "public"."geometry", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_nearestvalue"("public"."raster", int4, "public"."geometry", bool); CREATE FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN exclude_nodata_value bool DEFAULT true) RETURNS "float8" AS '$libdir/rtpostgis-2.1','RASTER_nearestValue' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN exclude_nodata_value bool) IS 'args: rast, bandnum, pt, exclude_nodata_value=true - Returns the nearest non-NODATA value of a given bands pixel specified by a columnx and rowy or a geometric point expressed in the same spatial reference coordinate system as the raster.'; -- ---------------------------- -- Function structure for public.st_nearestvalue("public"."raster", "public"."geometry", bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_nearestvalue"("public"."raster", "public"."geometry", bool); CREATE FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN pt "public"."geometry", IN exclude_nodata_value bool DEFAULT true) RETURNS "float8" AS $BODY$ SELECT st_nearestvalue($1, 1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN pt "public"."geometry", IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN pt "public"."geometry", IN exclude_nodata_value bool) IS 'args: rast, pt, exclude_nodata_value=true - Returns the nearest non-NODATA value of a given bands pixel specified by a columnx and rowy or a geometric point expressed in the same spatial reference coordinate system as the raster.'; -- ---------------------------- -- Function structure for public.st_nearestvalue("public"."raster", int4, int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_nearestvalue"("public"."raster", int4, int4, int4, bool); CREATE FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "float8" AS $BODY$ SELECT st_nearestvalue($1, $2, st_setsrid(st_makepoint(st_rastertoworldcoordx($1, $3, $4), st_rastertoworldcoordy($1, $3, $4)), st_srid($1)), $5) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN exclude_nodata_value bool) IS 'args: rast, bandnum, columnx, rowy, exclude_nodata_value=true - Returns the nearest non-NODATA value of a given bands pixel specified by a columnx and rowy or a geometric point expressed in the same spatial reference coordinate system as the raster.'; -- ---------------------------- -- Function structure for public.st_nearestvalue("public"."raster", int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_nearestvalue"("public"."raster", int4, int4, bool); CREATE FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN columnx int4, IN rowy int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "float8" AS $BODY$ SELECT st_nearestvalue($1, 1, st_setsrid(st_makepoint(st_rastertoworldcoordx($1, $2, $3), st_rastertoworldcoordy($1, $2, $3)), st_srid($1)), $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN columnx int4, IN rowy int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_nearestvalue"(IN rast "public"."raster", IN columnx int4, IN rowy int4, IN exclude_nodata_value bool) IS 'args: rast, columnx, rowy, exclude_nodata_value=true - Returns the nearest non-NODATA value of a given bands pixel specified by a columnx and rowy or a geometric point expressed in the same spatial reference coordinate system as the raster.'; -- ---------------------------- -- Function structure for public._st_neighborhood("public"."raster", int4, int4, int4, int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_st_neighborhood"("public"."raster", int4, int4, int4, int4, int4, bool); CREATE FUNCTION "public"."_st_neighborhood"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN distancex int4, IN distancey int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "_float8" AS '$libdir/rtpostgis-2.1','RASTER_neighborhood' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."_st_neighborhood"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.st_neighborhood("public"."raster", int4, int4, int4, int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_neighborhood"("public"."raster", int4, int4, int4, int4, int4, bool); CREATE FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN distancex int4, IN distancey int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "_float8" AS $BODY$ SELECT _st_neighborhood($1, $2, $3, $4, $5, $6, $7) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN band int4, IN columnx int4, IN rowy int4, IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) IS 'args: rast, bandnum, columnX, rowY, distanceX, distanceY, exclude_nodata_value=true - Returns a 2-D double precision array of the non-NODATA values around a given bands pixel specified by either a columnX and rowY or a geometric point expressed in the same spatial reference coordinate system as the raster.'; -- ---------------------------- -- Function structure for public.st_neighborhood("public"."raster", int4, int4, int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_neighborhood"("public"."raster", int4, int4, int4, int4, bool); CREATE FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN columnx int4, IN rowy int4, IN distancex int4, IN distancey int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "_float8" AS $BODY$ SELECT _st_neighborhood($1, 1, $2, $3, $4, $5, $6) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN columnx int4, IN rowy int4, IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN columnx int4, IN rowy int4, IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) IS 'args: rast, columnX, rowY, distanceX, distanceY, exclude_nodata_value=true - Returns a 2-D double precision array of the non-NODATA values around a given bands pixel specified by either a columnX and rowY or a geometric point expressed in the same spatial reference coordinate system as the raster.'; -- ---------------------------- -- Function structure for public.st_neighborhood("public"."raster", int4, "public"."geometry", int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_neighborhood"("public"."raster", int4, "public"."geometry", int4, int4, bool); CREATE FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN distancex int4, IN distancey int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "_float8" AS $BODY$ DECLARE wx double precision; wy double precision; rtn double precision[][]; BEGIN IF (st_geometrytype($3) != 'ST_Point') THEN RAISE EXCEPTION 'Attempting to get the neighbor of a pixel with a non-point geometry'; END IF; IF ST_SRID(rast) != ST_SRID(pt) THEN RAISE EXCEPTION 'Raster and geometry do not have the same SRID'; END IF; wx := st_x($3); wy := st_y($3); SELECT _st_neighborhood( $1, $2, st_worldtorastercoordx(rast, wx, wy), st_worldtorastercoordy(rast, wx, wy), $4, $5, $6 ) INTO rtn; RETURN rtn; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN band int4, IN pt "public"."geometry", IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) IS 'args: rast, bandnum, pt, distanceX, distanceY, exclude_nodata_value=true - Returns a 2-D double precision array of the non-NODATA values around a given bands pixel specified by either a columnX and rowY or a geometric point expressed in the same spatial reference coordinate system as the raster.'; -- ---------------------------- -- Function structure for public.st_neighborhood("public"."raster", "public"."geometry", int4, int4, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."st_neighborhood"("public"."raster", "public"."geometry", int4, int4, bool); CREATE FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN pt "public"."geometry", IN distancex int4, IN distancey int4, IN exclude_nodata_value bool DEFAULT true) RETURNS "_float8" AS $BODY$ SELECT st_neighborhood($1, 1, $2, $3, $4, $5) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN pt "public"."geometry", IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."st_neighborhood"(IN rast "public"."raster", IN pt "public"."geometry", IN distancex int4, IN distancey int4, IN exclude_nodata_value bool) IS 'args: rast, pt, distanceX, distanceY, exclude_nodata_value=true - Returns a 2-D double precision array of the non-NODATA values around a given bands pixel specified by either a columnX and rowY or a geometric point expressed in the same spatial reference coordinate system as the raster.'; -- ---------------------------- -- Function structure for public._add_raster_constraint(name, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint"(name, text); CREATE FUNCTION "public"."_add_raster_constraint"(IN cn name, IN "sql" text) RETURNS "bool" AS $BODY$ BEGIN BEGIN EXECUTE sql; EXCEPTION WHEN duplicate_object THEN RAISE NOTICE 'The constraint "%" already exists. To replace the existing constraint, delete the constraint and call ApplyRasterConstraints again', cn; WHEN OTHERS THEN RAISE NOTICE 'Unable to add constraint: %', cn; RAISE NOTICE 'SQL used for failed constraint: %', sql; RAISE NOTICE 'Returned error message: %', SQLERRM; RETURN FALSE; END; RETURN TRUE; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint"(IN cn name, IN "sql" text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint"(IN rastschema name, IN rasttable name, IN cn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); BEGIN EXECUTE 'ALTER TABLE ' || fqtn || ' DROP CONSTRAINT ' || quote_ident(cn); RETURN TRUE; EXCEPTION WHEN undefined_object THEN RAISE NOTICE 'The constraint "%" does not exist. Skipping', cn; WHEN OTHERS THEN RAISE NOTICE 'Unable to drop constraint "%"', cn; RETURN FALSE; END; RETURN TRUE; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint"(IN rastschema name, IN rasttable name, IN cn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_srid(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_srid"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_srid"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "int4" AS $BODY$ SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%st_srid(% = %'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_srid"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_srid(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_srid"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_srid"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr int; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_srid_' || $3; sql := 'SELECT st_srid(' || quote_ident($3) || ') FROM ' || fqtn || ' LIMIT 1'; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the SRID of a sample raster'; RETURN FALSE; END; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (st_srid(' || quote_ident($3) || ') = ' || attr || ')'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_srid"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_srid(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_srid"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_srid"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_srid_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_srid"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_scale(name, name, name, bpchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_scale"(name, name, name, bpchar); CREATE FUNCTION "public"."_raster_constraint_info_scale"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis bpchar) RETURNS "float8" AS $BODY$ SELECT replace(replace(split_part(split_part(s.consrc, ' = ', 2), '::', 1), ')', ''), '(', '')::double precision FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%st_scale' || $4 || '(% = %'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_scale"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis bpchar) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_scale(name, name, name, bpchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_scale"(name, name, name, bpchar); CREATE FUNCTION "public"."_add_raster_constraint_scale"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis bpchar) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr double precision; BEGIN IF lower($4) != 'x' AND lower($4) != 'y' THEN RAISE EXCEPTION 'axis must be either "x" or "y"'; RETURN FALSE; END IF; fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_scale' || $4 || '_' || $3; sql := 'SELECT st_scale' || $4 || '(' || quote_ident($3) || ') FROM ' || fqtn || ' LIMIT 1'; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the %-scale of a sample raster', upper($4); RETURN FALSE; END; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (st_scale' || $4 || '(' || quote_ident($3) || ')::numeric(16,10) = (' || attr || ')::numeric(16,10))'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_scale"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis bpchar) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_scale(name, name, name, bpchar) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_scale"(name, name, name, bpchar); CREATE FUNCTION "public"."_drop_raster_constraint_scale"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis bpchar) RETURNS "bool" AS $BODY$ BEGIN IF lower($4) != 'x' AND lower($4) != 'y' THEN RAISE EXCEPTION 'axis must be either "x" or "y"'; RETURN FALSE; END IF; RETURN _drop_raster_constraint($1, $2, 'enforce_scale' || $4 || '_' || $3); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_scale"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis bpchar) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_blocksize(name, name, name, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_blocksize"(name, name, name, text); CREATE FUNCTION "public"."_raster_constraint_info_blocksize"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis text) RETURNS "int4" AS $BODY$ SELECT CASE WHEN strpos(s.consrc, 'ANY (ARRAY[') > 0 THEN split_part((regexp_matches(s.consrc, E'ARRAY\\[(.*?){1}\\]'))[1], ',', 1)::integer ELSE replace(replace(split_part(s.consrc, '= ', 2), ')', ''), '(', '')::integer END FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%st_' || $4 || '(%= %'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_blocksize"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_blocksize(name, name, name, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_blocksize"(name, name, name, text); CREATE FUNCTION "public"."_add_raster_constraint_blocksize"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis text) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attrset integer[]; attr integer; BEGIN IF lower($4) != 'width' AND lower($4) != 'height' THEN RAISE EXCEPTION 'axis must be either "width" or "height"'; RETURN FALSE; END IF; fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_' || $4 || '_' || $3; sql := 'SELECT st_' || $4 || '(' || quote_ident($3) || ') FROM ' || fqtn || ' GROUP BY 1 ORDER BY count(*) DESC'; BEGIN attrset := ARRAY[]::integer[]; FOR attr IN EXECUTE sql LOOP attrset := attrset || attr; END LOOP; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the % of a sample raster', $4; RETURN FALSE; END; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (st_' || $4 || '(' || quote_ident($3) || ') IN (' || array_to_string(attrset, ',') || '))'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_blocksize"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_blocksize(name, name, name, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_blocksize"(name, name, name, text); CREATE FUNCTION "public"."_drop_raster_constraint_blocksize"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis text) RETURNS "bool" AS $BODY$ BEGIN IF lower($4) != 'width' AND lower($4) != 'height' THEN RAISE EXCEPTION 'axis must be either "width" or "height"'; RETURN FALSE; END IF; RETURN _drop_raster_constraint($1, $2, 'enforce_' || $4 || '_' || $3); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_blocksize"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN axis text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_extent(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_extent"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_extent"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "public"."geometry" AS $BODY$ SELECT trim(both '''' from split_part(trim(split_part(s.consrc, ',', 2)), '::', 1))::geometry FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%st_coveredby(st_convexhull(%'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_extent"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_extent(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_extent"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_extent"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr text; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_max_extent_' || $3; sql := 'SELECT st_ashexewkb(st_union(st_convexhull(' || quote_ident($3) || '))) FROM ' || fqtn; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the extent of the raster column. Attempting memory efficient (slower) approach'; sql := 'SELECT st_ashexewkb(st_memunion(st_convexhull(' || quote_ident($3) || '))) FROM ' || fqtn; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Still unable to get the extent of the raster column. Cannot add extent constraint'; RETURN FALSE; END; END; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (st_coveredby(st_convexhull(' || quote_ident($3) || '), ''' || attr || '''::geometry))'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_extent"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_extent(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_extent"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_extent"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_max_extent_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_extent"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_alignment(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_alignment"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_alignment"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT TRUE FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%st_samealignment(%'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_alignment"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_alignment(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_alignment"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_alignment"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr text; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_same_alignment_' || $3; sql := 'SELECT st_makeemptyraster(1, 1, upperleftx, upperlefty, scalex, scaley, skewx, skewy, srid) FROM st_metadata((SELECT ' || quote_ident($3) || ' FROM ' || fqtn || ' LIMIT 1))'; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the alignment of a sample raster'; RETURN FALSE; END; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (st_samealignment(' || quote_ident($3) || ', ''' || attr || '''::raster))'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_alignment"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_alignment(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_alignment"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_alignment"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_same_alignment_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_alignment"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_spatially_unique(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_spatially_unique"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_spatially_unique"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT TRUE FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s, pg_index idx, pg_operator op WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND s.contype = 'x' AND 0::smallint = ANY (s.conkey) AND idx.indexrelid = s.conindid AND pg_get_indexdef(idx.indexrelid, 1, true) LIKE '(' || quote_ident($3) || '::geometry)' AND s.conexclop[1] = op.oid AND op.oprname = '='; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_spatially_unique"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_spatially_unique(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_spatially_unique"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_spatially_unique"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr text; meta record; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_spatially_unique_' || quote_ident($2) || '_'|| $3; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' EXCLUDE ((' || quote_ident($3) || '::geometry) WITH =)'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_spatially_unique"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_spatially_unique(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_spatially_unique"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_spatially_unique"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE cn text; BEGIN SELECT s.conname INTO cn FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s, pg_index idx, pg_operator op WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND s.contype = 'x' AND 0::smallint = ANY (s.conkey) AND idx.indexrelid = s.conindid AND pg_get_indexdef(idx.indexrelid, 1, true) LIKE '(' || quote_ident($3) || '::geometry)' AND s.conexclop[1] = op.oid AND op.oprname = '='; RETURN _drop_raster_constraint($1, $2, cn); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_spatially_unique"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_coverage_tile(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_coverage_tile"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_coverage_tile"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT TRUE FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%st_iscoveragetile(%'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_coverage_tile"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_coverage_tile(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_coverage_tile"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_coverage_tile"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; _scalex double precision; _scaley double precision; _skewx double precision; _skewy double precision; _tilewidth integer; _tileheight integer; _alignment boolean; _covextent geometry; _covrast raster; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_coverage_tile_' || $3; -- metadata BEGIN sql := 'WITH foo AS (SELECT ST_Metadata(' || quote_ident($3) || ') AS meta, ST_ConvexHull(' || quote_ident($3) || ') AS hull FROM ' || fqtn || ') SELECT max((meta).scalex), max((meta).scaley), max((meta).skewx), max((meta).skewy), max((meta).width), max((meta).height), ST_Union(hull) FROM foo'; EXECUTE sql INTO _scalex, _scaley, _skewx, _skewy, _tilewidth, _tileheight, _covextent; EXCEPTION WHEN OTHERS THEN END; -- rasterize extent BEGIN _covrast := ST_AsRaster(_covextent, _scalex, _scaley, '8BUI', 1, 0, NULL, NULL, _skewx, _skewy); IF _covrast IS NULL THEN RAISE NOTICE 'Unable to create coverage raster. Cannot add coverage tile constraint'; RETURN FALSE; END IF; -- remove band _covrast := ST_MakeEmptyRaster(_covrast); EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to create coverage raster. Cannot add coverage tile constraint'; RETURN FALSE; END; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (st_iscoveragetile(' || quote_ident($3) || ', ''' || _covrast || '''::raster, ' || _tilewidth || ', ' || _tileheight || '))'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_coverage_tile"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_coverage_tile(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_coverage_tile"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_coverage_tile"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_coverage_tile_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_coverage_tile"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_regular_blocking(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_regular_blocking"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_regular_blocking"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE covtile boolean; spunique boolean; BEGIN -- check existance of constraints -- coverage tile constraint covtile := COALESCE(_raster_constraint_info_coverage_tile($1, $2, $3), FALSE); -- spatially unique constraint spunique := COALESCE(_raster_constraint_info_spatially_unique($1, $2, $3), FALSE); RETURN (covtile AND spunique); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_regular_blocking"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_regular_blocking(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_regular_blocking"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_regular_blocking"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_regular_blocking_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_regular_blocking"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_num_bands(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_num_bands"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_num_bands"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "int4" AS $BODY$ SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%st_numbands(%'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_num_bands"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_num_bands(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_num_bands"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_num_bands"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr int; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_num_bands_' || $3; sql := 'SELECT st_numbands(' || quote_ident($3) || ') FROM ' || fqtn || ' LIMIT 1'; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the number of bands of a sample raster'; RETURN FALSE; END; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (st_numbands(' || quote_ident($3) || ') = ' || attr || ')'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_num_bands"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_num_bands(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_num_bands"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_num_bands"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_num_bands_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_num_bands"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_pixel_types(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_pixel_types"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_pixel_types"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "_text" AS $BODY$ SELECT trim(both '''' from split_part(replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', ''), '::', 1))::text[] FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%_raster_constraint_pixel_types(%'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_pixel_types"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_pixel_types("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_pixel_types"("public"."raster"); CREATE FUNCTION "public"."_raster_constraint_pixel_types"(IN rast "public"."raster") RETURNS "_text" AS $BODY$ SELECT array_agg(pixeltype)::text[] FROM st_bandmetadata($1, ARRAY[]::int[]); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_pixel_types"(IN rast "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_pixel_types(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_pixel_types"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_pixel_types"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr text[]; max int; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_pixel_types_' || $3; sql := 'SELECT _raster_constraint_pixel_types(' || quote_ident($3) || ') FROM ' || fqtn || ' LIMIT 1'; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the pixel types of a sample raster'; RETURN FALSE; END; max := array_length(attr, 1); IF max < 1 OR max IS NULL THEN RAISE NOTICE 'Unable to get the pixel types of a sample raster'; RETURN FALSE; END IF; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (_raster_constraint_pixel_types(' || quote_ident($3) || ') = ''{'; FOR x in 1..max LOOP sql := sql || '"' || attr[x] || '"'; IF x < max THEN sql := sql || ','; END IF; END LOOP; sql := sql || '}''::text[])'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_pixel_types"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_pixel_types(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_pixel_types"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_pixel_types"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_pixel_types_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_pixel_types"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_nodata_values(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_nodata_values"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_nodata_values"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "_float8" AS $BODY$ SELECT trim(both '''' from split_part(replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', ''), '::', 1))::double precision[] FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%_raster_constraint_nodata_values(%'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_nodata_values"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_nodata_values("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_nodata_values"("public"."raster"); CREATE FUNCTION "public"."_raster_constraint_nodata_values"(IN rast "public"."raster") RETURNS "_float8" AS $BODY$ SELECT array_agg(nodatavalue)::double precision[] FROM st_bandmetadata($1, ARRAY[]::int[]); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_nodata_values"(IN rast "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_nodata_values(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_nodata_values"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_nodata_values"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr double precision[]; max int; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_nodata_values_' || $3; sql := 'SELECT _raster_constraint_nodata_values(' || quote_ident($3) || ') FROM ' || fqtn || ' LIMIT 1'; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the nodata values of a sample raster'; RETURN FALSE; END; max := array_length(attr, 1); IF max < 1 OR max IS NULL THEN RAISE NOTICE 'Unable to get the nodata values of a sample raster'; RETURN FALSE; END IF; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (_raster_constraint_nodata_values(' || quote_ident($3) || ')::numeric(16,10)[] = ''{'; FOR x in 1..max LOOP IF attr[x] IS NULL THEN sql := sql || 'NULL'; ELSE sql := sql || attr[x]; END IF; IF x < max THEN sql := sql || ','; END IF; END LOOP; sql := sql || '}''::numeric(16,10)[])'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_nodata_values"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_nodata_values(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_nodata_values"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_nodata_values"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_nodata_values_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_nodata_values"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_info_out_db(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_info_out_db"(name, name, name); CREATE FUNCTION "public"."_raster_constraint_info_out_db"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "_bool" AS $BODY$ SELECT trim(both '''' from split_part(replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', ''), '::', 1))::boolean[] FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%_raster_constraint_out_db(%'; $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_info_out_db"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._raster_constraint_out_db("public"."raster") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_raster_constraint_out_db"("public"."raster"); CREATE FUNCTION "public"."_raster_constraint_out_db"(IN rast "public"."raster") RETURNS "_bool" AS $BODY$ SELECT array_agg(isoutdb)::boolean[] FROM st_bandmetadata($1, ARRAY[]::int[]); $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_raster_constraint_out_db"(IN rast "public"."raster") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_raster_constraint_out_db(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_raster_constraint_out_db"(name, name, name); CREATE FUNCTION "public"."_add_raster_constraint_out_db"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; attr boolean[]; max int; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_out_db_' || $3; sql := 'SELECT _raster_constraint_out_db(' || quote_ident($3) || ') FROM ' || fqtn || ' LIMIT 1'; BEGIN EXECUTE sql INTO attr; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Unable to get the out-of-database bands of a sample raster'; RETURN FALSE; END; max := array_length(attr, 1); IF max < 1 OR max IS NULL THEN RAISE NOTICE 'Unable to get the out-of-database bands of a sample raster'; RETURN FALSE; END IF; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (_raster_constraint_out_db(' || quote_ident($3) || ') = ''{'; FOR x in 1..max LOOP IF attr[x] IS FALSE THEN sql := sql || 'FALSE'; ELSE sql := sql || 'TRUE'; END IF; IF x < max THEN sql := sql || ','; END IF; END LOOP; sql := sql || '}''::boolean[])'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_raster_constraint_out_db"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_raster_constraint_out_db(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_raster_constraint_out_db"(name, name, name); CREATE FUNCTION "public"."_drop_raster_constraint_out_db"(IN rastschema name, IN rasttable name, IN rastcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_out_db_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_raster_constraint_out_db"(IN rastschema name, IN rasttable name, IN rastcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.addrasterconstraints(name, name, name, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addrasterconstraints"(name, name, name, _text); CREATE FUNCTION "public"."addrasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) RETURNS "bool" AS $BODY$ DECLARE max int; cnt int; sql text; schema name; x int; kw text; rtn boolean; BEGIN cnt := 0; max := array_length(constraints, 1); IF max < 1 THEN RAISE NOTICE 'No constraints indicated to be added. Doing nothing'; RETURN TRUE; END IF; -- validate schema schema := NULL; IF length($1) > 0 THEN sql := 'SELECT nspname FROM pg_namespace ' || 'WHERE nspname = ' || quote_literal($1) || 'LIMIT 1'; EXECUTE sql INTO schema; IF schema IS NULL THEN RAISE EXCEPTION 'The value provided for schema is invalid'; RETURN FALSE; END IF; END IF; IF schema IS NULL THEN sql := 'SELECT n.nspname AS schemaname ' || 'FROM pg_catalog.pg_class c ' || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' || 'WHERE c.relkind = ' || quote_literal('r') || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ') AND pg_catalog.pg_table_is_visible(c.oid)' || ' AND c.relname = ' || quote_literal($2); EXECUTE sql INTO schema; IF schema IS NULL THEN RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal($2); RETURN FALSE; END IF; END IF; <<kwloop>> FOR x in 1..max LOOP kw := trim(both from lower(constraints[x])); BEGIN CASE WHEN kw = 'srid' THEN RAISE NOTICE 'Adding SRID constraint'; rtn := _add_raster_constraint_srid(schema, $2, $3); WHEN kw IN ('scale_x', 'scalex') THEN RAISE NOTICE 'Adding scale-X constraint'; rtn := _add_raster_constraint_scale(schema, $2, $3, 'x'); WHEN kw IN ('scale_y', 'scaley') THEN RAISE NOTICE 'Adding scale-Y constraint'; rtn := _add_raster_constraint_scale(schema, $2, $3, 'y'); WHEN kw = 'scale' THEN RAISE NOTICE 'Adding scale-X constraint'; rtn := _add_raster_constraint_scale(schema, $2, $3, 'x'); RAISE NOTICE 'Adding scale-Y constraint'; rtn := _add_raster_constraint_scale(schema, $2, $3, 'y'); WHEN kw IN ('blocksize_x', 'blocksizex', 'width') THEN RAISE NOTICE 'Adding blocksize-X constraint'; rtn := _add_raster_constraint_blocksize(schema, $2, $3, 'width'); WHEN kw IN ('blocksize_y', 'blocksizey', 'height') THEN RAISE NOTICE 'Adding blocksize-Y constraint'; rtn := _add_raster_constraint_blocksize(schema, $2, $3, 'height'); WHEN kw = 'blocksize' THEN RAISE NOTICE 'Adding blocksize-X constraint'; rtn := _add_raster_constraint_blocksize(schema, $2, $3, 'width'); RAISE NOTICE 'Adding blocksize-Y constraint'; rtn := _add_raster_constraint_blocksize(schema, $2, $3, 'height'); WHEN kw IN ('same_alignment', 'samealignment', 'alignment') THEN RAISE NOTICE 'Adding alignment constraint'; rtn := _add_raster_constraint_alignment(schema, $2, $3); WHEN kw IN ('regular_blocking', 'regularblocking') THEN RAISE NOTICE 'Adding coverage tile constraint required for regular blocking'; rtn := _add_raster_constraint_coverage_tile(schema, $2, $3); IF rtn IS NOT FALSE THEN RAISE NOTICE 'Adding spatially unique constraint required for regular blocking'; rtn := _add_raster_constraint_spatially_unique(schema, $2, $3); END IF; WHEN kw IN ('num_bands', 'numbands') THEN RAISE NOTICE 'Adding number of bands constraint'; rtn := _add_raster_constraint_num_bands(schema, $2, $3); WHEN kw IN ('pixel_types', 'pixeltypes') THEN RAISE NOTICE 'Adding pixel type constraint'; rtn := _add_raster_constraint_pixel_types(schema, $2, $3); WHEN kw IN ('nodata_values', 'nodatavalues', 'nodata') THEN RAISE NOTICE 'Adding nodata value constraint'; rtn := _add_raster_constraint_nodata_values(schema, $2, $3); WHEN kw IN ('out_db', 'outdb') THEN RAISE NOTICE 'Adding out-of-database constraint'; rtn := _add_raster_constraint_out_db(schema, $2, $3); WHEN kw = 'extent' THEN RAISE NOTICE 'Adding maximum extent constraint'; rtn := _add_raster_constraint_extent(schema, $2, $3); ELSE RAISE NOTICE 'Unknown constraint: %. Skipping', quote_literal(constraints[x]); CONTINUE kwloop; END CASE; END; IF rtn IS FALSE THEN cnt := cnt + 1; RAISE WARNING 'Unable to add constraint: %. Skipping', quote_literal(constraints[x]); END IF; END LOOP kwloop; IF cnt = max THEN RAISE EXCEPTION 'None of the constraints specified could be added. Is the schema name, table name or column name incorrect?'; RETURN FALSE; END IF; RETURN TRUE; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addrasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."addrasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) IS 'args: rastschema, rasttable, rastcolumn, VARIADIC constraints - Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice.'; -- ---------------------------- -- Function structure for public.addrasterconstraints(name, name, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addrasterconstraints"(name, name, _text); CREATE FUNCTION "public"."addrasterconstraints"(IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) RETURNS "bool" AS $BODY$ SELECT AddRasterConstraints('', $1, $2, VARIADIC $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addrasterconstraints"(IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."addrasterconstraints"(IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) IS 'args: rasttable, rastcolumn, VARIADIC constraints - Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice.'; -- ---------------------------- -- Function structure for public.addrasterconstraints(name, name, name, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addrasterconstraints"(name, name, name, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool); CREATE FUNCTION "public"."addrasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN srid bool DEFAULT true, IN scale_x bool DEFAULT true, IN scale_y bool DEFAULT true, IN blocksize_x bool DEFAULT true, IN blocksize_y bool DEFAULT true, IN same_alignment bool DEFAULT true, IN regular_blocking bool DEFAULT false, IN num_bands bool DEFAULT true, IN pixel_types bool DEFAULT true, IN nodata_values bool DEFAULT true, IN out_db bool DEFAULT true, IN extent bool DEFAULT true) RETURNS "bool" AS $BODY$ DECLARE constraints text[]; BEGIN IF srid IS TRUE THEN constraints := constraints || 'srid'::text; END IF; IF scale_x IS TRUE THEN constraints := constraints || 'scale_x'::text; END IF; IF scale_y IS TRUE THEN constraints := constraints || 'scale_y'::text; END IF; IF blocksize_x IS TRUE THEN constraints := constraints || 'blocksize_x'::text; END IF; IF blocksize_y IS TRUE THEN constraints := constraints || 'blocksize_y'::text; END IF; IF same_alignment IS TRUE THEN constraints := constraints || 'same_alignment'::text; END IF; IF regular_blocking IS TRUE THEN constraints := constraints || 'regular_blocking'::text; END IF; IF num_bands IS TRUE THEN constraints := constraints || 'num_bands'::text; END IF; IF pixel_types IS TRUE THEN constraints := constraints || 'pixel_types'::text; END IF; IF nodata_values IS TRUE THEN constraints := constraints || 'nodata_values'::text; END IF; IF out_db IS TRUE THEN constraints := constraints || 'out_db'::text; END IF; IF extent IS TRUE THEN constraints := constraints || 'extent'::text; END IF; RETURN AddRasterConstraints($1, $2, $3, VARIADIC constraints); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addrasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN srid bool, IN scale_x bool, IN scale_y bool, IN blocksize_x bool, IN blocksize_y bool, IN same_alignment bool, IN regular_blocking bool, IN num_bands bool, IN pixel_types bool, IN nodata_values bool, IN out_db bool, IN extent bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."addrasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN srid bool, IN scale_x bool, IN scale_y bool, IN blocksize_x bool, IN blocksize_y bool, IN same_alignment bool, IN regular_blocking bool, IN num_bands bool, IN pixel_types bool, IN nodata_values bool, IN out_db bool, IN extent bool) IS 'args: rastschema, rasttable, rastcolumn, srid=true, scale_x=true, scale_y=true, blocksize_x=true, blocksize_y=true, same_alignment=true, regular_blocking=false, num_bands=true, pixel_types=true, nodata_values=true, out_db=true, extent=true - Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice.'; -- ---------------------------- -- Function structure for public.addrasterconstraints(name, name, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addrasterconstraints"(name, name, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool); CREATE FUNCTION "public"."addrasterconstraints"(IN rasttable name, IN rastcolumn name, IN srid bool DEFAULT true, IN scale_x bool DEFAULT true, IN scale_y bool DEFAULT true, IN blocksize_x bool DEFAULT true, IN blocksize_y bool DEFAULT true, IN same_alignment bool DEFAULT true, IN regular_blocking bool DEFAULT false, IN num_bands bool DEFAULT true, IN pixel_types bool DEFAULT true, IN nodata_values bool DEFAULT true, IN out_db bool DEFAULT true, IN extent bool DEFAULT true) RETURNS "bool" AS $BODY$ SELECT AddRasterConstraints('', $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addrasterconstraints"(IN rasttable name, IN rastcolumn name, IN srid bool, IN scale_x bool, IN scale_y bool, IN blocksize_x bool, IN blocksize_y bool, IN same_alignment bool, IN regular_blocking bool, IN num_bands bool, IN pixel_types bool, IN nodata_values bool, IN out_db bool, IN extent bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."addrasterconstraints"(IN rasttable name, IN rastcolumn name, IN srid bool, IN scale_x bool, IN scale_y bool, IN blocksize_x bool, IN blocksize_y bool, IN same_alignment bool, IN regular_blocking bool, IN num_bands bool, IN pixel_types bool, IN nodata_values bool, IN out_db bool, IN extent bool) IS 'args: rasttable, rastcolumn, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands=true, pixel_types=true, nodata_values=true, out_db=true, extent=true - Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice.'; -- ---------------------------- -- Function structure for public.droprasterconstraints(name, name, name, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."droprasterconstraints"(name, name, name, _text); CREATE FUNCTION "public"."droprasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) RETURNS "bool" AS $BODY$ DECLARE max int; x int; schema name; sql text; kw text; rtn boolean; cnt int; BEGIN cnt := 0; max := array_length(constraints, 1); IF max < 1 THEN RAISE NOTICE 'No constraints indicated to be dropped. Doing nothing'; RETURN TRUE; END IF; -- validate schema schema := NULL; IF length($1) > 0 THEN sql := 'SELECT nspname FROM pg_namespace ' || 'WHERE nspname = ' || quote_literal($1) || 'LIMIT 1'; EXECUTE sql INTO schema; IF schema IS NULL THEN RAISE EXCEPTION 'The value provided for schema is invalid'; RETURN FALSE; END IF; END IF; IF schema IS NULL THEN sql := 'SELECT n.nspname AS schemaname ' || 'FROM pg_catalog.pg_class c ' || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' || 'WHERE c.relkind = ' || quote_literal('r') || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ') AND pg_catalog.pg_table_is_visible(c.oid)' || ' AND c.relname = ' || quote_literal($2); EXECUTE sql INTO schema; IF schema IS NULL THEN RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal($2); RETURN FALSE; END IF; END IF; <<kwloop>> FOR x in 1..max LOOP kw := trim(both from lower(constraints[x])); BEGIN CASE WHEN kw = 'srid' THEN RAISE NOTICE 'Dropping SRID constraint'; rtn := _drop_raster_constraint_srid(schema, $2, $3); WHEN kw IN ('scale_x', 'scalex') THEN RAISE NOTICE 'Dropping scale-X constraint'; rtn := _drop_raster_constraint_scale(schema, $2, $3, 'x'); WHEN kw IN ('scale_y', 'scaley') THEN RAISE NOTICE 'Dropping scale-Y constraint'; rtn := _drop_raster_constraint_scale(schema, $2, $3, 'y'); WHEN kw = 'scale' THEN RAISE NOTICE 'Dropping scale-X constraint'; rtn := _drop_raster_constraint_scale(schema, $2, $3, 'x'); RAISE NOTICE 'Dropping scale-Y constraint'; rtn := _drop_raster_constraint_scale(schema, $2, $3, 'y'); WHEN kw IN ('blocksize_x', 'blocksizex', 'width') THEN RAISE NOTICE 'Dropping blocksize-X constraint'; rtn := _drop_raster_constraint_blocksize(schema, $2, $3, 'width'); WHEN kw IN ('blocksize_y', 'blocksizey', 'height') THEN RAISE NOTICE 'Dropping blocksize-Y constraint'; rtn := _drop_raster_constraint_blocksize(schema, $2, $3, 'height'); WHEN kw = 'blocksize' THEN RAISE NOTICE 'Dropping blocksize-X constraint'; rtn := _drop_raster_constraint_blocksize(schema, $2, $3, 'width'); RAISE NOTICE 'Dropping blocksize-Y constraint'; rtn := _drop_raster_constraint_blocksize(schema, $2, $3, 'height'); WHEN kw IN ('same_alignment', 'samealignment', 'alignment') THEN RAISE NOTICE 'Dropping alignment constraint'; rtn := _drop_raster_constraint_alignment(schema, $2, $3); WHEN kw IN ('regular_blocking', 'regularblocking') THEN rtn := _drop_raster_constraint_regular_blocking(schema, $2, $3); RAISE NOTICE 'Dropping coverage tile constraint required for regular blocking'; rtn := _drop_raster_constraint_coverage_tile(schema, $2, $3); IF rtn IS NOT FALSE THEN RAISE NOTICE 'Dropping spatially unique constraint required for regular blocking'; rtn := _drop_raster_constraint_spatially_unique(schema, $2, $3); END IF; WHEN kw IN ('num_bands', 'numbands') THEN RAISE NOTICE 'Dropping number of bands constraint'; rtn := _drop_raster_constraint_num_bands(schema, $2, $3); WHEN kw IN ('pixel_types', 'pixeltypes') THEN RAISE NOTICE 'Dropping pixel type constraint'; rtn := _drop_raster_constraint_pixel_types(schema, $2, $3); WHEN kw IN ('nodata_values', 'nodatavalues', 'nodata') THEN RAISE NOTICE 'Dropping nodata value constraint'; rtn := _drop_raster_constraint_nodata_values(schema, $2, $3); WHEN kw IN ('out_db', 'outdb') THEN RAISE NOTICE 'Dropping out-of-database constraint'; rtn := _drop_raster_constraint_out_db(schema, $2, $3); WHEN kw = 'extent' THEN RAISE NOTICE 'Dropping maximum extent constraint'; rtn := _drop_raster_constraint_extent(schema, $2, $3); ELSE RAISE NOTICE 'Unknown constraint: %. Skipping', quote_literal(constraints[x]); CONTINUE kwloop; END CASE; END; IF rtn IS FALSE THEN cnt := cnt + 1; RAISE WARNING 'Unable to drop constraint: %. Skipping', quote_literal(constraints[x]); END IF; END LOOP kwloop; IF cnt = max THEN RAISE EXCEPTION 'None of the constraints specified could be dropped. Is the schema name, table name or column name incorrect?'; RETURN FALSE; END IF; RETURN TRUE; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."droprasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."droprasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) IS 'args: rastschema, rasttable, rastcolumn, constraints - Drops PostGIS raster constraints that refer to a raster table column. Useful if you need to reload data or update your raster column data.'; -- ---------------------------- -- Function structure for public.droprasterconstraints(name, name, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."droprasterconstraints"(name, name, _text); CREATE FUNCTION "public"."droprasterconstraints"(IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) RETURNS "bool" AS $BODY$ SELECT DropRasterConstraints('', $1, $2, VARIADIC $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."droprasterconstraints"(IN rasttable name, IN rastcolumn name, INOUT "constraints" _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.droprasterconstraints(name, name, name, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."droprasterconstraints"(name, name, name, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool); CREATE FUNCTION "public"."droprasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN srid bool DEFAULT true, IN scale_x bool DEFAULT true, IN scale_y bool DEFAULT true, IN blocksize_x bool DEFAULT true, IN blocksize_y bool DEFAULT true, IN same_alignment bool DEFAULT true, IN regular_blocking bool DEFAULT true, IN num_bands bool DEFAULT true, IN pixel_types bool DEFAULT true, IN nodata_values bool DEFAULT true, IN out_db bool DEFAULT true, IN extent bool DEFAULT true) RETURNS "bool" AS $BODY$ DECLARE constraints text[]; BEGIN IF srid IS TRUE THEN constraints := constraints || 'srid'::text; END IF; IF scale_x IS TRUE THEN constraints := constraints || 'scale_x'::text; END IF; IF scale_y IS TRUE THEN constraints := constraints || 'scale_y'::text; END IF; IF blocksize_x IS TRUE THEN constraints := constraints || 'blocksize_x'::text; END IF; IF blocksize_y IS TRUE THEN constraints := constraints || 'blocksize_y'::text; END IF; IF same_alignment IS TRUE THEN constraints := constraints || 'same_alignment'::text; END IF; IF regular_blocking IS TRUE THEN constraints := constraints || 'regular_blocking'::text; END IF; IF num_bands IS TRUE THEN constraints := constraints || 'num_bands'::text; END IF; IF pixel_types IS TRUE THEN constraints := constraints || 'pixel_types'::text; END IF; IF nodata_values IS TRUE THEN constraints := constraints || 'nodata_values'::text; END IF; IF out_db IS TRUE THEN constraints := constraints || 'out_db'::text; END IF; IF extent IS TRUE THEN constraints := constraints || 'extent'::text; END IF; RETURN DropRasterConstraints($1, $2, $3, VARIADIC constraints); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."droprasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN srid bool, IN scale_x bool, IN scale_y bool, IN blocksize_x bool, IN blocksize_y bool, IN same_alignment bool, IN regular_blocking bool, IN num_bands bool, IN pixel_types bool, IN nodata_values bool, IN out_db bool, IN extent bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."droprasterconstraints"(IN rastschema name, IN rasttable name, IN rastcolumn name, IN srid bool, IN scale_x bool, IN scale_y bool, IN blocksize_x bool, IN blocksize_y bool, IN same_alignment bool, IN regular_blocking bool, IN num_bands bool, IN pixel_types bool, IN nodata_values bool, IN out_db bool, IN extent bool) IS 'args: rastschema, rasttable, rastcolumn, srid=true, scale_x=true, scale_y=true, blocksize_x=true, blocksize_y=true, same_alignment=true, regular_blocking=false, num_bands=true, pixel_types=true, nodata_values=true, out_db=true, extent=true - Drops PostGIS raster constraints that refer to a raster table column. Useful if you need to reload data or update your raster column data.'; -- ---------------------------- -- Function structure for public.droprasterconstraints(name, name, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."droprasterconstraints"(name, name, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool); CREATE FUNCTION "public"."droprasterconstraints"(IN rasttable name, IN rastcolumn name, IN srid bool DEFAULT true, IN scale_x bool DEFAULT true, IN scale_y bool DEFAULT true, IN blocksize_x bool DEFAULT true, IN blocksize_y bool DEFAULT true, IN same_alignment bool DEFAULT true, IN regular_blocking bool DEFAULT true, IN num_bands bool DEFAULT true, IN pixel_types bool DEFAULT true, IN nodata_values bool DEFAULT true, IN out_db bool DEFAULT true, IN extent bool DEFAULT true) RETURNS "bool" AS $BODY$ SELECT DropRasterConstraints('', $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."droprasterconstraints"(IN rasttable name, IN rastcolumn name, IN srid bool, IN scale_x bool, IN scale_y bool, IN blocksize_x bool, IN blocksize_y bool, IN same_alignment bool, IN regular_blocking bool, IN num_bands bool, IN pixel_types bool, IN nodata_values bool, IN out_db bool, IN extent bool) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."droprasterconstraints"(IN rasttable name, IN rastcolumn name, IN srid bool, IN scale_x bool, IN scale_y bool, IN blocksize_x bool, IN blocksize_y bool, IN same_alignment bool, IN regular_blocking bool, IN num_bands bool, IN pixel_types bool, IN nodata_values bool, IN out_db bool, IN extent bool) IS 'args: rasttable, rastcolumn, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands=true, pixel_types=true, nodata_values=true, out_db=true, extent=true - Drops PostGIS raster constraints that refer to a raster table column. Useful if you need to reload data or update your raster column data.'; -- ---------------------------- -- Function structure for public._overview_constraint("public"."raster", int4, name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_overview_constraint"("public"."raster", int4, name, name, name); CREATE FUNCTION "public"."_overview_constraint"(IN ov "public"."raster", IN factor int4, IN refschema name, IN reftable name, IN refcolumn name) RETURNS "bool" AS $BODY$ SELECT COALESCE((SELECT TRUE FROM raster_columns WHERE r_table_catalog = current_database() AND r_table_schema = $3 AND r_table_name = $4 AND r_raster_column = $5), FALSE) $BODY$ LANGUAGE sql COST 100 CALLED ON NULL INPUT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_overview_constraint"(IN ov "public"."raster", IN factor int4, IN refschema name, IN reftable name, IN refcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._overview_constraint_info(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_overview_constraint_info"(name, name, name); CREATE FUNCTION "public"."_overview_constraint_info"(IN ovschema name, IN ovtable name, IN ovcolumn name, OUT refschema name, OUT reftable name, OUT refcolumn name, OUT factor int4) RETURNS "record" AS $BODY$ SELECT split_part(split_part(s.consrc, '''::name', 1), '''', 2)::name, split_part(split_part(s.consrc, '''::name', 2), '''', 2)::name, split_part(split_part(s.consrc, '''::name', 3), '''', 2)::name, trim(both from split_part(s.consrc, ',', 2))::integer FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s WHERE n.nspname = $1 AND c.relname = $2 AND a.attname = $3 AND a.attrelid = c.oid AND s.connamespace = n.oid AND s.conrelid = c.oid AND a.attnum = ANY (s.conkey) AND s.consrc LIKE '%_overview_constraint(%' $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER STABLE; ALTER FUNCTION "public"."_overview_constraint_info"(IN ovschema name, IN ovtable name, IN ovcolumn name, OUT refschema name, OUT reftable name, OUT refcolumn name, OUT factor int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._add_overview_constraint(name, name, name, name, name, name, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_add_overview_constraint"(name, name, name, name, name, name, int4); CREATE FUNCTION "public"."_add_overview_constraint"(IN ovschema name, IN ovtable name, IN ovcolumn name, IN refschema name, IN reftable name, IN refcolumn name, IN factor int4) RETURNS "bool" AS $BODY$ DECLARE fqtn text; cn name; sql text; BEGIN fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); cn := 'enforce_overview_' || $3; sql := 'ALTER TABLE ' || fqtn || ' ADD CONSTRAINT ' || quote_ident(cn) || ' CHECK (_overview_constraint(' || quote_ident($3) || ',' || $7 || ',' || quote_literal($4) || ',' || quote_literal($5) || ',' || quote_literal($6) || '))'; RETURN _add_raster_constraint(cn, sql); END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_add_overview_constraint"(IN ovschema name, IN ovtable name, IN ovcolumn name, IN refschema name, IN reftable name, IN refcolumn name, IN factor int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._drop_overview_constraint(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_drop_overview_constraint"(name, name, name); CREATE FUNCTION "public"."_drop_overview_constraint"(IN ovschema name, IN ovtable name, IN ovcolumn name) RETURNS "bool" AS $BODY$ SELECT _drop_raster_constraint($1, $2, 'enforce_overview_' || $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_drop_overview_constraint"(IN ovschema name, IN ovtable name, IN ovcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.addoverviewconstraints(name, name, name, name, name, name, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addoverviewconstraints"(name, name, name, name, name, name, int4); CREATE FUNCTION "public"."addoverviewconstraints"(IN ovschema name, IN ovtable name, IN ovcolumn name, IN refschema name, IN reftable name, IN refcolumn name, IN ovfactor int4) RETURNS "bool" AS $BODY$ DECLARE x int; s name; t name; oschema name; rschema name; sql text; rtn boolean; BEGIN FOR x IN 1..2 LOOP s := ''; IF x = 1 THEN s := $1; t := $2; ELSE s := $4; t := $5; END IF; -- validate user-provided schema IF length(s) > 0 THEN sql := 'SELECT nspname FROM pg_namespace ' || 'WHERE nspname = ' || quote_literal(s) || 'LIMIT 1'; EXECUTE sql INTO s; IF s IS NULL THEN RAISE EXCEPTION 'The value % is not a valid schema', quote_literal(s); RETURN FALSE; END IF; END IF; -- no schema, determine what it could be using the table IF length(s) < 1 THEN sql := 'SELECT n.nspname AS schemaname ' || 'FROM pg_catalog.pg_class c ' || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' || 'WHERE c.relkind = ' || quote_literal('r') || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ') AND pg_catalog.pg_table_is_visible(c.oid)' || ' AND c.relname = ' || quote_literal(t); EXECUTE sql INTO s; IF s IS NULL THEN RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal(t); RETURN FALSE; END IF; END IF; IF x = 1 THEN oschema := s; ELSE rschema := s; END IF; END LOOP; -- reference raster rtn := _add_overview_constraint(oschema, $2, $3, rschema, $5, $6, $7); IF rtn IS FALSE THEN RAISE EXCEPTION 'Unable to add the overview constraint. Is the schema name, table name or column name incorrect?'; RETURN FALSE; END IF; RETURN TRUE; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addoverviewconstraints"(IN ovschema name, IN ovtable name, IN ovcolumn name, IN refschema name, IN reftable name, IN refcolumn name, IN ovfactor int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.addoverviewconstraints(name, name, name, name, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."addoverviewconstraints"(name, name, name, name, int4); CREATE FUNCTION "public"."addoverviewconstraints"(IN ovtable name, IN ovcolumn name, IN reftable name, IN refcolumn name, IN ovfactor int4) RETURNS "bool" AS $BODY$ SELECT AddOverviewConstraints('', $1, $2, '', $3, $4, $5) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."addoverviewconstraints"(IN ovtable name, IN ovcolumn name, IN reftable name, IN refcolumn name, IN ovfactor int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore(record) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore"(record); CREATE FUNCTION "public"."hstore"(IN record) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_from_record' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore"(IN record) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_to_array("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_to_array"("public"."hstore"); CREATE FUNCTION "public"."hstore_to_array"(IN "public"."hstore") RETURNS "_text" AS '$libdir/hstore','hstore_to_array' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_to_array"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.dropoverviewconstraints(name, name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dropoverviewconstraints"(name, name, name); CREATE FUNCTION "public"."dropoverviewconstraints"(IN ovschema name, IN ovtable name, IN ovcolumn name) RETURNS "bool" AS $BODY$ DECLARE schema name; sql text; rtn boolean; BEGIN -- validate schema schema := NULL; IF length($1) > 0 THEN sql := 'SELECT nspname FROM pg_namespace ' || 'WHERE nspname = ' || quote_literal($1) || 'LIMIT 1'; EXECUTE sql INTO schema; IF schema IS NULL THEN RAISE EXCEPTION 'The value provided for schema is invalid'; RETURN FALSE; END IF; END IF; IF schema IS NULL THEN sql := 'SELECT n.nspname AS schemaname ' || 'FROM pg_catalog.pg_class c ' || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' || 'WHERE c.relkind = ' || quote_literal('r') || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ') AND pg_catalog.pg_table_is_visible(c.oid)' || ' AND c.relname = ' || quote_literal($2); EXECUTE sql INTO schema; IF schema IS NULL THEN RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal($2); RETURN FALSE; END IF; END IF; rtn := _drop_overview_constraint(schema, $2, $3); IF rtn IS FALSE THEN RAISE EXCEPTION 'Unable to drop the overview constraint . Is the schema name, table name or column name incorrect?'; RETURN FALSE; END IF; RETURN TRUE; END; $BODY$ LANGUAGE plpgsql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."dropoverviewconstraints"(IN ovschema name, IN ovtable name, IN ovcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.dropoverviewconstraints(name, name) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dropoverviewconstraints"(name, name); CREATE FUNCTION "public"."dropoverviewconstraints"(IN ovtable name, IN ovcolumn name) RETURNS "bool" AS $BODY$ SELECT DropOverviewConstraints('', $1, $2) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."dropoverviewconstraints"(IN ovtable name, IN ovcolumn name) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public._updaterastersrid(name, name, name, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."_updaterastersrid"(name, name, name, int4); CREATE FUNCTION "public"."_updaterastersrid"(IN "schema_name" name, IN "table_name" name, IN "column_name" name, IN new_srid int4) RETURNS "bool" AS $BODY$ DECLARE fqtn text; schema name; sql text; srid integer; ct boolean; BEGIN -- validate schema schema := NULL; IF length($1) > 0 THEN sql := 'SELECT nspname FROM pg_namespace ' || 'WHERE nspname = ' || quote_literal($1) || 'LIMIT 1'; EXECUTE sql INTO schema; IF schema IS NULL THEN RAISE EXCEPTION 'The value provided for schema is invalid'; RETURN FALSE; END IF; END IF; IF schema IS NULL THEN sql := 'SELECT n.nspname AS schemaname ' || 'FROM pg_catalog.pg_class c ' || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' || 'WHERE c.relkind = ' || quote_literal('r') || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ') AND pg_catalog.pg_table_is_visible(c.oid)' || ' AND c.relname = ' || quote_literal($2); EXECUTE sql INTO schema; IF schema IS NULL THEN RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal($2); RETURN FALSE; END IF; END IF; -- clamp SRID IF new_srid < 0 THEN srid := ST_SRID('POINT EMPTY'::geometry); RAISE NOTICE 'SRID % converted to the officially unknown SRID %', new_srid, srid; ELSE srid := new_srid; END IF; -- drop coverage tile constraint -- done separately just in case constraint doesn't exist ct := _raster_constraint_info_coverage_tile(schema, $2, $3); IF ct IS TRUE THEN PERFORM _drop_raster_constraint_coverage_tile(schema, $2, $3); END IF; -- drop SRID, extent, alignment constraints PERFORM DropRasterConstraints(schema, $2, $3, 'extent', 'alignment', 'srid'); fqtn := ''; IF length($1) > 0 THEN fqtn := quote_ident($1) || '.'; END IF; fqtn := fqtn || quote_ident($2); -- update SRID sql := 'UPDATE ' || fqtn || ' SET ' || quote_ident($3) || ' = ST_SetSRID(' || quote_ident($3) || '::raster, ' || srid || ')'; RAISE NOTICE 'sql = %', sql; EXECUTE sql; -- add SRID constraint PERFORM AddRasterConstraints(schema, $2, $3, 'srid', 'extent', 'alignment'); -- add coverage tile constraint if needed IF ct IS TRUE THEN PERFORM _add_raster_constraint_coverage_tile(schema, $2, $3); END IF; RETURN TRUE; END; $BODY$ LANGUAGE plpgsql COST 100 CALLED ON NULL INPUT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."_updaterastersrid"(IN "schema_name" name, IN "table_name" name, IN "column_name" name, IN new_srid int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.updaterastersrid(name, name, name, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."updaterastersrid"(name, name, name, int4); CREATE FUNCTION "public"."updaterastersrid"(IN "schema_name" name, IN "table_name" name, IN "column_name" name, IN new_srid int4) RETURNS "bool" AS $BODY$ SELECT _UpdateRasterSRID($1, $2, $3, $4) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."updaterastersrid"(IN "schema_name" name, IN "table_name" name, IN "column_name" name, IN new_srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."updaterastersrid"(IN "schema_name" name, IN "table_name" name, IN "column_name" name, IN new_srid int4) IS 'args: schema_name, table_name, column_name, new_srid - Change the SRID of all rasters in the user-specified column and table.'; -- ---------------------------- -- Function structure for public.updaterastersrid(name, name, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."updaterastersrid"(name, name, int4); CREATE FUNCTION "public"."updaterastersrid"(IN "table_name" name, IN "column_name" name, IN new_srid int4) RETURNS "bool" AS $BODY$ SELECT _UpdateRasterSRID('', $1, $2, $3) $BODY$ LANGUAGE sql COST 100 STRICT SECURITY INVOKER VOLATILE; ALTER FUNCTION "public"."updaterastersrid"(IN "table_name" name, IN "column_name" name, IN new_srid int4) OWNER TO "rdsadmin"; COMMENT ON FUNCTION "public"."updaterastersrid"(IN "table_name" name, IN "column_name" name, IN new_srid int4) IS 'args: table_name, column_name, new_srid - Change the SRID of all rasters in the user-specified column and table.'; -- ---------------------------- -- Function structure for public.levenshtein(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."levenshtein"(text, text); CREATE FUNCTION "public"."levenshtein"(IN text, IN text) RETURNS "int4" AS '$libdir/fuzzystrmatch','levenshtein' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."levenshtein"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.levenshtein(text, text, int4, int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."levenshtein"(text, text, int4, int4, int4); CREATE FUNCTION "public"."levenshtein"(IN text, IN text, IN int4, IN int4, IN int4) RETURNS "int4" AS '$libdir/fuzzystrmatch','levenshtein_with_costs' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."levenshtein"(IN text, IN text, IN int4, IN int4, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.levenshtein_less_equal(text, text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."levenshtein_less_equal"(text, text, int4); CREATE FUNCTION "public"."levenshtein_less_equal"(IN text, IN text, IN int4) RETURNS "int4" AS '$libdir/fuzzystrmatch','levenshtein_less_equal' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."levenshtein_less_equal"(IN text, IN text, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.levenshtein_less_equal(text, text, int4, int4, int4, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."levenshtein_less_equal"(text, text, int4, int4, int4, int4); CREATE FUNCTION "public"."levenshtein_less_equal"(IN text, IN text, IN int4, IN int4, IN int4, IN int4) RETURNS "int4" AS '$libdir/fuzzystrmatch','levenshtein_less_equal_with_costs' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."levenshtein_less_equal"(IN text, IN text, IN int4, IN int4, IN int4, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.metaphone(text, int4) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."metaphone"(text, int4); CREATE FUNCTION "public"."metaphone"(IN text, IN int4) RETURNS "text" AS '$libdir/fuzzystrmatch','metaphone' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."metaphone"(IN text, IN int4) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.soundex(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."soundex"(text); CREATE FUNCTION "public"."soundex"(IN text) RETURNS "text" AS '$libdir/fuzzystrmatch','soundex' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."soundex"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.text_soundex(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."text_soundex"(text); CREATE FUNCTION "public"."text_soundex"(IN text) RETURNS "text" AS '$libdir/fuzzystrmatch','soundex' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."text_soundex"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.difference(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."difference"(text, text); CREATE FUNCTION "public"."difference"(IN text, IN text) RETURNS "int4" AS '$libdir/fuzzystrmatch','difference' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."difference"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.dmetaphone(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dmetaphone"(text); CREATE FUNCTION "public"."dmetaphone"(IN text) RETURNS "text" AS '$libdir/fuzzystrmatch','dmetaphone' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."dmetaphone"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.dmetaphone_alt(text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."dmetaphone_alt"(text); CREATE FUNCTION "public"."dmetaphone_alt"(IN text) RETURNS "text" AS '$libdir/fuzzystrmatch','dmetaphone_alt' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."dmetaphone_alt"(IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.isdefined("public"."hstore", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."isdefined"("public"."hstore", text); CREATE FUNCTION "public"."isdefined"(IN "public"."hstore", IN text) RETURNS "bool" AS '$libdir/hstore','hstore_defined' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."isdefined"(IN "public"."hstore", IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.defined("public"."hstore", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."defined"("public"."hstore", text); CREATE FUNCTION "public"."defined"(IN "public"."hstore", IN text) RETURNS "bool" AS '$libdir/hstore','hstore_defined' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."defined"(IN "public"."hstore", IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.delete("public"."hstore", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."delete"("public"."hstore", text); CREATE FUNCTION "public"."delete"(IN "public"."hstore", IN text) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_delete' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."delete"(IN "public"."hstore", IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.delete("public"."hstore", _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."delete"("public"."hstore", _text); CREATE FUNCTION "public"."delete"(IN "public"."hstore", IN _text) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_delete_array' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."delete"(IN "public"."hstore", IN _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.delete("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."delete"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."delete"(IN "public"."hstore", IN "public"."hstore") RETURNS "public"."hstore" AS '$libdir/hstore','hstore_delete_hstore' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."delete"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hs_concat("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hs_concat"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hs_concat"(IN "public"."hstore", IN "public"."hstore") RETURNS "public"."hstore" AS '$libdir/hstore','hstore_concat' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hs_concat"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hs_contains("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hs_contains"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hs_contains"(IN "public"."hstore", IN "public"."hstore") RETURNS "bool" AS '$libdir/hstore','hstore_contains' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hs_contains"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hs_contained("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hs_contained"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hs_contained"(IN "public"."hstore", IN "public"."hstore") RETURNS "bool" AS '$libdir/hstore','hstore_contained' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hs_contained"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.tconvert(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."tconvert"(text, text); CREATE FUNCTION "public"."tconvert"(IN text, IN text) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_from_text' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."tconvert"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore(text, text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore"(text, text); CREATE FUNCTION "public"."hstore"(IN text, IN text) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_from_text' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore"(IN text, IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore(_text, _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore"(_text, _text); CREATE FUNCTION "public"."hstore"(IN _text, IN _text) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_from_arrays' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore"(IN _text, IN _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore(_text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore"(_text); CREATE FUNCTION "public"."hstore"(IN _text) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_from_array' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore"(IN _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_to_json("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_to_json"("public"."hstore"); CREATE FUNCTION "public"."hstore_to_json"(IN "public"."hstore") RETURNS "json" AS '$libdir/hstore','hstore_to_json' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_to_json"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_to_json_loose("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_to_json_loose"("public"."hstore"); CREATE FUNCTION "public"."hstore_to_json_loose"(IN "public"."hstore") RETURNS "json" AS '$libdir/hstore','hstore_to_json_loose' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_to_json_loose"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_in"(cstring); CREATE FUNCTION "public"."hstore_in"(IN cstring) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_out("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_out"("public"."hstore"); CREATE FUNCTION "public"."hstore_out"(IN "public"."hstore") RETURNS "cstring" AS '$libdir/hstore','hstore_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_out"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_recv(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_recv"(internal); CREATE FUNCTION "public"."hstore_recv"(IN internal) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_recv' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_recv"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_send("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_send"("public"."hstore"); CREATE FUNCTION "public"."hstore_send"(IN "public"."hstore") RETURNS "bytea" AS '$libdir/hstore','hstore_send' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_send"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_version_diag("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_version_diag"("public"."hstore"); CREATE FUNCTION "public"."hstore_version_diag"(IN "public"."hstore") RETURNS "int4" AS '$libdir/hstore','hstore_version_diag' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_version_diag"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.fetchval("public"."hstore", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."fetchval"("public"."hstore", text); CREATE FUNCTION "public"."fetchval"(IN "public"."hstore", IN text) RETURNS "text" AS '$libdir/hstore','hstore_fetchval' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."fetchval"(IN "public"."hstore", IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.slice_array("public"."hstore", _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."slice_array"("public"."hstore", _text); CREATE FUNCTION "public"."slice_array"(IN "public"."hstore", IN _text) RETURNS "_text" AS '$libdir/hstore','hstore_slice_to_array' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."slice_array"(IN "public"."hstore", IN _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.slice("public"."hstore", _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."slice"("public"."hstore", _text); CREATE FUNCTION "public"."slice"(IN "public"."hstore", IN _text) RETURNS "public"."hstore" AS '$libdir/hstore','hstore_slice_to_hstore' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."slice"(IN "public"."hstore", IN _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.isexists("public"."hstore", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."isexists"("public"."hstore", text); CREATE FUNCTION "public"."isexists"(IN "public"."hstore", IN text) RETURNS "bool" AS '$libdir/hstore','hstore_exists' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."isexists"(IN "public"."hstore", IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.exist("public"."hstore", text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."exist"("public"."hstore", text); CREATE FUNCTION "public"."exist"(IN "public"."hstore", IN text) RETURNS "bool" AS '$libdir/hstore','hstore_exists' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."exist"(IN "public"."hstore", IN text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.exists_any("public"."hstore", _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."exists_any"("public"."hstore", _text); CREATE FUNCTION "public"."exists_any"(IN "public"."hstore", IN _text) RETURNS "bool" AS '$libdir/hstore','hstore_exists_any' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."exists_any"(IN "public"."hstore", IN _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.exists_all("public"."hstore", _text) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."exists_all"("public"."hstore", _text); CREATE FUNCTION "public"."exists_all"(IN "public"."hstore", IN _text) RETURNS "bool" AS '$libdir/hstore','hstore_exists_all' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."exists_all"(IN "public"."hstore", IN _text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_to_matrix("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_to_matrix"("public"."hstore"); CREATE FUNCTION "public"."hstore_to_matrix"(IN "public"."hstore") RETURNS "_text" AS '$libdir/hstore','hstore_to_matrix' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_to_matrix"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.akeys("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."akeys"("public"."hstore"); CREATE FUNCTION "public"."akeys"(IN "public"."hstore") RETURNS "_text" AS '$libdir/hstore','hstore_akeys' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."akeys"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.avals("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."avals"("public"."hstore"); CREATE FUNCTION "public"."avals"(IN "public"."hstore") RETURNS "_text" AS '$libdir/hstore','hstore_avals' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."avals"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.skeys("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."skeys"("public"."hstore"); CREATE FUNCTION "public"."skeys"(IN "public"."hstore") RETURNS SETOF "text" AS '$libdir/hstore','hstore_skeys' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."skeys"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.svals("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."svals"("public"."hstore"); CREATE FUNCTION "public"."svals"(IN "public"."hstore") RETURNS SETOF "text" AS '$libdir/hstore','hstore_svals' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."svals"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.each("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."each"("public"."hstore"); CREATE FUNCTION "public"."each"(IN hs "public"."hstore", OUT "key" text, OUT "value" text) RETURNS SETOF "record" AS '$libdir/hstore','hstore_each' LANGUAGE c COST 1 ROWS 1000 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."each"(IN hs "public"."hstore", OUT "key" text, OUT "value" text) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.populate_record(anyelement, "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."populate_record"(anyelement, "public"."hstore"); CREATE FUNCTION "public"."populate_record"(IN anyelement, IN "public"."hstore") RETURNS "anyelement" AS '$libdir/hstore','hstore_populate_record' LANGUAGE c COST 1 CALLED ON NULL INPUT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."populate_record"(IN anyelement, IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_eq("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_eq"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hstore_eq"(IN "public"."hstore", IN "public"."hstore") RETURNS "bool" AS '$libdir/hstore','hstore_eq' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_eq"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_ne("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_ne"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hstore_ne"(IN "public"."hstore", IN "public"."hstore") RETURNS "bool" AS '$libdir/hstore','hstore_ne' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_ne"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_gt("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_gt"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hstore_gt"(IN "public"."hstore", IN "public"."hstore") RETURNS "bool" AS '$libdir/hstore','hstore_gt' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_gt"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_ge("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_ge"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hstore_ge"(IN "public"."hstore", IN "public"."hstore") RETURNS "bool" AS '$libdir/hstore','hstore_ge' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_ge"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_lt("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_lt"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hstore_lt"(IN "public"."hstore", IN "public"."hstore") RETURNS "bool" AS '$libdir/hstore','hstore_lt' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_lt"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_le("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_le"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hstore_le"(IN "public"."hstore", IN "public"."hstore") RETURNS "bool" AS '$libdir/hstore','hstore_le' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_le"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_cmp("public"."hstore", "public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_cmp"("public"."hstore", "public"."hstore"); CREATE FUNCTION "public"."hstore_cmp"(IN "public"."hstore", IN "public"."hstore") RETURNS "int4" AS '$libdir/hstore','hstore_cmp' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_cmp"(IN "public"."hstore", IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.hstore_hash("public"."hstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."hstore_hash"("public"."hstore"); CREATE FUNCTION "public"."hstore_hash"(IN "public"."hstore") RETURNS "int4" AS '$libdir/hstore','hstore_hash' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."hstore_hash"(IN "public"."hstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_in(cstring) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_in"(cstring); CREATE FUNCTION "public"."ghstore_in"(IN cstring) RETURNS "public"."ghstore" AS '$libdir/hstore','ghstore_in' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_in"(IN cstring) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_out("public"."ghstore") -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_out"("public"."ghstore"); CREATE FUNCTION "public"."ghstore_out"(IN "public"."ghstore") RETURNS "cstring" AS '$libdir/hstore','ghstore_out' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_out"(IN "public"."ghstore") OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_compress(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_compress"(internal); CREATE FUNCTION "public"."ghstore_compress"(IN internal) RETURNS "internal" AS '$libdir/hstore','ghstore_compress' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_compress"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_decompress(internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_decompress"(internal); CREATE FUNCTION "public"."ghstore_decompress"(IN internal) RETURNS "internal" AS '$libdir/hstore','ghstore_decompress' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_decompress"(IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_penalty(internal, internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_penalty"(internal, internal, internal); CREATE FUNCTION "public"."ghstore_penalty"(IN internal, IN internal, IN internal) RETURNS "internal" AS '$libdir/hstore','ghstore_penalty' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_penalty"(IN internal, IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_picksplit(internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_picksplit"(internal, internal); CREATE FUNCTION "public"."ghstore_picksplit"(IN internal, IN internal) RETURNS "internal" AS '$libdir/hstore','ghstore_picksplit' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_picksplit"(IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_union(internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_union"(internal, internal); CREATE FUNCTION "public"."ghstore_union"(IN internal, IN internal) RETURNS "internal" AS '$libdir/hstore','ghstore_union' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_union"(IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_same(internal, internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_same"(internal, internal, internal); CREATE FUNCTION "public"."ghstore_same"(IN internal, IN internal, IN internal) RETURNS "internal" AS '$libdir/hstore','ghstore_same' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_same"(IN internal, IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.ghstore_consistent(internal, internal, int4, oid, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."ghstore_consistent"(internal, internal, int4, oid, internal); CREATE FUNCTION "public"."ghstore_consistent"(IN internal, IN internal, IN int4, IN oid, IN internal) RETURNS "bool" AS '$libdir/hstore','ghstore_consistent' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."ghstore_consistent"(IN internal, IN internal, IN int4, IN oid, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gin_extract_hstore(internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gin_extract_hstore"(internal, internal); CREATE FUNCTION "public"."gin_extract_hstore"(IN internal, IN internal) RETURNS "internal" AS '$libdir/hstore','gin_extract_hstore' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."gin_extract_hstore"(IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gin_extract_hstore_query(internal, internal, int2, internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gin_extract_hstore_query"(internal, internal, int2, internal, internal); CREATE FUNCTION "public"."gin_extract_hstore_query"(IN internal, IN internal, IN int2, IN internal, IN internal) RETURNS "internal" AS '$libdir/hstore','gin_extract_hstore_query' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."gin_extract_hstore_query"(IN internal, IN internal, IN int2, IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Function structure for public.gin_consistent_hstore(internal, int2, internal, int4, internal, internal) -- ---------------------------- DROP FUNCTION IF EXISTS "public"."gin_consistent_hstore"(internal, int2, internal, int4, internal, internal); CREATE FUNCTION "public"."gin_consistent_hstore"(IN internal, IN int2, IN internal, IN int4, IN internal, IN internal) RETURNS "bool" AS '$libdir/hstore','gin_consistent_hstore' LANGUAGE c COST 1 STRICT SECURITY INVOKER IMMUTABLE; ALTER FUNCTION "public"."gin_consistent_hstore"(IN internal, IN int2, IN internal, IN int4, IN internal, IN internal) OWNER TO "rdsadmin"; -- ---------------------------- -- Alter sequences owned by -- ---------------------------- ALTER SEQUENCE "public"."app_seq" RESTART 5; ALTER SEQUENCE "public"."radarsat2_seq" RESTART 4; ALTER SEQUENCE "public"."user_seq" RESTART 5; -- ---------------------------- -- Primary key structure for table spatial_ref_sys -- ---------------------------- ALTER TABLE "public"."spatial_ref_sys" ADD PRIMARY KEY ("srid") NOT DEFERRABLE INITIALLY IMMEDIATE; -- ---------------------------- -- Checks structure for table spatial_ref_sys -- ---------------------------- ALTER TABLE "public"."spatial_ref_sys" ADD CONSTRAINT "spatial_ref_sys_srid_check" CHECK (((srid > 0) AND (srid <= 998999))) NOT DEFERRABLE INITIALLY IMMEDIATE; -- ---------------------------- -- Indexes structure for table planet_osm_roads -- ---------------------------- CREATE INDEX "planet_osm_roads_index" ON "public"."planet_osm_roads" USING gist(way) WITH (FILLFACTOR=100, BUFFERING=NO); -- ---------------------------- -- Indexes structure for table planet_osm_line -- ---------------------------- CREATE INDEX "planet_osm_line_index" ON "public"."planet_osm_line" USING gist(way) WITH (FILLFACTOR=100, BUFFERING=NO); -- ---------------------------- -- Indexes structure for table planet_osm_polygon -- ---------------------------- CREATE INDEX "planet_osm_polygon_index" ON "public"."planet_osm_polygon" USING gist(way) WITH (FILLFACTOR=100, BUFFERING=NO); -- ---------------------------- -- Primary key structure for table applications -- ---------------------------- ALTER TABLE "public"."applications" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE; -- ---------------------------- -- Primary key structure for table users -- ---------------------------- ALTER TABLE "public"."users" ADD PRIMARY KEY ("id") NOT DEFERRABLE INITIALLY IMMEDIATE; -- ---------------------------- -- Indexes structure for table eo1_ali -- ---------------------------- CREATE INDEX "eo1_ali_spatial_index" ON "public"."eo1_ali" USING gist(geom); CREATE INDEX "eo1_scene_index" ON "public"."eo1_ali" USING btree(scene COLLATE "default" ASC NULLS LAST); -- ---------------------------- -- Indexes structure for table l8 -- ---------------------------- CREATE INDEX "l8_scene_index" ON "public"."l8" USING btree(scene COLLATE "default" ASC NULLS LAST); CREATE INDEX "l8_spatial_index" ON "public"."l8" USING gist(geom); -- ---------------------------- -- Primary key structure for table radarsat2 -- ---------------------------- ALTER TABLE "public"."radarsat2" ADD PRIMARY KEY ("scene") NOT DEFERRABLE INITIALLY IMMEDIATE; -- ---------------------------- -- Indexes structure for table radarsat2 -- ---------------------------- CREATE INDEX "radarsat2_scene_index" ON "public"."radarsat2" USING btree(scene COLLATE "default" ASC NULLS LAST); CREATE INDEX "radarsat2_spatial_index" ON "public"."radarsat2" USING gist(geom);
/* Copyright 2016 Georgia Institute of Technology Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ create or replace function omop.persist_omop_to_perm(p_loadid int) returns void language plpgsql AS $$ declare v_loadid integer; logmsg varchar(200); rowcnt integer; begin v_loadid := p_loadid; perform etl.logm('persist_omop_to_perm', 'persist_omop_to_perm: load_id: '||v_loadid , 'FINISHED' ); -- move condition_temp to omop permanent home insert into omop.condition_occurrence ( condition_occurrence_id, person_id, condition_concept_id, condition_start_date, condition_end_date, condition_type_concept_id, stop_reason, provider_id, visit_occurrence_id, condition_source_value, condition_source_concept_id, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate ) select condition_occurrence_id, person_id, condition_concept_id, condition_start_date, condition_end_date, condition_type_concept_id, stop_reason, provider_id, visit_occurrence_id, condition_source_value, condition_source_concept_id, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate from omop.condition_occurrence_temp where x_srcloadid = v_loadid; get diagnostics rowcnt = ROW_COUNT; perform etl.logm('persist_omop_to_perm', 'moved from omop.condition_occurrence_temp to permanent: ' , rowcnt ); -- move procedure_temp to omop permanent home insert into omop.procedure_occurrence ( procedure_occurrence_id, person_id, procedure_concept_id, procedure_date, procedure_type_concept_id, modifier_concept_id, quantity, provider_id, visit_occurrence_id, procedure_source_value, procedure_source_concept_id, qualifier_source_value, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate ) select procedure_occurrence_id, person_id, procedure_concept_id, procedure_date, procedure_type_concept_id, modifier_concept_id, quantity, provider_id, visit_occurrence_id, procedure_source_value, procedure_source_concept_id, qualifier_source_value, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate from omop.procedure_occurrence_temp where x_srcloadid = v_loadid; get diagnostics rowcnt = ROW_COUNT; perform etl.logm('persist_omop_to_perm', 'moved from omop.procedre_occurrence_temp to permanent: ' , rowcnt ); -- move measurement_temp to omop permanent home insert into omop.measurement ( measurement_id, person_id, measurement_concept_id, measurement_date, measurement_time, measurement_type_concept_id, operator_concept_id, value_as_number, value_as_concept_id, unit_concept_id, range_low, range_high, provider_id, visit_occurrence_id, measurement_source_value, measurement_source_concept_id, unit_source_value, value_source_value, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate ) select measurement_id, person_id, measurement_concept_id, measurement_date, measurement_time, measurement_type_concept_id, operator_concept_id, value_as_number, value_as_concept_id, unit_concept_id, range_low, range_high, provider_id, visit_occurrence_id, measurement_source_value, measurement_source_concept_id, unit_source_value, value_source_value, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate from omop.measurement_temp where x_srcloadid = v_loadid; get diagnostics rowcnt = ROW_COUNT; perform etl.logm('persist_omop_to_perm', 'moved from omop.measurement_temp to permanent: ' , rowcnt ); -- move observation_temp to omop permanent home insert into omop.observation ( observation_id, person_id, observation_concept_id, observation_date, observation_time, observation_type_concept_id, value_as_number, value_as_string, value_as_concept_id, qualifier_concept_id, unit_concept_id, provider_id, visit_occurrence_id, observation_source_value, observation_source_concept_id, unit_source_value, qualifier_source_value, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate ) select observation_id, person_id, observation_concept_id, observation_date, observation_time, observation_type_concept_id, value_as_number, value_as_string, value_as_concept_id, qualifier_concept_id, unit_concept_id, provider_id, visit_occurrence_id, observation_source_value, observation_source_concept_id, unit_source_value, qualifier_source_value, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate from omop.observation_temp where x_srcloadid = v_loadid; get diagnostics rowcnt = ROW_COUNT; perform etl.logm('persist_omop_to_perm', 'moved from omop.observation_temp to permanent: ' , rowcnt ); -- move drug_exposure_temp to omop permanent home insert into omop.drug_exposure ( drug_exposure_id, person_id, drug_concept_id, drug_exposure_start_date, drug_exposure_end_date, drug_type_concept_id, stop_reason, refills, quantity, days_supply, sig, route_concept_id, effective_drug_dose, dose_unit_concept_id, lot_number, provider_id, visit_occurrence_id, drug_source_value, drug_source_concept_id, route_source_value, dose_unit_source_value, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate ) select drug_exposure_id, person_id, drug_concept_id, drug_exposure_start_date, drug_exposure_end_date, drug_type_concept_id, stop_reason, refills, quantity, days_supply, sig, route_concept_id, effective_drug_dose, dose_unit_concept_id, lot_number, provider_id, visit_occurrence_id, drug_source_value, drug_source_concept_id, route_source_value, dose_unit_source_value, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate from omop.drug_exposure_temp where x_srcloadid = v_loadid; get diagnostics rowcnt = ROW_COUNT; perform etl.logm('persist_omop_to_perm', 'moved from omop.drug_exposure_temp to permanent: ' , rowcnt ); -- move device_exposure_temp to omop permanent home insert into omop.device_exposure ( device_exposure_id, person_id, device_concept_id, device_exposure_start_date, device_exposure_end_date, device_type_concept_id, unique_device_id, quantity, provider_id, visit_occurrence_id, device_source_value, device_source_concept_id, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate ) select device_exposure_id, person_id, device_concept_id, device_exposure_start_date, device_exposure_end_date, device_type_concept_id, unique_device_id, quantity, provider_id, visit_occurrence_id, device_source_value, device_source_concept_id, x_srcid, x_srcloadid, x_srcfile, x_createdate, x_updatedate from omop.device_exposure_temp where x_srcloadid = v_loadid; get diagnostics rowcnt = ROW_COUNT; perform etl.logm('persist_omop_to_perm', 'moved from omop.device_exposure_temp to permanent: ' , rowcnt ); perform etl.logm('persist_omop_to_perm', 'persist_omop_to_perm: ' , 'FINISHED' ); end; $$
<reponame>kostya-ten/iperon -- upgrade -- CREATE TABLE IF NOT EXISTS "url_short" ( "url_short_id" SERIAL NOT NULL PRIMARY KEY, "created_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, "expire_at" TIMESTAMPTZ NOT NULL, "shortened" VARCHAR(200), "url" VARCHAR(255) ); CREATE INDEX IF NOT EXISTS "idx_url_short_shorten_f5a7d8" ON "url_short" ("shortened"); COMMENT ON COLUMN "url_short"."url_short_id" IS 'Identifier'; COMMENT ON TABLE "url_short" IS 'Model session'; -- downgrade -- DROP TABLE IF EXISTS "url_short";
DROP VIEW IF EXISTS view_daftar_pengeluaran_paringintimur; CREATE VIEW view_daftar_pengeluaran_paringintimur AS SELECT * FROM view_daftar_pengeluaran_kabupaten WHERE 1 = 1 AND id_skpd = 30; GRANT ALL PRIVILEGES ON view_daftar_pengeluaran_paringintimur TO lap_paringintimur; REVOKE INSERT, UPDATE, DELETE ON view_daftar_pengeluaran_paringintimur FROM lap_paringintimur;
-- @testpoint:opengauss关键字tsfield(非保留),作为数据库名 --关键字不带引号-成功 drop database if exists tsfield; create database tsfield; drop database tsfield; --关键字带双引号-成功 drop database if exists "tsfield"; create database "tsfield"; drop database "tsfield"; --关键字带单引号-合理报错 drop database if exists 'tsfield'; create database 'tsfield'; --关键字带反引号-合理报错 drop database if exists `tsfield`; create database `tsfield`;
<reponame>Threepwoodd/janitor CREATE TABLE `SITE_DB`.`item_event_hosts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `host` varchar(255) DEFAULT NULL, `host_address1` varchar(255) DEFAULT NULL, `host_address2` varchar(255) DEFAULT NULL, `host_city` varchar(255) DEFAULT NULL, `host_postal` varchar(255) DEFAULT NULL, `host_country` varchar(2) DEFAULT NULL, `host_googlemaps` varchar(255) DEFAULT NULL, `host_comment` text DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `host_country` (`host_country`), CONSTRAINT `item_event_hosts_ibfk_1` FOREIGN KEY (`host_country`) REFERENCES `SITE_DB`.`system_countries` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create database db_rh; use db_rh; create table tb_funcionarios ( id bigint auto_increment, nomeFuncionario varchar(255), cargo varchar(255), setor varchar(255), salario double, primary key (id) ); select * from tb_funcionarios; select * from tb_funcionarios where salario > 2000; select * from tb_funcionarios where salario < 2000; insert into tb_funcionarios (nomeFuncionario, cargo, setor, salario) values ("<NAME>", "Assistente", "Financeiro", 1500.35); insert into tb_funcionarios (nomeFuncionario, cargo, setor, salario) values ("<NAME>", "Analista", "Financeiro", 1756.35); insert into tb_funcionarios (nomeFuncionario, cargo, setor, salario) values ("<NAME>", "Pleno", "Financeiro", 2985.89); insert into tb_funcionarios (nomeFuncionario, cargo, setor, salario) values ("<NAME>", "Estagiário", "Administrativo", 725.90); insert into tb_funcionarios (nomeFuncionario, cargo, setor, salario) values ("<NAME>", "Sênior", "Executivo", 15670.35);
CREATE USER 'exporter'@'%' IDENTIFIED BY 'password' WITH MAX_USER_CONNECTIONS 3; GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO 'exporter'@'%';
CREATE TABLE [dbo].[CachedSPByCPUCost]( [CachedSPByCPUCostId] INT IDENTITY(1,1) NOT NULL CONSTRAINT pkCachedSPByCPUCost PRIMARY KEY CLUSTERED, [ReportDate] DATETIME2 NOT NULL, [SP Name] [sysname] NOT NULL, [Total Worker Time] [bigint] NOT NULL, [Avg Worker Time] [bigint] NOT NULL, [Execution Count] [bigint] NOT NULL, [Calls/Minute] [bigint] NOT NULL, [Total Elapsed Time] [bigint] NOT NULL, [Avg Elapsed Time] [bigint] NOT NULL, [Cached Time] [datetime] NOT NULL ) GO CREATE INDEX ixCachedSPByCPUCost_ReportDate ON CachedSPByCPUCost (ReportDate) GO
SELECT target_name, SUM(question_difference) as metric FROM magic WHERE source_user = 1 AND target_user <> 1 GROUP BY target_name ORDER BY metric LIMIT 1
<reponame>anuragjain343/Connekt_us -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 13, 2019 at 09:35 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.0.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `connektus` -- -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE `admin` ( `id` int(10) NOT NULL, `name` varchar(500) NOT NULL, `email` varchar(60) DEFAULT NULL, `password` varchar(300) DEFAULT NULL, `image` varchar(255) NOT NULL, `status` enum('0','1') NOT NULL DEFAULT '1' COMMENT '1:Active,:0:Deactive', `crd` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`id`, `name`, `email`, `password`, `image`, `status`, `crd`, `upd`) VALUES (1, 'admin', '<EMAIL>', <PASSWORD>', '<PASSWORD>12419c39f5412b69a266bf2bc.jpg', '1', '2017-09-27 11:44:10', '2018-10-03 09:15:15'); -- -------------------------------------------------------- -- -- Table structure for table `contactUs` -- CREATE TABLE `contactUs` ( `contactUsId` bigint(20) NOT NULL, `name` varchar(100) NOT NULL, `subject` varchar(100) NOT NULL, `email` varchar(250) NOT NULL, `message` text NOT NULL, `rating` varchar(100) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 for open, 0 for closed', `type` varchar(100) NOT NULL, `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `favourites` -- CREATE TABLE `favourites` ( `favouriteId` int(11) NOT NULL, `favourite_for` int(11) NOT NULL, `favourite_by` int(11) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `created_on` varchar(250) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `interviews` -- CREATE TABLE `interviews` ( `interviewId` int(11) NOT NULL, `request_id` int(11) NOT NULL, `type` varchar(250) NOT NULL, `interviewer_name` varchar(250) NOT NULL, `location` varchar(250) NOT NULL, `latitude` varchar(250) NOT NULL, `longitude` varchar(250) NOT NULL, `date` varchar(250) NOT NULL, `time` varchar(250) NOT NULL, `is_delete` int(11) NOT NULL DEFAULT '0' COMMENT '0 for non delte 1 for delete', `interview_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 for request sent: 1 for accept: 2 for declined', `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `interview_request` -- CREATE TABLE `interview_request` ( `requestId` int(11) NOT NULL, `interview_id` int(11) NOT NULL, `type` varchar(250) NOT NULL, `interviewer_name` varchar(250) NOT NULL, `location` varchar(250) NOT NULL, `latitude` varchar(250) NOT NULL, `longitude` varchar(250) NOT NULL, `date` varchar(250) NOT NULL, `time` varchar(250) NOT NULL, `stauts` tinyint(4) NOT NULL DEFAULT '1', `created_on` varchar(250) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `job_titles` -- CREATE TABLE `job_titles` ( `jobTitleId` int(11) NOT NULL, `jobTitleName` varchar(255) NOT NULL, `userType` varchar(255) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `job_titles` -- INSERT INTO `job_titles` (`jobTitleId`, `jobTitleName`, `userType`, `status`, `crd`, `upd`) VALUES (3, 'Java Developer', 'both', 1, '2018-04-20 12:43:55', '2018-08-28 07:43:15'), (4, 'Android Developer', 'both', 1, '2018-04-20 13:11:45', '2018-08-28 07:43:15'), (5, 'Manager', 'both', 1, '2018-04-26 05:32:35', '2018-08-28 07:43:15'), (6, 'Web Designer', 'both', 1, '2018-05-02 13:56:20', '2018-08-28 07:43:15'), (7, 'Chief Executive Officer', 'both', 1, '2018-05-02 23:38:23', '2018-10-26 06:27:03'), (8, 'Executive Assistant', 'both', 1, '2018-05-02 23:38:52', '2018-08-28 07:43:15'), (9, 'Senior Credit Officer', 'both', 1, '2018-05-03 05:03:35', '2018-08-28 07:43:15'), (10, 'Credit Manager', 'both', 1, '2018-05-03 05:03:48', '2018-08-28 07:43:15'), (11, 'Team Leader', 'both', 1, '2018-05-03 05:03:59', '2018-08-28 07:43:15'), (13, 'Business Analyst', 'both', 1, '2018-05-03 05:04:22', '2018-08-28 07:43:15'), (14, 'Recepionist', 'both', 1, '2018-05-03 05:05:14', '2018-08-28 07:43:15'), (15, 'Administration Manager', 'both', 1, '2018-05-03 05:05:28', '2018-08-28 07:43:15'), (16, 'Chief Financial Officer', 'both', 1, '2018-05-03 05:05:48', '2018-08-28 07:43:15'), (17, 'Financial Controller', 'both', 1, '2018-05-03 05:05:59', '2018-08-28 07:43:15'), (18, 'Tax Accountant', 'both', 1, '2018-05-03 05:06:11', '2018-08-28 07:43:15'), (19, 'HOD', 'both', 1, '2018-05-22 05:03:12', '2018-08-28 07:43:15'), (20, 'Graphics Designer', 'both', 1, '2018-05-22 05:03:49', '2018-08-28 07:43:15'), (22, 'Administration Assistant', 'both', 1, '2018-05-24 05:56:51', '2018-08-28 07:43:15'), (23, 'Senior Payroll Officer', 'both', 1, '2018-05-24 05:57:03', '2018-08-28 07:43:15'), (24, 'Payroll Officer', 'both', 1, '2018-05-24 05:57:13', '2018-08-28 07:43:15'), (25, 'Graduate Accountant', 'both', 1, '2018-05-24 05:57:21', '2018-08-28 07:43:15'), (26, 'Senior Accountant', 'both', 1, '2018-05-24 05:57:31', '2018-08-28 07:43:15'), (27, 'Data Analyst', 'both', 1, '2018-05-24 05:57:38', '2018-08-28 07:43:15'), (28, 'Finance Business Partner', 'both', 1, '2018-05-24 05:57:44', '2018-08-28 07:43:15'), (29, 'Supervisor Accountant', 'both', 1, '2018-05-24 05:57:52', '2018-08-28 07:43:15'), (30, 'Financial Accountant', 'both', 1, '2018-05-24 05:57:57', '2018-08-28 07:43:15'), (31, 'Revenue Accountant', 'both', 1, '2018-05-24 05:58:04', '2018-08-28 07:43:15'), (32, 'Senior Commerical Analyst', 'both', 1, '2018-05-24 05:58:10', '2018-08-28 07:43:15'), (34, 'Assistant Manager', 'both', 1, '2018-05-24 05:58:21', '2018-08-28 07:43:15'), (35, 'Accounts Receivable Team Leader', 'both', 1, '2018-05-24 05:58:27', '2018-08-28 07:43:15'), (36, 'Accounts Payable Officer', 'both', 1, '2018-05-24 05:58:39', '2018-08-28 07:43:15'), (37, 'Accounts Receivable Officer', 'both', 1, '2018-05-24 05:58:47', '2018-08-28 07:43:15'), (40, 'Accountant', 'both', 1, '2018-05-24 05:59:31', '2018-08-28 07:43:15'), (41, 'General Manager', 'both', 1, '2018-05-24 05:59:39', '2018-08-28 07:43:15'), (42, 'Accounts Clerk', 'both', 1, '2018-05-24 05:59:48', '2018-08-28 07:43:15'), (43, 'Senior Assistant Accountant', 'both', 1, '2018-05-24 05:59:54', '2018-08-28 07:43:15'), (44, 'Salesforce Technical Lead', 'both', 1, '2018-05-24 06:00:00', '2018-08-28 07:43:15'), (45, 'Senior Tax Accountant', 'both', 1, '2018-05-24 06:00:06', '2018-08-28 07:43:15'), (46, 'Senior Financial Accountant', 'both', 1, '2018-05-24 06:00:11', '2018-08-28 07:43:15'), (47, 'Junior Collections Officer', 'both', 1, '2018-05-24 06:00:17', '2018-08-28 07:43:15'), (48, 'Finance Officer', 'both', 1, '2018-05-24 06:00:23', '2018-08-28 07:43:15'), (49, 'Finance Manager', 'both', 1, '2018-05-24 06:00:29', '2018-08-28 07:43:15'), (50, 'Credit Controller', 'both', 1, '2018-05-24 06:00:35', '2018-08-28 07:43:15'), (51, 'Senior Credit Controller', 'both', 1, '2018-05-24 06:00:40', '2018-08-28 07:43:15'), (53, 'Credit Team Leader', 'both', 1, '2018-05-24 06:00:52', '2018-08-28 07:43:15'), (54, 'Senior Finance Officer', 'both', 1, '2018-05-24 06:00:57', '2018-08-28 07:43:15'), (55, 'Book Keeper', 'both', 1, '2018-05-24 06:01:03', '2018-10-26 06:31:14'), (56, 'Finance Analyst', 'both', 1, '2018-05-24 06:01:08', '2018-08-28 07:43:15'), (57, 'Internal Auditor', 'both', 1, '2018-05-24 06:01:14', '2018-08-28 07:43:15'), (58, 'Senior Internal Auditor', 'both', 1, '2018-05-24 06:01:19', '2018-08-28 07:43:15'), (59, 'Auditor', 'both', 1, '2018-05-24 06:01:24', '2018-08-28 07:43:15'), (60, 'Billing Officer', 'both', 1, '2018-05-24 06:01:30', '2018-08-28 07:43:15'), (61, 'Senior Billing Officer', 'both', 1, '2018-05-24 06:01:36', '2018-08-28 07:43:15'), (63, 'Client Support', 'both', 1, '2018-05-24 06:01:48', '2018-08-28 07:43:15'), (64, 'Project Administrator', 'both', 1, '2018-05-24 06:01:54', '2018-08-28 07:43:15'), (65, 'Project Officer', 'both', 1, '2018-05-24 06:02:00', '2018-08-28 07:43:15'), (66, 'Senior Contracts Administrator', 'both', 1, '2018-05-24 06:02:06', '2018-08-28 07:43:15'), (67, 'Project Coordinator', 'both', 1, '2018-05-24 06:02:13', '2018-08-28 07:43:15'), (68, 'Administration Officer', 'both', 1, '2018-05-24 06:02:19', '2018-08-28 07:43:15'), (69, 'Senior Business Analyst', 'both', 1, '2018-05-24 06:02:25', '2018-10-26 06:31:50'), (70, 'Training Coordinator', 'both', 1, '2018-05-24 06:02:31', '2018-08-28 07:43:15'), (71, 'Commercial Officer', 'both', 1, '2018-05-24 06:02:36', '2018-08-28 07:43:15'), (72, 'Officer Manager', 'both', 1, '2018-05-24 06:02:43', '2018-08-28 07:43:15'), (74, 'Group Account Director', 'both', 1, '2018-05-24 06:03:03', '2018-08-28 07:43:15'), (75, 'Group Sales Manager', 'both', 1, '2018-05-24 06:03:09', '2018-08-28 07:43:15'), (76, 'Executive Director', 'both', 1, '2018-05-24 06:03:14', '2018-08-28 07:43:15'), (77, 'Creative Manager', 'both', 1, '2018-05-24 06:03:20', '2018-08-28 07:43:15'), (78, 'Junior Designer', 'both', 1, '2018-05-24 06:03:27', '2018-08-28 07:43:15'), (79, 'Chief Of Staff', 'both', 1, '2018-05-24 06:03:35', '2018-08-28 07:43:15'), (80, 'Senior Chief Of Staff', 'both', 1, '2018-05-24 06:03:41', '2018-08-28 07:43:15'), (81, 'Marketing Coordinator', 'both', 1, '2018-05-24 06:03:47', '2018-08-28 07:43:15'), (82, 'Associate Director', 'both', 1, '2018-05-24 06:03:54', '2018-08-28 07:43:15'), (83, 'Business Manager', 'both', 1, '2018-05-24 06:04:00', '2018-08-28 07:43:15'), (84, 'Compliance Manager', 'both', 1, '2018-05-24 06:04:05', '2018-08-28 07:43:15'), (86, 'Executive', 'both', 1, '2018-08-28 07:16:44', '2018-08-28 07:16:44'); -- -------------------------------------------------------- -- -- Table structure for table `notifications` -- CREATE TABLE `notifications` ( `id` bigint(20) NOT NULL, `notification_by` int(11) NOT NULL, `notification_for` int(11) NOT NULL, `notification_message` text NOT NULL, `notification_type` varchar(100) NOT NULL, `isViewed` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0: not viewed, 1: viewed', `status` int(11) NOT NULL DEFAULT '1' COMMENT '1:active, 0:Inactive', `created_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `options` -- CREATE TABLE `options` ( `optionId` bigint(20) NOT NULL, `option_name` varchar(100) NOT NULL, `option_value` text NOT NULL, `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `options` -- INSERT INTO `options` (`optionId`, `option_name`, `option_value`, `crd`, `upd`) VALUES (1, 'tc_page', 'ConnektUs_Terms_-_No_Subscription3.pdf', '2018-06-13 11:18:39', '2018-10-11 09:47:59'), (4, 'about_page', 'About_Us_app.pdf', '2018-06-13 13:20:04', '2018-08-24 06:51:49'), (5, 'contact_type', 'Help_&_support_job_seeker.pdf', '2018-06-13 13:39:30', '2018-08-24 10:30:00'), (6, 'pp_page', 'ConnektUs_Privacy4.pdf', '2018-08-13 08:54:47', '2018-10-16 09:20:18'), (7, 'contact_type_employer', 'Help_&_support_employer.pdf', '2018-08-24 09:49:07', '2018-08-24 10:30:05'), (8, 'verify_email', '0', '2018-10-03 05:59:16', '2018-10-27 10:18:10'); -- -------------------------------------------------------- -- -- Table structure for table `recommends` -- CREATE TABLE `recommends` ( `recommendId` int(11) NOT NULL, `recommend_for` int(11) NOT NULL, `recommend_by` int(11) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `created_on` varchar(250) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `requests` -- CREATE TABLE `requests` ( `requestId` int(11) NOT NULL, `request_by` int(11) NOT NULL, `request_for` int(11) NOT NULL, `request_offer_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '2: not offer, 1: offered,0 for pending', `is_finished` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 for running: 1 for completed: 2 for deleted', `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `reviews` -- CREATE TABLE `reviews` ( `reviewId` int(20) NOT NULL, `review_by` int(20) NOT NULL, `review_for` int(20) NOT NULL, `rating` float NOT NULL DEFAULT '0', `comments` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `is_anonymous` tinyint(4) NOT NULL DEFAULT '0', `status` int(11) NOT NULL DEFAULT '1' COMMENT '1: Active, 0: Inactive ', `created_on` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `specializations` -- CREATE TABLE `specializations` ( `specializationId` int(11) NOT NULL, `specializationName` varchar(200) NOT NULL, `userType` varchar(255) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `specializations` -- INSERT INTO `specializations` (`specializationId`, `specializationName`, `userType`, `status`, `crd`, `upd`) VALUES (3, 'Sales', 'both', 1, '2018-04-20 12:46:54', '2018-08-28 09:50:28'), (4, 'Banking And Financial Services', 'both', 1, '2018-04-20 12:47:14', '2018-08-28 09:50:28'), (6, 'Accounting And Finance', 'both', 1, '2018-05-04 00:41:19', '2018-08-28 09:50:28'), (8, 'Human Resources', 'both', 1, '2018-05-04 00:42:29', '2018-08-28 09:50:28'), (11, 'Construction', 'both', 1, '2018-05-04 00:51:26', '2018-08-28 09:50:28'), (13, 'Engineering And Manufacturing', 'both', 1, '2018-05-04 00:51:54', '2018-08-28 09:50:28'), (14, 'Legal', 'both', 1, '2018-05-04 00:52:34', '2018-08-28 09:50:28'), (15, 'Retail', 'both', 1, '2018-05-04 00:52:47', '2018-08-28 09:50:28'), (16, 'Information Technology', 'both', 1, '2018-05-04 00:53:02', '2018-08-28 09:50:28'), (17, 'Marketing And Digital', 'both', 1, '2018-05-04 00:53:53', '2018-08-28 09:50:28'), (18, 'Trades And Labour', 'both', 1, '2018-05-04 00:55:24', '2018-08-28 09:50:28'), (19, 'Executive', 'both', 1, '2018-05-04 00:56:42', '2018-08-28 09:50:28'), (20, 'Warehouse And Logistics', 'both', 1, '2018-05-04 00:57:21', '2018-08-28 09:50:28'), (21, 'Business Support', 'both', 1, '2018-05-04 00:57:36', '2018-08-28 09:50:28'), (31, 'Mining And Resources', 'both', 1, '2018-05-13 06:03:47', '2018-08-28 09:50:28'), (32, 'Consulting And Strategy', 'both', 1, '2018-05-13 06:04:28', '2018-08-28 09:50:28'), (33, 'Trades And Services', 'both', 1, '2018-05-13 06:04:43', '2018-08-28 09:50:28'), (34, 'Science And Technology', 'both', 1, '2018-05-13 06:05:00', '2018-08-28 09:50:28'), (35, 'Engineering', 'both', 1, '2018-05-13 06:05:12', '2018-08-28 09:50:28'), (36, 'Human Resources And Recruitment', 'both', 1, '2018-05-13 06:05:30', '2018-08-28 09:50:28'), (37, 'Hospitality And Tourism', 'both', 1, '2018-05-13 06:05:51', '2018-08-28 09:50:28'), (38, 'Government And Defence', 'both', 1, '2018-05-13 06:06:05', '2018-08-28 09:50:28'), (39, 'Information And Communication Technology', 'both', 1, '2018-05-13 06:06:25', '2018-08-28 09:50:28'), (40, 'Transport And Logistics', 'both', 1, '2018-05-13 06:07:09', '2018-08-28 09:50:28'), (42, 'Healthcare And Medical', 'both', 1, '2018-05-13 06:07:31', '2018-08-28 09:50:28'), (43, 'Education And Training', 'both', 1, '2018-05-13 06:07:43', '2018-08-28 09:50:28'), (44, 'Administration And Office Support', 'both', 1, '2018-05-13 06:08:04', '2018-08-28 09:50:28'), (45, 'Marketing And Communication', 'both', 1, '2018-05-13 06:08:19', '2018-08-28 09:50:28'), (47, 'Insurance And Superannuation', 'both', 1, '2018-05-13 06:09:30', '2018-08-28 09:50:28'), (48, 'Sports And Recreation', 'both', 1, '2018-05-13 06:09:41', '2018-08-28 09:50:28'), (49, 'Advertising And Media', 'both', 1, '2018-05-13 06:09:54', '2018-08-28 09:50:28'), (50, 'Design And Architecture', 'both', 1, '2018-05-13 06:10:09', '2018-08-28 09:50:28'), (51, 'Accounting', 'both', 1, '2018-05-13 06:10:21', '2018-08-28 09:50:28'), (55, 'Real Estate And Property', 'both', 1, '2018-05-13 06:11:26', '2018-08-28 09:50:28'), (56, 'Call Centre And Customer Service', 'both', 1, '2018-05-13 06:11:41', '2018-08-28 09:50:28'); -- -------------------------------------------------------- -- -- Table structure for table `strengths` -- CREATE TABLE `strengths` ( `strengthId` int(11) NOT NULL, `strengthName` varchar(255) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `strengths` -- INSERT INTO `strengths` (`strengthId`, `strengthName`, `status`, `crd`, `upd`) VALUES (2, 'Decision Making', 1, '2018-04-20 12:22:06', '2018-05-04 01:02:10'), (3, 'Flexibility And Adaptability', 1, '2018-04-20 12:46:27', '2018-05-04 01:01:58'), (4, 'Written And Verbal Communication Skills', 1, '2018-04-20 12:46:41', '2018-05-04 01:01:25'), (5, 'Work Ethic', 1, '2018-04-26 11:08:38', '2018-05-04 01:01:13'), (6, 'Coaching And Mentoring', 1, '2018-05-04 01:02:22', '2018-05-04 01:02:22'), (7, 'Problem Solving', 1, '2018-05-04 01:02:33', '2018-05-04 01:02:33'), (8, 'Team Work', 1, '2018-05-04 01:02:43', '2018-05-04 01:02:43'), (9, 'Reliable', 1, '2018-05-04 01:02:56', '2018-05-04 01:02:56'), (10, 'Resilience', 1, '2018-05-04 01:03:15', '2018-05-04 01:03:15'), (12, 'Maintaining Deadlines', 1, '2018-05-04 01:05:04', '2018-05-04 01:05:04'), (13, 'Delegation', 1, '2018-05-04 01:05:26', '2018-05-04 01:05:26'), (14, 'Detailed And Thorough', 1, '2018-05-04 01:05:48', '2018-05-04 01:05:48'), (15, 'Empowering', 1, '2018-05-04 01:05:58', '2018-05-04 01:05:58'), (16, 'Effective Feedback', 1, '2018-05-04 01:06:41', '2018-05-04 01:06:41'), (17, 'Presentation Skills', 1, '2018-05-04 01:07:43', '2018-05-04 01:07:43'), (18, 'Hard Working', 1, '2018-05-04 01:08:34', '2018-05-04 01:08:34'), (19, 'Commitment And Dedication', 1, '2018-05-04 01:08:48', '2018-05-04 02:28:40'), (20, 'Enthusiatic', 1, '2018-05-04 01:11:43', '2018-05-04 01:12:55'), (22, 'Creative', 1, '2018-05-04 01:12:01', '2018-05-13 06:27:36'), (23, 'Patience', 1, '2018-05-04 01:12:09', '2018-05-04 01:12:09'), (25, 'Determination', 1, '2018-05-04 01:12:24', '2018-05-04 01:12:24'), (27, 'Positive Attitude', 1, '2018-05-04 01:13:58', '2018-05-04 01:13:58'), (28, 'Self Motivating', 1, '2018-05-04 01:14:29', '2018-05-04 01:14:29'), (29, 'Innovation', 1, '2018-05-04 02:26:19', '2018-05-04 02:26:19'), (30, 'Willingness To Learn', 1, '2018-05-04 02:27:07', '2018-05-04 02:27:07'), (31, 'Time Management Skills', 1, '2018-05-04 02:27:18', '2018-05-04 02:27:18'), (32, 'Adaptability', 1, '2018-05-04 02:27:33', '2018-05-04 02:27:33'), (33, 'Interpersonal Skills', 1, '2018-05-04 02:28:03', '2018-05-04 02:28:03'), (35, 'Leadership Skills', 1, '2018-05-13 06:14:15', '2018-05-13 06:18:09'), (36, 'Dependability', 1, '2018-05-13 06:14:29', '2018-05-13 06:14:29'), (37, 'Efficient', 1, '2018-05-13 06:16:34', '2018-05-13 06:16:34'), (38, 'Effective', 1, '2018-05-13 06:16:42', '2018-05-13 06:16:42'), (39, 'Accurate', 1, '2018-05-13 06:16:54', '2018-05-13 06:16:54'), (40, 'Over Achiever', 1, '2018-05-13 06:17:31', '2018-05-13 06:17:31'), (41, 'Inspirational', 1, '2018-05-13 06:17:43', '2018-05-13 06:17:43'), (42, 'Listening Skills', 1, '2018-05-13 06:18:17', '2018-05-13 06:18:17'), (43, 'People Skills', 1, '2018-05-13 06:18:36', '2018-05-13 06:18:36'), (44, 'Professional', 1, '2018-05-13 06:18:44', '2018-05-13 06:18:44'), (45, 'Public Speaking', 1, '2018-05-13 06:18:55', '2018-05-13 06:18:55'), (46, 'Conflict Resolution', 1, '2018-05-13 06:19:08', '2018-05-13 06:19:08'), (47, 'Confidence', 1, '2018-05-13 06:34:45', '2018-05-17 06:01:37'); -- -------------------------------------------------------- -- -- Table structure for table `usermeta` -- CREATE TABLE `usermeta` ( `metaID` int(11) NOT NULL, `user_id` int(11) NOT NULL, `jobTitle_id` int(11) NOT NULL, `address` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `city` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `state` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `country` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `latitude` varchar(250) NOT NULL, `longitude` varchar(250) NOT NULL, `bio` text CHARACTER SET utf8mb4 NOT NULL, `description` text NOT NULL, `phone` varchar(100) NOT NULL, `user_resume` varchar(250) NOT NULL, `user_cv` varchar(250) NOT NULL, `company_logo` varchar(255) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `usermeta` -- INSERT INTO `usermeta` (`metaID`, `user_id`, `jobTitle_id`, `address`, `city`, `state`, `country`, `latitude`, `longitude`, `bio`, `description`, `phone`, `user_resume`, `user_cv`, `company_logo`, `status`, `crd`, `upd`) VALUES (1, 1, 0, 'Indore, Madhya Pradesh, India', 'Indore', 'Madhya Pradesh', 'India', '22.719569', '75.857726', 'What is Lorem Ipsum?', '', '', '', '', '', 1, '2019-04-09 14:04:03', '2019-04-09 14:04:03'), (2, 2, 0, 'Indore, Madhya Pradesh, India', 'Indore', 'Madhya Pradesh', 'India', '22.719569', '75.857726', 'What is Lorem Ipsum?', '', '', '', '', '', 1, '2019-04-11 14:13:44', '2019-04-11 14:13:44'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `userId` int(11) NOT NULL, `fullName` varchar(250) NOT NULL, `businessName` varchar(255) NOT NULL, `email` varchar(250) NOT NULL, `phone` varchar(100) NOT NULL, `password` varchar(250) NOT NULL, `profileImage` varchar(250) NOT NULL, `userType` varchar(50) NOT NULL, `deviceType` tinyint(4) NOT NULL COMMENT '0:Android , 1:Ios', `deviceToken` varchar(250) NOT NULL, `isProfile` tinyint(4) NOT NULL DEFAULT '0', `jobProfileCompleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '1: Yes, 0: No', `isNotify` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:not send, 1:send', `visit_counts` bigint(20) NOT NULL DEFAULT '0', `authToken` varchar(255) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `isActive` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 : active, 0: deactive', `isVerified` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0: unverified,; verified', `verifiedLink` varchar(200) NOT NULL, `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `users` -- INSERT INTO `users` (`userId`, `fullName`, `businessName`, `email`, `phone`, `password`, `profileImage`, `userType`, `deviceType`, `deviceToken`, `isProfile`, `jobProfileCompleted`, `isNotify`, `visit_counts`, `authToken`, `status`, `isActive`, `isVerified`, `verifiedLink`, `crd`, `upd`) VALUES (1, 'Manish Business', 'Dev Infotech', '<EMAIL>', '123456123', '$2y$10$VmLhl8Gjadu3Q8vaeAEiaejsU1xNHcdr.3ORQAqb4TTw134i9ACuO', '', 'business', 0, '', 1, 0, 1, 0, '7902d2dedd470f1b054176bc2073e9ed27952b13', 1, 1, 1, '983f23282de89d10bac4622950206a1f', '2019-04-09 13:49:59', '2019-04-09 08:34:03'), (2, 'Sunil', '', '<EMAIL>', '13251658', '$2y$10$GFAuak6waYyECAolHFHKUOpnX92/3.Ncdksx/DOiGHbu6RRjPnKdq', '', 'individual', 0, '', 1, 0, 1, 0, '5d63c0673746686e0931fd53070a31488e2688f7', 1, 1, 1, 'd6e12ea7cd0a7f040f76bb06175dc106', '2019-04-11 14:09:33', '2019-04-11 08:43:44'); -- -------------------------------------------------------- -- -- Table structure for table `user_job_profile` -- CREATE TABLE `user_job_profile` ( `jobProfileId` int(11) NOT NULL, `user_id` int(11) NOT NULL, `current_job_title` int(11) NOT NULL, `current_company` varchar(250) NOT NULL, `current_start_date` varchar(250) NOT NULL, `current_finish_date` varchar(250) NOT NULL, `current_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `next_availability` varchar(250) NOT NULL, `next_speciality` int(250) NOT NULL, `next_location` varchar(250) NOT NULL, `expectedSalaryFrom` varchar(100) NOT NULL, `expectedSalaryTo` varchar(100) NOT NULL, `employementType` varchar(100) NOT NULL, `totalExperience` double(10,1) NOT NULL, `currentExperience` double(10,1) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_job_profile` -- INSERT INTO `user_job_profile` (`jobProfileId`, `user_id`, `current_job_title`, `current_company`, `current_start_date`, `current_finish_date`, `current_description`, `next_availability`, `next_speciality`, `next_location`, `expectedSalaryFrom`, `expectedSalaryTo`, `employementType`, `totalExperience`, `currentExperience`, `status`, `crd`, `upd`) VALUES (1, 1, 86, 'Midiiii system Pvt Ltd', '', '', 'test', '', 0, '', '0', '20000', '', 0.0, 0.0, 1, '2019-04-09 14:06:40', '2019-04-09 14:06:40'); -- -------------------------------------------------------- -- -- Table structure for table `user_previous_role` -- CREATE TABLE `user_previous_role` ( `previousRoleId` int(11) NOT NULL, `user_id` int(11) NOT NULL, `previous_job_title_id` int(20) NOT NULL, `previousCompanyName` varchar(100) NOT NULL, `previousDescription` varchar(255) NOT NULL, `experience` double(10,1) NOT NULL, `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `user_specialization_mapping` -- CREATE TABLE `user_specialization_mapping` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `specialization_id` int(11) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_specialization_mapping` -- INSERT INTO `user_specialization_mapping` (`id`, `user_id`, `specialization_id`, `status`, `crd`, `upd`) VALUES (1, 1, 3, 1, '2019-04-09 14:04:03', '2019-04-09 14:04:03'), (2, 2, 3, 1, '2019-04-11 14:13:44', '2019-04-11 14:13:44'); -- -------------------------------------------------------- -- -- Table structure for table `user_strength_mapping` -- CREATE TABLE `user_strength_mapping` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `strength_id` int(11) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_strength_mapping` -- INSERT INTO `user_strength_mapping` (`id`, `user_id`, `strength_id`, `status`, `crd`, `upd`) VALUES (1, 1, 3, 1, '2019-04-09 14:04:03', '2019-04-09 14:04:03'), (2, 1, 4, 1, '2019-04-09 14:04:03', '2019-04-09 14:04:03'), (3, 2, 3, 1, '2019-04-11 14:13:44', '2019-04-11 14:13:44'), (4, 2, 4, 1, '2019-04-11 14:13:44', '2019-04-11 14:13:44'); -- -------------------------------------------------------- -- -- Table structure for table `user_value_mapping` -- CREATE TABLE `user_value_mapping` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `value_id` int(11) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_value_mapping` -- INSERT INTO `user_value_mapping` (`id`, `user_id`, `value_id`, `status`, `crd`, `upd`) VALUES (1, 1, 3, 1, '2019-04-09 14:04:03', '2019-04-09 14:04:03'), (2, 2, 3, 1, '2019-04-11 14:13:44', '2019-04-11 14:13:44'); -- -------------------------------------------------------- -- -- Table structure for table `value` -- CREATE TABLE `value` ( `valueId` int(11) NOT NULL, `valueName` varchar(200) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `value` -- INSERT INTO `value` (`valueId`, `valueName`, `status`, `crd`, `upd`) VALUES (1, 'Honesty', 1, '2018-04-20 12:23:12', '2018-04-26 11:10:59'), (3, 'Peace', 1, '2018-04-20 12:45:52', '2018-04-26 11:10:50'), (4, 'Loyalty', 1, '2018-04-20 12:46:02', '2018-04-26 11:10:32'), (6, 'Caring', 1, '2018-05-13 06:20:05', '2018-05-13 06:20:05'), (7, 'Work Life Balance', 1, '2018-05-13 06:20:29', '2018-05-13 06:20:29'), (8, 'Authentic', 1, '2018-05-13 06:20:37', '2018-05-13 06:20:37'), (10, 'Curious', 1, '2018-05-13 06:21:05', '2018-05-13 06:21:05'), (11, 'Fairness', 1, '2018-05-13 06:21:17', '2018-05-13 06:21:17'), (12, 'Happiness', 1, '2018-05-13 06:21:25', '2018-05-13 06:21:25'), (13, 'Growth', 1, '2018-05-13 06:21:32', '2018-05-13 06:21:32'), (14, 'Fun', 1, '2018-05-13 06:21:44', '2018-05-13 06:21:44'), (15, 'Humour', 1, '2018-05-13 06:21:53', '2018-05-13 06:21:53'), (16, 'Kindness', 1, '2018-05-13 06:22:06', '2018-05-13 06:22:06'), (17, 'Knowledge', 1, '2018-05-13 06:22:12', '2018-05-13 06:22:12'), (18, 'Learning', 1, '2018-05-13 06:22:21', '2018-05-13 06:22:21'), (19, 'Transparency', 1, '2018-05-13 06:22:47', '2018-05-13 06:22:47'), (20, 'Recognition', 1, '2018-05-13 06:22:57', '2018-05-13 06:22:57'), (21, 'Diversity', 1, '2018-05-13 06:23:11', '2018-05-13 06:23:11'), (22, 'Equality', 1, '2018-05-13 06:23:20', '2018-05-13 06:23:20'), (23, 'Respect', 1, '2018-05-13 06:23:28', '2018-05-13 06:23:28'), (24, 'Integrity', 1, '2018-05-13 06:24:06', '2018-05-13 06:24:06'), (25, 'Security', 1, '2018-05-13 06:24:20', '2018-05-13 06:24:20'), (26, 'Responsibility', 1, '2018-05-13 06:24:30', '2018-05-13 06:24:30'), (27, 'Opinions', 1, '2018-05-13 06:24:39', '2018-05-13 06:24:39'), (28, 'Reputation', 1, '2018-05-13 06:24:48', '2018-05-13 06:24:48'), (29, 'Friendships', 1, '2018-05-13 06:25:38', '2018-05-13 06:25:38'), (30, 'Contribution', 1, '2018-05-13 06:25:47', '2018-05-13 06:25:47'), (31, 'Authority', 1, '2018-05-13 06:25:58', '2018-05-13 06:25:58'), (32, 'Acceptance', 1, '2018-05-13 06:31:44', '2018-05-13 06:31:44'), (33, 'Openness', 1, '2018-05-13 06:33:18', '2018-05-13 06:33:18'), (34, 'Ambition', 1, '2018-05-13 06:33:31', '2018-05-13 06:33:31'), (35, 'Bravery', 1, '2018-05-13 06:33:38', '2018-05-13 06:33:38'), (36, 'Resilience', 1, '2018-05-13 06:33:53', '2018-05-13 06:33:53'), (37, 'Charity', 1, '2018-05-13 06:34:10', '2018-05-13 06:34:10'), (38, 'Compassion', 1, '2018-05-13 06:34:18', '2018-05-13 06:34:18'), (39, 'Competence', 1, '2018-05-13 06:34:29', '2018-05-13 06:34:29'); -- -------------------------------------------------------- -- -- Table structure for table `view` -- CREATE TABLE `view` ( `viewId` int(11) NOT NULL, `view_for` int(11) NOT NULL, `view_by` int(11) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:Inactive , 1:Active', `crd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `upd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `email` (`email`); -- -- Indexes for table `contactUs` -- ALTER TABLE `contactUs` ADD PRIMARY KEY (`contactUsId`); -- -- Indexes for table `favourites` -- ALTER TABLE `favourites` ADD PRIMARY KEY (`favouriteId`), ADD KEY `favourite_by` (`favourite_by`), ADD KEY `favourite_for` (`favourite_for`); -- -- Indexes for table `interviews` -- ALTER TABLE `interviews` ADD PRIMARY KEY (`interviewId`), ADD KEY `interview_id` (`request_id`); -- -- Indexes for table `interview_request` -- ALTER TABLE `interview_request` ADD PRIMARY KEY (`requestId`), ADD KEY `interview_id` (`interview_id`); -- -- Indexes for table `job_titles` -- ALTER TABLE `job_titles` ADD PRIMARY KEY (`jobTitleId`); -- -- Indexes for table `notifications` -- ALTER TABLE `notifications` ADD PRIMARY KEY (`id`), ADD KEY `notification_by` (`notification_by`), ADD KEY `notification_for` (`notification_for`); -- -- Indexes for table `options` -- ALTER TABLE `options` ADD PRIMARY KEY (`optionId`); -- -- Indexes for table `recommends` -- ALTER TABLE `recommends` ADD PRIMARY KEY (`recommendId`), ADD KEY `recommend_by` (`recommend_by`), ADD KEY `recommend_for` (`recommend_for`); -- -- Indexes for table `requests` -- ALTER TABLE `requests` ADD PRIMARY KEY (`requestId`), ADD KEY `ineterview_by` (`request_by`), ADD KEY `interview_for` (`request_for`); -- -- Indexes for table `reviews` -- ALTER TABLE `reviews` ADD PRIMARY KEY (`reviewId`), ADD KEY `review_for` (`review_for`), ADD KEY `review_by` (`review_by`); -- -- Indexes for table `specializations` -- ALTER TABLE `specializations` ADD PRIMARY KEY (`specializationId`); -- -- Indexes for table `strengths` -- ALTER TABLE `strengths` ADD PRIMARY KEY (`strengthId`); -- -- Indexes for table `usermeta` -- ALTER TABLE `usermeta` ADD PRIMARY KEY (`metaID`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`userId`); -- -- Indexes for table `user_job_profile` -- ALTER TABLE `user_job_profile` ADD PRIMARY KEY (`jobProfileId`), ADD KEY `user_id` (`user_id`), ADD KEY `next_speciality` (`next_speciality`), ADD KEY `current_job_title` (`current_job_title`); -- -- Indexes for table `user_previous_role` -- ALTER TABLE `user_previous_role` ADD PRIMARY KEY (`previousRoleId`), ADD KEY `user_id` (`user_id`), ADD KEY `previous_job_title_id` (`previous_job_title_id`); -- -- Indexes for table `user_specialization_mapping` -- ALTER TABLE `user_specialization_mapping` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`), ADD KEY `specialization_id` (`specialization_id`); -- -- Indexes for table `user_strength_mapping` -- ALTER TABLE `user_strength_mapping` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`), ADD KEY `strength_id` (`strength_id`); -- -- Indexes for table `user_value_mapping` -- ALTER TABLE `user_value_mapping` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`), ADD KEY `value_id` (`value_id`); -- -- Indexes for table `value` -- ALTER TABLE `value` ADD PRIMARY KEY (`valueId`); -- -- Indexes for table `view` -- ALTER TABLE `view` ADD PRIMARY KEY (`viewId`), ADD KEY `view_by` (`view_by`), ADD KEY `view_for` (`view_for`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `admin` -- ALTER TABLE `admin` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `contactUs` -- ALTER TABLE `contactUs` MODIFY `contactUsId` bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `favourites` -- ALTER TABLE `favourites` MODIFY `favouriteId` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `interviews` -- ALTER TABLE `interviews` MODIFY `interviewId` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `interview_request` -- ALTER TABLE `interview_request` MODIFY `requestId` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `job_titles` -- ALTER TABLE `job_titles` MODIFY `jobTitleId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=87; -- -- AUTO_INCREMENT for table `notifications` -- ALTER TABLE `notifications` MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `options` -- ALTER TABLE `options` MODIFY `optionId` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `recommends` -- ALTER TABLE `recommends` MODIFY `recommendId` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `requests` -- ALTER TABLE `requests` MODIFY `requestId` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `reviews` -- ALTER TABLE `reviews` MODIFY `reviewId` int(20) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `specializations` -- ALTER TABLE `specializations` MODIFY `specializationId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=57; -- -- AUTO_INCREMENT for table `strengths` -- ALTER TABLE `strengths` MODIFY `strengthId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48; -- -- AUTO_INCREMENT for table `usermeta` -- ALTER TABLE `usermeta` MODIFY `metaID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `userId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `user_job_profile` -- ALTER TABLE `user_job_profile` MODIFY `jobProfileId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `user_previous_role` -- ALTER TABLE `user_previous_role` MODIFY `previousRoleId` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `user_specialization_mapping` -- ALTER TABLE `user_specialization_mapping` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `user_strength_mapping` -- ALTER TABLE `user_strength_mapping` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `user_value_mapping` -- ALTER TABLE `user_value_mapping` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `value` -- ALTER TABLE `value` MODIFY `valueId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40; -- -- AUTO_INCREMENT for table `view` -- ALTER TABLE `view` MODIFY `viewId` int(11) NOT NULL AUTO_INCREMENT; -- -- Constraints for dumped tables -- -- -- Constraints for table `favourites` -- ALTER TABLE `favourites` ADD CONSTRAINT `favourites_ibfk_1` FOREIGN KEY (`favourite_for`) REFERENCES `users` (`userId`) ON DELETE CASCADE, ADD CONSTRAINT `favourites_ibfk_2` FOREIGN KEY (`favourite_by`) REFERENCES `users` (`userId`) ON DELETE CASCADE; -- -- Constraints for table `interviews` -- ALTER TABLE `interviews` ADD CONSTRAINT `interviews_ibfk_1` FOREIGN KEY (`request_id`) REFERENCES `requests` (`requestId`) ON DELETE CASCADE; -- -- Constraints for table `recommends` -- ALTER TABLE `recommends` ADD CONSTRAINT `recommends_ibfk_1` FOREIGN KEY (`recommend_for`) REFERENCES `users` (`userId`) ON DELETE CASCADE, ADD CONSTRAINT `recommends_ibfk_2` FOREIGN KEY (`recommend_by`) REFERENCES `users` (`userId`) ON DELETE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
ALTER TABLE games ADD network_level ENUM('LOCAL','REMOTE_WRITE','HYBRID','REMOTE') NOT NULL DEFAULT 'HYBRID' AFTER type;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 01 Sep 2021 pada 06.01 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `newessay` -- -- -------------------------------------------------------- -- -- Struktur dari tabel `datatest` -- CREATE TABLE `datatest` ( `id_jawaban` int(10) NOT NULL, `jawaban` text NOT NULL, `nis` int(10) NOT NULL, `id_soal` int(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `datatest` -- INSERT INTO `datatest` (`id_jawaban`, `jawaban`, `nis`, `id_soal`) VALUES (2, '5w + 1h\n1. what (apa)\napa saja yang terkandung dalam peristiwa dalam berita tersebut\n2.who (siapa)\nsiapa saja yang terlibat dalam peristiwa dalam berita tersebut\n3. when (kapan)\nkapan peristiwa itu terjadi\n4. where (dimana)\ndimana tempat peristiwa itu terjadi\n5. why (kenapa)\nkenapa peristiwa itu dapat terjadi atau latar belakangnya\n6. how (bagaimana)\nbagaimana peristiwa itu terjadi atau kronologisnya', 88852019, 11), (3, '5w + 1h\n1. what (apa)\napa saja yang terkandung dalam peristiwa dalam berita tersebut\n2.who (siapa)\nsiapa saja yang terlibat dalam peristiwa dalam berita tersebut\n3. when (kapan)\nkapan peristiwa itu terjadi\n4. where (dimana)\ndimana tempat peristiwa itu terjadi\n5. why (kenapa)\nkenapa peristiwa itu dapat terjadi atau latar belakangnya\n6. how (bagaimana)\nbagaimana peristiwa itu terjadi atau kronologisnya', 86677116, 11), (4, 'Unsur-unsur berita disebut juga dengan pokok-pokok informasi yang terangkum dalam enam pertanyaan, yaitu 5W + 1H atau dalam bahasa Indonesia disingkat ADIKSIMBA (Apa, DI mana, SIapa, Mengapa, BAgaimana) yang ditempatkan pada bagian awal pemberitaan.', 78507745, 11), (5, 'What = Apa peristiwanya?\nWho = Siapa yang mengalami peristiwa itu?\nWhere = Di mana terjadinya peristiwa itu?\nWhen = Kapan terjadinya peristiwa itu?\nWhy = Mengapa peristiwa itu terjadi?\nHow = Bagaimana proses peristiwanya?', 72047765, 11), (6, 'Apa.\nSiapa, di mana, kapan.\nMengapa, bagaimana.', 87027317, 11), (7, 'berita yang baik adalah berita yang memiliki enam unsur yang dikenal dengan 5W + 1H.', 64850875, 11), (8, '5W+1H\nWhat (apa)\nWho (siapa)\nWhere (di mana)\nWhen (kapan)\nWhy (mengapa)\nHow (bagaimana)', 73548494, 11), (9, 'What = Apa peristiwanya?\nWho = Siapa yang mengalami peristiwa itu?\nWhere = Di mana terjadinya peristiwa itu?\nWhen = Kapan terjadinya peristiwa itu?\nWhy = Mengapa peristiwa itu terjadi?\nHow = Bagaimana proses peristiwanya?', 73071829, 11), (10, 'What = Apa peristiwanya?\nWho = Siapa yang mengalami peristiwa itu?\nWhere = Di mana terjadinya peristiwa itu?\nWhen = Kapan terjadinya peristiwa itu?\nWhy = Mengapa peristiwa itu terjadi?\nHow = Bagaimana proses peristiwanya?', 85682053, 11), (11, 'Unsur-unsur dalam berita adalah 5W+1H, yang terdiri dari:\n1. What: penjelasan mengenai berita yang akan disampaikan;\n2. Where: lokasi terjadinya berita yang disampaikan;\n3. When: waktu terjadinya berita;\n4. Who: orang-orang yang mempunyai peran dalam kejadian yang diberitakan;\n5. Why: penyebab dari terjadinya berita tersebut;\n6. How: prosedur terjadinya berita yang disampaikan.', 78954688, 11), (12, 'Berita yang baik adalah berita yang memiliki enam unsur yang dikenal dengan 5W + 1H. What (apa), who (siapa), where (di mana), when (kapan), why (mengapa), dan how (bagaimana) adalah pertanyaan yang dijawab dan dijelaskan dalam berita.', 75698817, 11), (13, '5W+1H\nWhat, Who, Where, When, Why dan How', 82816613, 11), (14, 'Unsur-unsur berita adalah\n\nWhat = Apa peristiwanya?\nWho = Siapa yang mengalami peristiwa itu?\nWhere = Di mana terjadinya peristiwa itu?\nWhen = Kapan terjadinya peristiwa itu?\nWhy = Mengapa peristiwa itu terjadi?\nHow = Bagaimana proses peristiwanya?', 67572071, 11), (15, 'What (apa), who (siapa), where (di mana), when (kapan), why (mengapa), dan how (bagaimana) adalah pertanyaan yang dijawab dan dijelaskan dalam berita', 63195221, 11), (16, 'Berita yang memiliki enam unsur yang di kenal dengan 5W+1H.', 73061294, 11), (17, 'Harus memiliki 5W+1H\nWhat(apa), who(siapa), where (dimana), when(kapan), why(mengapa), how(bagaimana)', 73944621, 11), (18, 'berita yang memiliki enam unsur yang dikenal dengan 5W + 1H. What (apa), who (siapa), where (di mana), when (kapan), why (mengapa), dan how (bagaimana)', 66305405, 11), (19, 'Berita yang memiliki enam unsur yang di kenal dengan 5W+1H', 72884949, 11), (20, '<NAME>', 67279251, 11), (21, '5w+1h\n1. What\n2. Who\n3. Where\n4. When\n5. Why\n6. How', 79985791, 11), (22, 'Teks berita bersifat obyektif. Obyektif maksudnya sesuai keadaan yang terjadi tanpa ada pengaruh pendapat pribadi. \nBerdasarkan fakta dan bukan pendapat atau opini penulis. \nJudul berita mewakili keseluruhan isi berita \nBahasa yang dipakai efektif, mudah dipahami, lengkap, dan memikat pembaca.\nInformasi atas suatu peristiwa disampaikan secara urut atau kronologis. \nData dalam teks fakta disajikan lengkap, sesuai konteks, dan dapat dibuktikan kebenarannya oleh semua orang.', 88852019, 12), (23, 'Teks berita bersifat obyektif. Obyektif maksudnya sesuai keadaan yang terjadi tanpa ada pengaruh pendapat pribadi. \nBerdasarkan fakta dan bukan pendapat atau opini penulis. \nJudul berita mewakili keseluruhan isi berita \nBahasa yang dipakai efektif, mudah dipahami, lengkap, dan memikat pembaca.\nInformasi atas suatu peristiwa disampaikan secara urut atau kronologis. \nData dalam teks fakta disajikan lengkap, sesuai konteks, dan dapat dibuktikan kebenarannya oleh semua orang.', 86677116, 12), (24, 'Berupa fakta, Menggunakan kalimat yang mudah di pahami, Menarik, Jelas, Segera disampaikan, Merupakan berita terbaru', 78507745, 12), (25, 'Berupa fakta, Menggunakan kalimat yang mudah di pahami, Menarik, Jelas, Segera disampaikan, Merupakan berita terbaru', 72047765, 12), (26, 'Bersifat faktual\nAktual\nKalimat mudah dipahami\nSegera disampaikan', 87027317, 12), (27, 'Faktual.\nAktual.\nUnik atau menarik.\nBerpengaruh bagi masyarakat luas. \nTerdapat waktu dan tempat kronologi kejadian.\nObjektif.\nBahasa baku, sederhana, dan komunikatif.', 64850875, 12), (28, 'Berdasarkan fakta dan bukan pendapat atau opini penulis', 73548494, 12), (29, '1. Pemberitaan tersebut adalah sesuatu yang benar-benar terjadi, bukan opini, atau gagasan penulis.\n2. Peristiwa yang jarang terjadi, bukan suatu hal umum. \n3. Aktual yakni pemberitaan tersebut masih segar dan baru terjadi bukan kejadian lampau. \n4. Data yang disajikan real, asli, dan tidak direkayasa.', 73071829, 12), (30, 'Pemberitaan tersebut adalah sesuatu yang benar-benar terjadi, bukan opini, atau gagasan penulis.\nPeristiwa yang jarang terjadi, bukan suatu hal umum.\nAktual yakni pemberitaan tersebut masih segar dan baru terjadi bukan kejadian lampau.\nData yang disajikan real, asli, dan tidak direkayasa.\nMenggunakan bahasa yang menarik dan dapat dimengerti pembaca.?', 85682053, 12), (31, 'Teks berita merupakan jenis teks yang berisi data-data yang bersifat faktual, berbahasa singkat dan efektif, dan informasi yang disampaikan bersifat urut.', 78954688, 12), (32, 'Ciri-ciri teks berita- Berupa fakta- Menggunakan kalimat yang mudah di pahami- Menarik- Jelas- Segera disampaikan- Merupakan berita terbaru', 75698817, 12), (33, 'Mengungkapkan fakta, bukan opini penulis', 82816613, 12), (34, 'Berupa fakta, Menggunakan kalimat yang mudah di pahami, Menarik, Jelas, Segera disampaikan, Merupakan berita terbaru', 67572071, 12), (35, 'Faktual, aktual, unik, menarik, berpengaruh, objektif', 63195221, 12), (36, 'judul berita mewakili keseluruhan isi berita, berdasarkan fakta dan bukan pendapat atau opini penulis', 73061294, 12), (37, '?bersifat obyektif\n?bedasarkan fakta dan bukan pendapat atau opini penulis \n?judul berita mewakili isi berita', 73944621, 12), (38, 'Teks berita bersifat obyektif. ...\nBerdasarkan fakta dan bukan pendapat atau opini penulis.\nJudul berita mewakili keseluruhan isi berita.\nBahasa yang dipakai efektif, mudah dipahami, lengkap, dan memikat pembaca.\nInformasi atas suatu peristiwa disampaikan secara urut atau kronologis.', 66305405, 12), (39, 'Fantual aktual unik atau menarik', 72884949, 12), (40, 'Unsur unsur yg mengandung komponen', 67279251, 12), (41, 'Pemberitaan tersebut adalah sesuatu yang benar-benar terjadi, bukan opini, atau gagasan penulis.\nPeristiwa yang jarang terjadi, bukan suatu hal umum. \nAktual yakni pemberitaan tersebut masih segar dan baru terjadi bukan kejadian lampau. \nData yang disajikan real, asli, dan tidak direkayasa. \nMenggunakan bahasa yang menarik dan dapat dimengerti pembaca.', 79985791, 12), (42, 'Telah terjadi sebuah kecelakaan tunggal yang cukup hebat kemarin malam pada jalan Tol Cipali pada tanggal 5 April 2015. Satu mobil mewah yang di kendarai oleh seorang anak muda yang bernama Ferdi, ia mengendarai mobil dengan kecepatan yang tinggi yakni 120 KM/jam.\nMobil yang memiliki nomor polisi B 3763 AH tersebut telah menabrak pembatas jalan karena mengalami rem blong pada mobilnya. Mobil Ferarri dengan warna biru itu untung tidak menimbulkan kecelakaan dengan pengguna jalan yang lain karena pada saat itu Tol Cipali pun terlihat cukup macet pada arah yang sebaliknya.\nUntungnya pada saat kejadian kecelakaan yang terjadi sama sekali tidak mengakibatkan adanya korban jiwa, namun untuk pengemudi mobil Ferarri tersebut mengalami luka berat yang cukup parah dan saat ini tengah di rawat di Rumah sakit terdekat.', 88852019, 13), (43, 'Telah terjadi sebuah kecelakaan tunggal yang cukup hebat kemarin malam pada jalan Tol Cipali pada tanggal 5 April 2015. Satu mobil mewah yang di kendarai oleh seorang anak muda yang bernama Ferdi, ia mengendarai mobil dengan kecepatan yang tinggi yakni 120 KM/jam.\nMobil yang memiliki nomor polisi B 3763 AH tersebut telah menabrak pembatas jalan karena mengalami rem blong pada mobilnya. Mobil Ferarri dengan warna biru itu untung tidak menimbulkan kecelakaan dengan pengguna jalan yang lain karena pada saat itu Tol Cipali pun terlihat cukup macet pada arah yang sebaliknya.\nUntungnya pada saat kejadian kecelakaan yang terjadi sama sekali tidak mengakibatkan adanya korban jiwa, namun untuk pengemudi mobil Ferarri tersebut mengalami luka berat yang cukup parah dan saat ini tengah di rawat di Rumah sakit terdekat.', 86677116, 13), (44, 'Telah terjadi sebuah kecelakaan hebat kemarin malam di Jalan Tol Cipali pada tanggal 4 Maret 2015, sebuah Mobil Mewah ini dikemudikan oleh seorang anak muda yang bernama Agus, ia mengemudikan mobil dengan kecepatan diatas 120 KM/Jam.\n\nMobil bernomor polisi B 3641 AH itu menabrak sebuah pembatas jalan sebab mengalami rem blong pada mobilnya. Mobil Ferarri berwarna merah itu untungnya tidak membuat kecelakaan hebat karena pada saat itu Tol Cipali terlihat macet dari arah sebaliknya.\n\nUntungnya dalam kejadian ini tidak ada korban jiwa, hanya saja sang pengemudi mengalami luka berat dan kini masih di rawat di Rumah Sakit terdekat.', 78507745, 13), (45, 'Telah terjadi sebuah kecelakan hebat kemarin malam di Jalan Tol Cipali pada tanggal 4 Maret 2015, sebuah Mobil Mewah ini dikemudikan oleh seorang anak muda yang bernama Agus, dia mengemudikan2 mobilnya dengan kecepatan diatas 120 KM/Jam. Mobil bernomor polisi B 3641 AH itu menabrak sebuah pembatas jalan karena mengalami rem blong pada mobilnya. Mobil Ferarri berwarna merah itu untungnya tidak membuat kecelakaan hebat karena pada saat itu Tol Cipali terlihat macet dari arah sebaliknya. Untunya dalam kejadian ini tidak terjadi korban jiwa, hanya saja sang pengemudi mengalami luka berat dan kini masih di rawat di Rumah Sakit terdekat.', 72047765, 13), (46, 'Sebuah kejadian tak terduga terjadi komplek perumahan Griya Jaya di Lampungkemarin malam jam 20.14 WIB . Rumah milik keluarga pak Hermana itu terbakar dan2 hangus tak tersisa. Peristiwa itu terjadi lantaran sang pemilik rumah yang menaruh lilinnya di atas lemari kayu miliknya. Untungnya saat kejadian itu sang pemilik rumah yaitu pak Hermana sedang pergi tahlilan di rumah tetangganya, sedangkan istrinya sedang pulang kampung. Dalam musibah itu, pak Hermana mengalami kerugian kurang lebih sekitar RP 765 Juta termasuk beberapa dokumen penting seperti Akta kelahiran, Ijasah dan surat-surat tanah miliknya.', 87027317, 13), (47, 'Sore ini telah terjadi kecelakaan,di Jl.Sudirman.Kecelakaan ini terjadinya tabrakan antara mobil truk dan sepeda motor.Untungnya korban selamat,korban hanya mengalami luka yg cukup ringan.Kecelakaan terjadi diduga karena sopir mobil truk mengantuk dan truk jadi oleng,sehingga menabrak sepeda motor.', 64850875, 13), (48, 'Telah terjadi sebuah kecelakaan tunggal yang cukup hebat kemarin malam pada jalan Tol Cipali pada tanggal 5 April 2015. Satu mobil mewah yang di kendarai oleh seorang anak muda yang bernama Ferdi, ia mengendarai mobil dengan kecepatan yang tinggi yakni 120 KM/jam.', 73548494, 13), (49, 'Satu unit mobil yang ditumpangi satu keluarga terjun ke sungai di Ogan Komering Ilir, Sumatera Selatan (Sumsel). Empat orang tewas akibat kecelakaan tersebut.\nKecelakaan itu diduga berawal saat mobil melintas di jembatan penghubung jalan lintas Sumatera (Jalinsum) Desa Sukaraja, Pedamaran, Rabu (30/6/2021) siang. Mobil diduga melaju dengan kecepatan tinggi.', 73071829, 13), (50, 'Telah terjadi kecelakan lalu lintas yang menewaskan 2 pengendara motor dan 8 orang luka ringan serta 3 orang luka berat. Kecelakan tersebut terjadi akibat lampu lalu lintas yang mengalami masalah. Kecelakaan terjadi di sekitar jalan Pahlawan pada pukul 20.00 WIB.', 85682053, 13), (51, 'Seorang mahasiswi asal Sidoarjo, Jawa Timur Agil Wahyuningsih meninggal dunia karena kecelakaan di Jalan Raya Putat Lor, Kecamatan Menganti, Gresik. Wanita 20 tahun itu menabrak truk dari belakang.\n\nKecelakaan terjadi pada saat sepeda motor yang dikemudikan korban berjalan dari arah selatan menuju utara.\n\nSetiba di TKP, korban yang berkendara seorang diri itu hendak mendahului sebelah kanan kendaraan dump truck tronton bernomor polisi W 8479 UT yang dikemudikan Jainul Mustofa. Namun nahas, ketika motornya hendak mendahului, korban malah menabrak body belakang truk dan terjatuh.\n\n\"Kendaraan truk dan motor korban berjalan searah. Saat mendahului kurang memperhatikan arah depan dengan jelas dan tidak menjaga jarak aman sehingga membentur bodi belakang kanan kendaraan,\" kata Kanit Laka Satlantas Polres Gresik Ipda Suharto, Jumat (2/7/2021).\n\nAkibat kecelakaan lalu lintas tersebut korban meninggal dunia. Saat diperiksa petugas, mahasiswi itu mengalami luka di kepala. Diduga karena jatuh terus terkena benturan keras sehingga mengenai kepala korban.\n\n\"Oleh petugas korban lalu dibawa ke RSUD Ibnu Sina, untuk dimintakan Visum Et Repertum jenazah,\" pungkasnya.', 78954688, 13), (52, 'Jakarta - Terjadi kecelakaan antara sepeda motor dengan mini bus di Kalideres, Jakarta Barat. Akibat kejadian itu, pengendara sepeda motor alami luka.\nDilihat dari akun instagram TMC Polda Metro Jaya, Sabtu (3/7/2021), disebutkan kejadian itu terjadi pada pukul 02.31 WIB. Pemotor menabrak mobil di depan Terminal Kalideres.\n\n\"02:31 #Kecelakaan Pemotor menabrak Minibus B 7913 LC di depan Terbus Kalideres, Jakarta Barat, korban luka-luka Pemotor dievakuasi ke RS Hemina Kalideres dan masih penanganan #Polri,\" tulis TMC Polda Metro.', 75698817, 13), (53, 'Terjadi kecelakaan antara sepeda motor dan mobil, yang mana kecelakaan terjadi karena pengemudi mobil berbelok arah secara tiba-tiba sehingga terjadi tabrakan.', 82816613, 13), (54, 'Telah terjadi sebuah kecelakaan tunggal yang cukup hebat kemarin malam pada jalan Tol Cipali pada tanggal 5 April 2015. Satu mobil mewah yang di kendarai oleh seorang anak muda yang bernama Ferdi, ia mengendarai mobil dengan kecepatan yang tinggi yakni 120 KM/jam.\n\nMobil yang memiliki nomor polisi B 3763 AH tersebut telah menabrak pembatas jalan karena mengalami rem blong pada mobilnya. Mobil Ferarri dengan warna biru itu untung tidak menimbulkan kecelakaan dengan pengguna jalan yang lain karena pada saat itu Tol Cipali pun terlihat cukup macet pada arah yang sebaliknya.\n\nUntungnya pada saat kejadian kecelakaan yang terjadi sama sekali tidak mengakibatkan adanya korban jiwa, namun untuk pengemudi mobil Ferarri tersebut mengalami luka berat yang cukup parah dan saat ini tengah di rawat di Rumah sakit terdekat.', 67572071, 13), (55, 'Telah terjadi kecelakaan pesawat boing 3331 dengan tujuan Kalimantan-Bali. Pesawat yang di kemudikan Pilot Irawan ini diberitakan telah hilang kontak sejak pukul 15.00 wib. Diperkirakan pesawat tersebut terjatuh di wilayah bromo, pasuruan. Sejak berita ini diberitakan, belum ada keterangan lebih lanjut terkait peristiwa naas tersebut.', 63195221, 13), (56, 'Tingkat kecelakaan di Indonesia lebih tinggi dari eropa dan amerika', 73061294, 13), (57, 'Bedasarkan korlontas, kerugian karena kecelakaan di Indonesia mencapai Rp 200 milyar', 73944621, 13), (58, 'Telah terjadi kecelakan lalu lintas yang menewaskan 2 pengendara motor dan 8 orang luka ringan serta 3 orang luka berat.Kecelakan tersebut terjadi akibat lampu lalu lintas yang mengalami masalah.kecelakaan terjadi di sekitar jalan monas.', 66305405, 13), (59, 'Kecelakaan di jarul Jonggol Cianjur', 72884949, 13), (60, 'Adek gw jatuh dari sepeda dan dia ter luka', 67279251, 13), (61, 'Suatu hari ada motor dan mobil kecelakaan terjadilah tabrak lari\n\nKarena motor tersebut mengebut dan mobil tersebut yang menyupirnya tidak hati hati dan tidak memakai sabuk pengaman', 79985791, 13), (62, 'Banjir merendam pemukiman warga dan sejumlah bangunan sekolah di Lebak, Banten, Selasa sore. Para siswa harus menanggalkan alas kaki untuk berangkat ke sekolah.\nGuyuran hujan deras selama 3 hari. membuat aktivitas warga dan para siswa terganggu, Salah satunya di Sekolah Menengah Negeri 1 Rangkasbitung, Lebak, Banten.\nBanjir setinggi 30 hingga 50 cm membuat siswa harus berjalan menerjang genangan menuju sekolah tanpa alas kaki, meski demikian para siswa tetap semangat belajar.\nHingga tadi malam hujan masih mengguyur wilayah Rangkasbitung, Lebak Banten, warga berharap sistem saluran air segera diperbaiki', 88852019, 14), (63, 'Banjir merendam pemukiman warga dan sejumlah bangunan sekolah di Lebak, Banten, Selasa sore. Para siswa harus menanggalkan alas kaki untuk berangkat ke sekolah.\nGuyuran hujan deras selama 3 hari. membuat aktivitas warga dan para siswa terganggu, Salah satunya di Sekolah Menengah Negeri 1 Rangkasbitung, Lebak, Banten.\nBanjir setinggi 30 hingga 50 cm membuat siswa harus berjalan menerjang genangan menuju sekolah tanpa alas kaki, meski demikian para siswa tetap semangat belajar.\nHingga tadi malam hujan masih mengguyur wilayah Rangkasbitung, Lebak Banten, warga berharap sistem saluran air segera diperbaiki', 86677116, 14), (64, 'Terjadi banjir bandang disekitar sungai ciliwung, banjir tersebut diduga karena hujan yang turun sangat deras dari jam 19.00 WIB hingga pagi jam 09.00 WIB. 2 Desa terendam dan banyak keluarga yang mengungsi di kampung sebelah.\n\nSekitar 137 kepala keluarga kehilangan tempat tinggalnya karena banjir. Pemerintah segera memberikan bantuan berupa tempat pengungsian air bersih, makanan, minuman, obat-obatan dan pakaian.', 78507745, 14), (65, 'Terjadi banjir bandang di sekitar sungai ciliwung, banjir tersebut diduga karena hujan yang turun sangat deras dari jam 18.00 WIB hingga pagi jam 10.00 WIB. 2 Desa terenda, dan banyak keluarga yang mengungsi di kampung sebelah\n\nSekitar 150 kepala keluarga kehilangan tempat tinggalnya karena banjir. Pemerintah segera memberikan bantuan berupa tempat pengungsian air bersih, makanan, minuman, obat-obatan dan pakaian.\n\nSebelumnya juga pernah terjadi banjir di desa ini dua tahun yang lalu, tetapi banjir tahun ini lebih besar di bandingkan dengan tahun kemarin.\n\nSalah satu penyebabnya juga diduga karena kebiasaan masyarakat sekitar yang membuang sampah sembarangan di sungai ciliwung sehingga terjadi banjir ketika musim hujan datang.', 72047765, 14), (66, 'Tulungagung ? Gugus Tugas Percepatan Penanganan COVID-19 Kabupaten Tulungagung memberitahukan bahwa tingkat kesembuhan pasien yang terinfeksi virus mengalami peningkatan sebesar 98%. Hingga berita ini ditulis (Rab/15 Jul 2020) jumlah pasien yang diisolasi hanya tersisa dua pasien saja.\nSelama ini pasien yang diindikasi positif corona dikarantina di Rusunawa IAIN Tulungagung. Sebelumnya jumlah suspect positif corona mencapai 240 orang yang berasal dari 18 kecamatan. Dari jumlah tersebut 235 diantaranya sudah sembuh, dan meninggal tiga orang.\nMenurut penuturan Wakil Jubir GTPP COVID-19 Tulungagung perbandingan antara yang sembuh dan meninggal masih banyak yang mengalami kesembuhan. Oleh sebab itu ia berharap bahwa Kabupaten Tulungagung bisa segera menuju zona hijau.', 87027317, 14), (67, 'Banjir yang terjadi sejak senin kemarin mengakibatkan hampir seluruh akses masuk menuju kabupaten Pacitan terendam banjir. Dari data sementara ada 4000 warga yang diungsikan di beberapa tempat.', 64850875, 14), (68, 'Terjadi sebuah banjir bandang di sekitar area sungai Ciliwung, banjir tersebut diduga disebabkan oleh adanya curah hujan yang turun dengan sangat deras dari jam 18.00 WIB sampai pagi pukul 08.00 WIB. Sudah banyak keluarga dari 3 desa yang terendam telah mengungsi ke kampung sebelah.', 73548494, 14), (69, 'Sebanyak 30 rumah warga di Desa Sindang Asih, Kabupaten Tangerang, Banten mengalami rusak berat dan ringan akibat diterjang angin puting beliung, pada Kamis 1 Juli 2021.', 73071829, 14), (70, 'Gempa dengan kekuatan 7.4 SR mengguncang kota Palu, Donggala dan Sigi pada 28 September 2018. Gempa ini menurut catatan sejarah bukanlah kejadian pertama. Bahkan di tahun 1898, di tempat yang sama tercatat pernah terjadi tsunami yang tak kalah hebatnya.\n\nGempa 2018 ini memakan korban sebanyak 1.780 jiwa sementara ratusan ribu lainnya mengungsi. Penyebab gempa adalah adanya aktifitas dari patahan Palu Koro yang memang melintasi wilayah Sulawesi Tengah. Aktifitas patahan ini menyebabkan munculnya getaran hebat yang kemudian disusul bencana tsunami setinggi 1,5 meter serta fenomena likuifitas yang menelan habis satu kampung.\n\nBencana ini merupakan pukulan telak bagi Indonesia, terlebih karena pemerintah masih sibuk mengusahakan pemulihan di Lombok setelah gempa yang terjadi Juli lalu.', 85682053, 14), (71, 'Sebanyak 30 rumah warga di Desa Sindang Asih, Kabupaten Tangerang, Banten mengalami rusak berat dan ringan akibat diterjang angin puting beliung, pada Kamis 1 Juli 2021.\n\n\"Dari laporan petugas di lapangan, ada 30 rumah warga yang mengalami rusak berat dan ringan,\" kata Kepala Bidang Kedaruratan dan Logistik Badan Penanggulangan Bencana Daerah (BPBD) Kabupaten Tangerang Kosrudin di Tangerang, Jumat (2/7/2021).\nIa mengatakan angin puting beliung yang menerjang kampung Gembong, RT 01, 02, 03, RW 06, Desa Sindang Asih, Kecamatan Sindang Jaya, Kabupaten Tangerang itu terjadi sekitar pukul 14.00 WIB.\n\n\"Selain merusak beberapa rumah, dampak dari peristiwa itu juga telah menumbangkan pohon, sehingga akses jalan di sekitar kawasan itu tertutup,\" katanya.\n\nIa mengungkapkan upaya BPBD Kabupaten Tangerang dalam menanggulangi bencana tersebut, pihaknya telah menerjunkan 7 orang personel yang dibantu aparat kecamatan setempat bersama warga untuk membersihkan puing-puing bangunan yang hancur.\n\n\"Tidak ada korban jiwa, saat ini warga yang terkena musibah ada yang masih bertahan, ada yang mengungsi di rumah saudara atau tetangga,\" katanya.\n\nIa mengimbau masyarakat Kabupaten Tangerang agar meningkatkan kewaspadaan, karena kondisi dan situasi cuaca saat ini tidak menentu dan ekstrem, bahkan bisa berpotensi terjadinya bencana alam, baik angin kencang, puting beliung dan lainnya.\n\n\"Kami menyarankan kepada masyarakat untuk tetap waspada, karena kondisi cuaca saat ini tidak bisa di prediksi. Potensi bencana bisa terjadi kapan saja,\" katanya.', 78954688, 14), (72, 'JAKARTA - Badan Nasional Penanggulangan Bencana (BNPB) mencatat sejak 1 Januari hingga 27 Mei 2021 telah terjadi total sebanyak 1.334 kejadian bencana alam di Tanah Air.\n\n\nDeputi Bidang Sistem dan Strategi sekaligus Kepala Pusat Data, Informasi dan Komunikasi BNPB, Raditya Jati mengatakan dari total kejadian bencana itu, 98% di antaranya merupakan kejadian bencana hidrometeorologi.\n\n?BNPB sendiri sejak 1 Januari 2021 sampai saat ini sudah ada lebih dari 1.300-an kejadian bencana. Dan 98% catatan kami adalah kejadian bencana hidrometeorologi. Artinya, ini bencana banjir, banjir bandang, tanah longsor, dan seterusnya,? ungkap Raditya secara virtual, Jumat (28/5/2021).\n\nBANPB mencatat sebanyak 573 kejadian banjir, 354 kejadian puting beliung, dan 269 tanah longsor 254. Kejadian bencana lain juga tercatat yaitu gelombang pasang 17 kejadian.\n\nSementara itu, provinsi yang tercatat paling banyak kejadian bencana terjadi Pulau Jawa yakni di Jawa Barat dengan 360 kejadian, di Jawa Timur dengan 169 kejadian, dan di Jawa Tengah sebanyak 164 kejadian bencana.', 75698817, 14), (73, 'Panik, gempa bumi bergoyang di Malang dan terdapat ratusan orang mengalami luka-luka dan sekitar 10 orang meninggal karena tertimpa bangunan yang roboh.', 82816613, 14), (74, 'Terjadi sebuah banjir bandang di sekitar area sungai Ciliwung, banjir tersebut diduga disebabkan oleh adanya curah hujan yang turun dengan sangat deras dari jam 18.00 WIB sampai pagi pukul 08.00 WIB. Sudah banyak keluarga dari 3 desa yang terendam telah mengungsi ke kampung sebelah.\n\nSekitar 130 kepala keluarga terancam kehilangan tempat tinggal mereka disebabkan oleh banjir. Pemerintah dengan segera memberikan bantuan berupa makanan, minuman, air bersih, pakaian dan juga obat- obatan.\n\nSebelumnya, sudah pernah terjadi banjir yang melanda desa tersebut 3 tahun silam. Namun, rupanya banjir pada tahun ini jauh lebih besar jika dibandingkan banjir tahun sebelumnya. Salah satu faktor di duga adalah kebiasaan dari masyarakat sekitar yang membuat sampah sembarangan pada sungai Ciliwung tersebut, hingga mengakibatkan banjir pada musim hujan.', 67572071, 14), (75, 'Telah terjadi gempa bumi dengan keuatan 8,4 skalarikter dengan potensi Tsunami. Menurut BMKG diperkirakan pusat gempa berada di 100m kedalaman laut dan terletak sejauh 30km dari tepi pantai. Akibst gempa tersebut diperkirakan terjadi kerusakan diberbagai wilayah. Belum diketahui berapa banyak korban akibat gempat tersebut.', 63195221, 14), (76, '', 73061294, 14), (77, 'Sebagai salah satu daerah etalase bencana alam di Jawa Barat, seluruh kecamatan di garut dituntut waspada terjadinya bencana alam', 73944621, 14), (78, 'gunung meletus, tsunami, gempa bumi, banjir, tanah longsor, dll', 66305405, 14), (79, 'Pendahulu', 72884949, 14), (80, 'Di daerah gw banjir dan banjir nya sangat dalam sampai 1m', 67279251, 14), (81, 'Banjir merendam pemukiman warga dan sejumlah bangunan sekolah di Lebak, Banten, Selasa sore. Para siswa harus menanggalkan alas kaki untuk berangkat ke sekolah.\nBanjir setinggi 30 hingga 50 cm membuat siswa harus berjalan menerjang genangan menuju sekolah tanpa alas kaki, meski demikian para siswa tetap semangat belajar.\n\nHingga tadi malam hujan masih mengguyur wilayah Rangkasbitung, Lebak Banten, warga berharap sistem saluran air segera diperbaiki', 79985791, 14), (82, 'Menyimak berita dengan seksama, baik itu mendengarkan atau membaca ulang teks berita.\nMencatat pokok-pokok dari isi berita yang didapatkan. Mulai dari tema atau topik berita, peristiwa apa yang terjadi, orang yang diberitakan, tempat kejadian, waku kejadian, dan proses terjadinya peristiwa yang sedang diberitakan.\nKemudian menyusun pokok-pokok isi berita menjadi bentuk kalimat berita.\nSetelah itu, menulis berdasarkan pokok-pokok pikiran yang telah ditemukan dalam wacana berita ke dalam bentuk sebuah paragraf.', 88852019, 15), (83, 'Menyimak berita dengan seksama, baik itu mendengarkan atau membaca ulang teks berita.\nMencatat pokok-pokok dari isi berita yang didapatkan. Mulai dari tema atau topik berita, peristiwa apa yang terjadi, orang yang diberitakan, tempat kejadian, waku kejadian, dan proses terjadinya peristiwa yang sedang diberitakan.\nKemudian menyusun pokok-pokok isi berita menjadi bentuk kalimat berita.\nSetelah itu, menulis berdasarkan pokok-pokok pikiran yang telah ditemukan dalam wacana berita ke dalam bentuk sebuah paragraf.', 86677116, 15), (84, 'Cara menyimpulkan isi berita adalah menyimak berita saksama dan mencatat pokok-pokok berita pada saat mendengarkan berita. Catatlah pokok-pokok berita dengan kalimat pendek agar tidak ketinggalan dalam menyimak berita. Membuat kesimpulan berita. Kesimpulan dibuat dengan merangkaikan pokok-pokok berita yang telah dicatat menjadi beberapa kalimat.', 78507745, 15), (85, 'Membaca, mendengarkan, atau menyimak berita yang disampaikan dengan cermat dan teliti\nMencatat inti/pokok dari berita yang disampaikan\nMengambil kesimpulan dari inti yang dicatat', 72047765, 15), (86, 'mencari pokok pokok cerita atau bacaan yang paling penting dalam sebuah paragraf lalau dapat diringkas,disimpulkan, dan menanggapi isi cerita.', 87027317, 15), (87, 'Menyimak berita\nMencatat pokok\" berita yg di dpat\nMembuat kesimpulan berita dan menyusun pokok\" berita\nDisusun dalam kalimat berita', 64850875, 15), (88, 'menyusun pokok-pokok isi berita menjadi bentuk kalimat berita.', 73548494, 15), (89, '1. Menyimak berita dengan seksama, baik itu mendengarkan atau membaca ulang teks berita.\n2. Mencatat pokok-pokok dari isi berita yang didapatkan. Mulai dari tema atau topik berita, peristiwa apa yang terjadi, orang yang diberitakan, tempat kejadian, waku kejadian, dan proses terjadinya peristiwa yang sedang diberitakan.\n3. Kemudian menyusun pokok-pokok isi berita menjadi bentuk kalimat berita.\nSetelah itu, menulis berdasarkan pokok-pokok pikiran yang telah ditemukan dalam wacana berita ke dalam bentuk sebuah paragraf', 73071829, 15), (90, 'Menyimak berita dengan seksama, baik itu mendengarkan atau membaca ulang teks berita.\n\nMencatat pokok-pokok dari isi berita yang didapatkan. Mulai dari tema atau topik berita, peristiwa apa yang terjadi, orang yang diberitakan, tempat kejadian, waku kejadian, dan proses terjadinya peristiwa yang sedang diberitakan.\n\nKemudian menyusun pokok-pokok isi berita menjadi bentuk kalimat berita.\n\nSetelah itu, menulis berdasarkan pokok-pokok pikiran yang telah ditemukan dalam wacana berita ke dalam bentuk sebuah paragraf.', 85682053, 15), (91, '1. Menyimak berita dengan seksama.\n2. Mencatat pokok isi berita yang didapat: tema, peristiwa, orang, tempat, waktu, dan proses terjadinya peristiwa yang diberitakan (5W+1H).\n3. Membuat kesimpulan berita dengan cara menyusun pokok-pokok berita kemudian disusun dalam kalimat berita.\n4. Cara menyimpulkan isi berita dapat ditulis dalam sebuah paragraf berdasarkan pokok pokok pikiran yang telah ditemukan dalam wacana berita.', 78954688, 15), (92, 'Langkah-langkah menyimpulkan isi berita sebagai berikut :\nMenyimak berita dengan seksama.\nMencatat pokok-pokok isi berita yang kita dapatkan : tema, peristiwa, yang diberitakan, orang yang diberitakan, tempat kejadian, waku kejadian, proses terjadinya peristiwa yang sedang diberitakan.\nMembuat kesimpulan berita dengan cara menyusun pokok-pokok berita kemudian disusun dalam kalimat berita.\nCara menyimpulkan isi berita dapat ditulis dalam sebuah paragraf berdasarkan pokok pokok pikiran yang telah ditemukan dalam wacana berita', 75698817, 15), (93, 'Inti permasalahan dari berita.', 82816613, 15), (94, 'Menyimak berita dengan seksama.\nMencatat pokok-pokok isi berita yang kita dapatkan : tema, peristiwa, yang diberitakan, orang yang diberitakan, tempat kejadian, waku kejadian, proses terjadinya peristiwa yang sedang diberitakan.', 67572071, 15), (95, 'Dengan menarik isi dari berita tersebut.', 63195221, 15), (96, 'Megawati terkait penanganan bencana alam ditanah air', 73061294, 15), (97, '?menyimak berita dengan saksama\n?mencatat pokok pokok dari isi berita yang didapatkan \n?kemudian menyusun pokok pokok isi berita menjadi bentuk kalimat berita', 73944621, 15), (98, 'Berita adalah kabar atau informasi berupa fakta terkini dari sebuah peristiwa. Topik yang biasa disajikan dalam berita pun bervariasi, mulai dari politik, pemerintah, pendidikan, kesehatan, ekonomi, hingga hiburan.', 66305405, 15), (99, 'Televisi', 72884949, 15), (100, 'Jelas kan isi teks', 67279251, 15), (101, 'menggunakan sistem 5w + 1 h\nwhat\nwhere\nwhy\nwhen\nwho\nhow', 79985791, 15), (102, 'Cerita legenda adalah cerita yang menyampaikan tentang asal-usul suatu daerah atau tokoh.\nCerita fabel adalah cerita yang pelaku utamanya adaalah binatang dan bersifat fiksi.\nCerita pelipur lara adalah cerita yang berisi hal-hal indah yang bisa menghibur hati.\nCerita jenaka adalah cerita yang bersifat lucu dan terdapat unsur komedi, tetapi tetap mengandung pesan moral.\nCerita sage adalah cerita yang mengandung nilai sejarah pada suatu daerah.\nCerita epos adalah cerita yang menmenyampaikan kisah-kisah heroik dan kepahlawanan.', 88852019, 16), (103, 'Cerita legenda adalah cerita yang menyampaikan tentang asal-usul suatu daerah atau tokoh.\nCerita fabel adalah cerita yang pelaku utamanya adaalah binatang dan bersifat fiksi.\nCerita pelipur lara adalah cerita yang berisi hal-hal indah yang bisa menghibur hati.\nCerita jenaka adalah cerita yang bersifat lucu dan terdapat unsur komedi, tetapi tetap mengandung pesan moral.\nCerita sage adalah cerita yang mengandung nilai sejarah pada suatu daerah.\nCerita epos adalah cerita yang menmenyampaikan kisah-kisah heroik dan kepahlawanan.', 86677116, 16), (104, 'Cerita Legenda, Cerita Fabel, Cerita Pelipur Lara, Cerita Jenaka, Cerita Sage, Cerita Epos,', 78507745, 16), (105, 'cerita legenda(asal-usul), cerita fabel, cerita pelipur lara, cerita jenaka, cerita sage, cerita epos, dan lainnya.', 72047765, 16), (106, 'cerita legenda(asal-usul), cerita fabel, cerita pelipur lara, cerita jenaka, cerita sage, cerita epos, dan lainnya.', 87027317, 16), (107, 'fabel, legenda, mite, sage, epos, jenaka', 64850875, 16), (108, 'Fabel, legenda, hikayat', 73548494, 16), (109, '1. Legenda\n2. Mitos\n3. Fabel\n4. Dongeng lucu', 73071829, 16), (110, 'Fabel, mitos, legenda, sage, epos, jenaka, hikayat, parabel,', 85682053, 16), (111, 'Cerita legenda/asal-usul, fabel, cerita pelipur lara, cerita jenaka, sage, dan epos', 78954688, 16), (112, 'Mitos\nLegenda\nDongeng', 75698817, 16), (113, 'Fabel, Mythical, Sage, Legend', 82816613, 16), (114, 'pembaca diharapkan untuk menyimpulkan pesan yang terkandung dalam cerita tersebut.', 67572071, 16), (115, 'Fabel, legenda,', 63195221, 16), (116, 'Cerita legenda,cerita fabel, cerita pelipur Lara, cerita jenaka, cerita sage, cerita epos', 73061294, 16), (117, '?cerita legenda \n?cerita fabel \n?cerita pelipur lara\n?cerita jenaka \n?cerita sage\n?cerita epos', 73944621, 16), (118, 'Menyimak berita dengan seksama, baik itu mendengarkan atau membaca ulang teks berita.\nMencatat pokok-pokok dari isi berita yang didapatkan. ...\nKemudian menyusun pokok-pokok isi berita menjadi bentuk kalimat berita.', 66305405, 16), (119, 'Cerita fabel cerita puripu rata', 72884949, 16), (120, '5w+1hyg berisi tentang klarifikasi', 67279251, 16), (121, '1. Legenda.\n2. Sage.\n3. Mite.\n4. Fabel.\n5. Pararel.\n6. Jenaka.\n7. Cerita Terbingkai.\n8. Parabel.', 79985791, 16), (122, 'a.Disampaikan secara turun-temurun.\nb. Tidak diketahui siapa yang pertama kali membuatnya (anonim) karena berasal dari mulut ke mulut tanpa ada kaidah penulisan.\nc. Kaya akan nilai-nilai luhur yang ingin disampaikan.\nd. Bersifat tradisional.Memiliki banyak versi dan variasi akibat penyampaiannya yang secara lisan selama bertahun-tahun sehingga besar kemungkinan tercampur dengan budaya baru.\nMempunyai bentuk-bentuk klise dalam susunan atau cara pengungkapkannya.', 88852019, 17), (123, 'Disampaikan secara turun-temurun.\nTidak diketahui siapa yang pertama kali membuatnya (anonim) karena berasal dari mulut ke mulut tanpa ada kaidah penulisan.\nKaya akan nilai-nilai luhur yang ingin disampaikan.\nBersifat tradisional.\nMemiliki banyak versi dan variasi akibat penyampaiannya yang secara lisan selama bertahun-tahun sehingga besar kemungkinan tercampur dengan budaya baru.\nMempunyai bentuk-bentuk klise dalam susunan atau cara pengungkapkannya.', 86677116, 17), (124, 'Disampaikan turun-temurun.\nTidak diketahui siapa yang pertama kali membuatnya.\nKaya nilai-nilai luhur.\nBersifat tradisional.\nMemiliki banyak versi dan variasi.\nMempunyai bentuk ? bentuk klise dalam susunan atau cara pengungkapkannya.', 78507745, 17), (125, '1. Disampaikan turun-temurun\n2. Tidak diketahui siapa yang pertama kali membuatnya\n3. Kaya nilai-nilai luhur\n4. Bersifat tradisional\n5. Memiliki banyak versi dan variasi\n6. Mempunyai bentuk ? bentuk klise dalam susunan atau cara pengungkapkannya\n7..Bersifat anonim, artinya nama pengarang tidak ada.\n8.Berkembang dari mulut ke mulut.\n9.Cerita rakyat disampaikan secara lisan.', 72047765, 17), (126, '1) Oleh yang empunya cerita dianggap sebagai suatu kejadian yang sungguh- sungguh pernah terjadi.\n2) Bersifat sekuler (keduniawian), terjadinya pada masa yang belum begitu lampau, dan bertempat di dunia seperti yang kita kenal sekarang. Tokoh utama dalam legenda adalah manusia.\n3) ?Sejarah? kolektif, maksudnya sejarah yang banyak mengalami distorsi karena seringkali dapat jauh berbeda dengan kisah aslinya.\n4) Bersifat migration yakni dapat berpindah-pindah, sehingga dikenal luas di daerah-daerah yang berbeda.\n5) Bersifat siklus, yaitu sekelompok cerita yang berkisar pada suatu tokoh atau kejadian tertentu, misalnya di Jawa legenda-legenda mengenai Panji.', 87027317, 17), (127, 'Disampaikan secara turun-temurun.\nTidak diketahui siapa yang pertama kali membuatnya (anonim) karena berasal dari mulut ke mulut tanpa ada kaidah penulisan.\nKaya akan nilai-nilai luhur yang ingin disampaikan.\nBersifat tradisional.\nMemiliki banyak versi dan variasi akibat penyampaiannya yang secara lisan selama bertahun-tahun sehingga besar kemungkinan tercampur dengan budaya baru.\nMempunyai bentuk-bentuk klise dalam susunan atau cara pengungkapkannya.', 64850875, 17), (128, 'Disampaikan secara lisan. Disampaikan secara turun-temurun. Tidak diketahiu siapa pertama kali membuatnya. Kaya akan nilai-nilai luhur', 73548494, 17), (129, '1. Cerita rakyat disampaikan secara lisan. 2. Disampaikan secara turun-temurun.\n3.Tidak diketahiu siapa pertama kali membuatnya. \n4. Kaya akan nilai-nilai luhur.', 73071829, 17), (130, 'Cerita rakyat Disampaikan secara lisan. Disampaikan secara turun-temurun. Tidak diketahiu siapa pertama kali membuatnya. Kaya akan nilai-nilai luhur. Bersifat tradisional Memiliki banyak versi dan variasi. Mempunyai bentuk-bentuk klise dalam susunan atau cara pengungkapannya.', 85682053, 17), (131, '- Cerita rakyat disampaikan secara lisan;\n- Disampaikan secara turun-temurun; \n- Tidak diketahui siapa pembuatnya;\n- Kaya akan nilai-nilai luhur.', 78954688, 17), (132, 'Cerita rakyat disampaikan secara lisan\nDisampaikan secara turun-temurun\nTidak diketahiu siapa pertama kali membuatnya\nKaya nilai-nilai luhur\nBersifat tradisional\nMemiliki banyak versi dan variasi\nMempunyai bentuk-bentuk klise dalam susunan atau cara pengungkapannya.', 75698817, 17), (133, 'Didistribusikan secara lisan.\nDiawariskan secara turun menurun', 82816613, 17), (134, 'cerita legenda(asal-usul), cerita fabel, cerita pelipur lara, cerita jenaka, cerita sage, cerita epos, dan lainnya.', 67572071, 17), (135, 'MtoM, diceritakan turun temurun,', 63195221, 17), (136, 'Disampaikan secara lisan. Disampaikan secara turun temurun. Tidak diketahui siapa pertama kali membuatnya. Kaya akan nilai-nilai luhur', 73061294, 17), (137, '?cerita rakyat disampaikan secara lisan \n?disampaikan secara turun temurun \n?tidak di ketahui siapa pertama kali membuatnya\n?kaya akan nilai nilai luhur', 73944621, 17), (138, 'Cerita rakyat disampaikan secara lisan. - Disampaikan secara turun-temurun. - Tidak diketahiu siapa pertama kali membuatnya. - Kaya akan nilai-nilai luhur.', 66305405, 17), (139, 'Di sampai turun ter murun', 72884949, 17), (140, 'Kabar org', 67279251, 17), (141, '1. Disampaikan turun-temurun.\n2. Tidak diketahui siapa yang pertama kali membuatnya.\n3. Kaya nilai-nilai luhur.\n4. Bersifat tradisional.\n5. Memiliki banyak versi dan variasi\n6. Mempunyai bentuk ? bentuk klise dalam susunan atau cara pengungkapkannya.\n7. Bersifat anonim, artinya nama pengarang tidak ada.\n8. Berkembang dari mulut ke mulut.\n9. Cerita rakyat disampaikan secara lisan.', 79985791, 17), (142, '1.jaka seger lan roro anteng\n2.ande ande lumut\n3.keong mas', 88852019, 18), (143, 'jaka seger lan roro anteng\nande ande lumut\nkeong mas', 86677116, 18), (144, 'jaka seger lan roro anteng, ande ande lumut, keong mas', 78507745, 18), (145, '1.Asal-usul Surabaya\n2.Asal-usul Reog Ponorogo\n3.Asal usul Ranu Kumbolo', 72047765, 18), (146, 'Asal usul Ranu Kumbolo\nRoro anteng dan Joko seger\nAsal usul gunung batok', 87027317, 18), (147, 'Kisah Keong Mas\nAsal usul Reog Ponorogo\nAsal usul Surabaya\nLegenda Timun Mas .', 64850875, 18), (148, 'Cindelaras, Ande-ande lumut, joko dolok', 73548494, 18), (149, '1. Jaka Budug dan Putri Kemuning.\n2. Jaka Seger dan Rara Anteng.\n3. Gunung Kawi.\n4. Keong Mas.', 73071829, 18), (150, '1) Kisah Keong Mas\n2) Asal usul Surabaya\n3) Legenda Timun Mas .', 85682053, 18), (151, '1. Gunung Kawi;\n2. Keong Mas;\n3. Aryo Menak.', 78954688, 18), (152, 'Legenda asal mula Banyuwangi\nLegenda asal mula Gunung Kelud\nLegenda asal mula Kota Surabaya', 75698817, 18), (153, 'Raden Inu Kertapati\nDamar Wulan Dan Minak Jinggo\nKeong Mas', 82816613, 18), (154, 'Gunung kawi, keong mas, asal usul nama surabaya', 67572071, 18), (155, 'Alingdharma, Joko tarup, Gajamada (Mojopahit).', 63195221, 18), (156, 'jaka seger lan roro anteng, ande ande limit, keong mas', 73061294, 18), (157, 'Keong mas\nAnde ande lumut\nJaka seger lan roro anteng', 73944621, 18), (158, 'ande-ande lumut, keong mas, Asal usul kota Banyuwangi', 66305405, 18), (159, 'Keong mas ande ande mulut Jaka seger lan roro anteng', 72884949, 18), (160, '<NAME>', 67279251, 18), (161, 'Kisah Timun Mas.\nKisah Keong Mas.\nKisah Cindelaras.', 79985791, 18), (162, 'Tokoh : tokoh utama dan tokoh pembantu\nPenokohan : Antagonis dan protagonis\nSetting atau latar\n- latar tempat\n- latar waktu\n- sosial\n-Tema\n-Alur\n-Amanat', 88852019, 19), (163, 'Tokoh : tokoh utama dan tokoh pembantu\nPenokohan : Antagonis dan protagonis\nSetting atau latar\n- latar tempat\n- latar waktu\n- sosial\nTema\nAlur\nAmanat', 86677116, 19), (164, 'Tema: kehidupan binatang yang berperilaku menyerupai manusia.\nLatar tempat: alam, seperti hutan, sungai, kolam, dan sebagainya.\nLatar waktu: pada suatu hari\nLatar suasana adalah suasana yang disajikan dalam cerita, seperti mencekam, menyenangkan, dan lain-lain\nAlur: alur maju (dari awal bergerak maju hingga terjadi akibat dari peristiwa sebelumnya)\nCara penceritaan: Menggunakan sudut pandang dia-an atau orang ketiga.\nTokoh: hewan jinak dan hewan liar.\nWatak tokoh: binatang jinak digambarkan memiliki sifat yang baik, sedangkan hewan liar digambarkan memiliki sifat yang buruk.\nAmanat adalah pesan yang disampaikan penulis secara tidak langsung.', 78507745, 19), (165, '1. Tema atau pokok cerita\n2. Alur yaitu jalan cerita atau plot yang terdiri dari alur maju, alur mundur, dan campuran (alur maju dan alur mundur).\n3. Latar atua setting terdiri dari suasana, waktu, tempat\n4. Penokohan terdiri dari protagonis yang sejalan dengan pembaca, antagonis sebagai tokoh yang berlawanan dengan protagonis, dan tritagonis sebagai tokoh yang tidak memihak manapun atau sebagai tokoh yang berdiri sendiri. Untuk watak dari perilaku tokoh tentang apa yang diceritakan pengarang dan apa yang diceritakan oleh tokoh lain.\n5. Sudut pandang adalah cara pandang seorang pengarang atau pembaca dalam cerita. Sudut pandang dibagi menjadi dua yaitu sudut pandang pertama dengan kata ganti aku, saya, kami, dan kita. Sudut pandang ketiga dengan kata ganti mereka, nya, ia, dan dia\n6. Amanat adalah pesan yang disampaikan oleh pengarang kepada pembaca fabel.', 72047765, 19), (166, '1) Tokoh : tokoh utama dan tokoh pembantu\n2) Penokohan : Antagonis dan protagonis\n3) Setting atau latar\n- latar tempat\n- latar waktu\n- sosial\n4) Tema\n5) Alur\n6) Amanat', 87027317, 19), (167, 'Tokoh : tokoh utama dan tokoh pembantu.\nPenokohan : Antagonis dan protagonis.\nSetting atau latar. - latar tempat. - latar waktu. - sosial.\nTema.\nAlur.\nAmanat.', 64850875, 19), (168, 'bagian orientasi, komplikasi, resolusi, dan koda.', 73548494, 19), (169, '1. Tema: kehidupan binatang yang berperilaku menyerupai manusia.\n\n2. Latar:\n-Latar tempat: alam, seperti hutan, sungai,\nkolam, dan sebagainya.\n-Latar waktu: pada suatu hari\n-Latar suasana adalah suasana yang disajikan dalam cerita, seperti mencekam, menyenangkan, dan lain-lain\n\n3. Alur: alur maju (dari awal bergerak maju hingga terjadi akibat dari peristiwa sebelumnya)\n\n4. Cara penceritaan: Menggunakan sudut pandang dia-an atau orang ketiga.\n\n5. Tokoh: hewan jinak dan hewan liar.\n\n6. Watak tokoh: binatang jinak digambarkan memiliki sifat yang baik, sedangkan hewan liar digambarkan memiliki sifat yang buruk.\n\n7. Amanat adalah pesan yang disampaikan penulis secara tidak langsung.', 73071829, 19), (170, '1. Tema, adalah gagasan umum yang mendasari sebuah karya sastra.\n2. Tokoh, adalah para pelaku yang terdapat dalam sebuah fiksi.\n3. Alur atau Plot, adalah cerita yang berisi urutan kejadian yang terjadi.\n4. Latar atau setting yang disebut juga sebagai landasan tumpu, yang berisi pengertian tempat, hubungan waktu, dan lingkungan sosial tempat terjadinya peristiwa-peristiwa yang diceritakan.\n5. Sudut panfang digunakan untuk menentukan arah pandang pengarang terhadap peristiwa-peristiwa di dalam cerita sehingga tercipta suatu kesatuan cerita yang utuh.\n6. Gaya dan Nada dalam cerita fiksi meliputi penggunaan diksi (pilihan kata), imajeri (citraan), dan sintaksis (pilihan pola kalimat). Sedangkan nada berhubungan dengan pilihan gaya untuk mengekspresikan sikap tertentu.', 85682053, 19), (171, '1. Tema: Gagasan utama dari fabel;\n2. Tokoh/Penokohan: binatang-binatang yang berperilaku seperti manusia;\n3. Latar: Penempatan waktu/tempat/suasana dalam fabel;\n4. Alur: Urutan peristiwa dari fabel yang diceritakan;\n5. Amanat: Pesan moral dari fabel.', 78954688, 19), (172, 'Unsur instrinsik dalam teks fabel adalah\n1) Tokoh : tokoh utama dan tokoh pembantu\n2) Penokohan : Antagonis dan protagonis\n3) Setting atau latar\n- latar tempat\n- latar waktu\n- sosial\n4) Tema\n5) Alur\n6) Amanat', 75698817, 19), (173, 'Tema, gagasan utama\nTokoh mwrupakan binatang\nLatar waktu, tempat dan suasana\nAlur', 82816613, 19), (174, 'tema, tokoh, penokohan, alur, latar, sudut pandang, gaya bahasa, dan amanat. Penjelasan dari unsur-unsur intrinsik', 67572071, 19), (175, 'Ada hewan-hewan didalamnya', 63195221, 19), (176, 'Tema,later, alur, cara penceritaan,toko,watak toko atau penokohan dan amanat', 73061294, 19), (177, '?tema\n?Alur\n?latar \n?tokoh\n', 73944621, 19), (178, 'Tema. Tema adalah gagasan umum yang mendasari sebuah karya sastra.\nTokoh. Tokoh adalah para pelaku yang terdapat dalam sebuah fiksi. ...\nAlur atau Plot. Plot atau alur adalah cerita yang berisi urutan kejadian yang terjadi. ...\nLatar. ...\nSudut Pandang. ...\nGaya dan Nada.', 66305405, 19), (179, 'Tokok adalah para pelaku yang terdapat dalam sebuah fiksi', 72884949, 19), (180, 'Fabel adalah macam teks struktur', 67279251, 19), (181, 'unsur intrinsiknya adalah alur cerita, tema, tokoh, sudut pandang, latar, dan amanat', 79985791, 19), (182, 'Di pinggiran sungai ada seekor buaya yang sedang kelaparan, sudah tiga hari Buaya itu belum makan perutnya terasa la sekali mau tidak mau hari ini dia harus makan sebab kalau tidak bisa-bisa ia akan mati kelaparan. Buaya itu segera masuk ke dalam Sungai ia berenang perlahan-lahan menyusuri sungai mencari mangsa.', 88852019, 20), (183, 'Di pinggiran sungai ada seekor buaya yang sedang kelaparan, sudah tiga hari Buaya itu belum makan perutnya terasa la sekali mau tidak mau hari ini dia harus makan sebab kalau tidak bisa-bisa ia akan mati kelaparan. Buaya itu segera masuk ke dalam Sungai ia berenang perlahan-lahan menyusuri sungai mencari mangsa.', 86677116, 20), (184, 'cerita dongeng buaya yang serakah\n\nDi pinggiran sungai ada seekor buaya yang sedang kelaparan, sudah tiga hari Buaya itu belum makan perutnya terasa la sekali mau tidak mau hari ini dia harus makan sebab kalau tidak bisa-bisa ia akan mati kelaparan. Buaya itu segera masuk ke dalam Sungai ia berenang perlahan-lahan menyusuri sungai mencari mangsa.', 78507745, 20), (185, 'Pada suatu ketika hiduplah empat sekawan, yakni gagak, tikus, rusa dan kura-kura yang hidup bersama, bersebelahan rumah. Setiap pagi mereka berangkat bekerja ke tempat masing-masing. Dengan jadwal yang sama, rutin tiap hari mereka lalukan.\nPertama kura-kura dulu yang berangkat awal, lalu disusul oleh rusa dan gagak kemudian tikus yang terakhir berangkat, namun saat pulangnya rusa justru yang pertama sampai rumah, kemudian disusul dengan tikus dan gagak baru kemudian kura-kura yang terakhir.\nHingga pada suatu saat tikus, gagak dan kura-kura sudah sampai rumah, namun rusa belum tiba juga. Mereka pun khawatir, lalu gagak pun berusaha mencari rusa. Firasat mereka ternyata benar, rupanya rusa tengah terjebak di jaring pemburu. Tikus pun segera mengerat jaring itu hingga rusa bisa lari melepaskan diri. Namun malang bagi si lambat kura-kura, karenanya dengan mudah pemburu itu pun menangkapnya dan menaruh kura-kura tersebut di tasnya.\nMelihat hal itu maka rusa pun lantas berpura-pura jatuh dan terluka, hingga pemburu lantas meletakkan tasnya dan berlari menghampiri rusa yang jatuh tadi. Tikus dan gagak pun lantas berhasil membuka tas dan melepaskan kura-kura. Begitu pemburu tadi mendekati rusa tersebut lantas rusa pun berlari sekencang-kencangnya meninggalkan pemburu yang terbengong-bengong.\nHingga akhirnya selamatlah keempat kawanan itu tiba di rumah. Itulah pelajarannya, bahwa jika kompak bekerjasama, maka seberat apapun permasalahan yang dihadapi akan bisa diatasi dan dicarikan solusi penyelesaian masalahnya bersama-sama.', 72047765, 20); INSERT INTO `datatest` (`id_jawaban`, `jawaban`, `nis`, `id_soal`) VALUES (186, 'Kumpulan hewan yang lainnya tak ada yang menjagokan kura-kura, mereka dengan mudah menebak bahwa kelincilah yang akan menjadi juaranya. Hanya burung pipit sahabat kura-kura yang terus menyemangati kura-kura agar tidak mudah menyerah dan terus berusaha.\nHingga saat hari perlombaan lari pun tiba. Sejak dari garis start awal kelinci sudah mulai berlari dengan kencang secepat mungkin, sambil diiringi sorak-sorai penonton, melesat meninggalkan kura-kura yang tertatih-tatih terus merangkak menuju garis finish. Hingga kelinci pun tiba di dekat kebun wortel, ia merasa lapar lalu berhenti sejenak untuk makan, dengan santainya ia makan karena ia tahu kura-kura tak akan pernah bisa mendahuluinya.\nLalu setelah kenyang ia pun tidur-tiduran, angin pun berhembus sepoi-sepoi, hingga akhirnya ia pun tertidur pulas, dan tak disadarinya bahwa kura-kura pun telah dekat dan bahkan bisa mendahuluinya terus merangkak tanpa lelah dan tak berputus asa berusaha menuju ke garis finish.\nKelinci baru terbangun setelah ia mendengar suara riuh rendah bersorak sorai menyambut kemenangan kura-kura yang akhirnya telah tiba di garis finish mendahuluinya. Alangkah kaget dan malunya kelinci. Itulah pelajarannya bahwa kesombongan hanya akan membawa kerugian bagi diri sendiri, dan bagi yang giat dan tak kenal putus asa selalu berusaha akan mendapatkan pencapaian hasilnya juga, dapat mencapai kesuksesan juga.', 87027317, 20), (187, 'si kancil membohongi buaya\n\npada suatu hari kancil ingin menyeberang sungai tapi tidak bisa berenang, kemudian kancil memanggil buaya mengatakan pada buaya bahwa akan ada pesta daging di istana raja sulaiman, kancil berkata bahwa buaya diundang utuk datang ke pesta asal ada satu syarat bahwa dia harus membantu kancil menyeberang sungai untuk mengundang tamu yang lain. buaya pun setuju dengan syarat kancil dan membantu kancil menyeberang sungai. setelah sampai di seberang sungai kancil kemudian langsung lari ke tengah lapang.', 64850875, 20), (188, 'Bosan dengan kelinci yang sombong karena bisa berlari melompat dengan cepat, kura-kura menantangnya untuk berlomba. Kelinci yang terlalu percaya diri pun menerima tantangan tersebut tapi karena kesombongannya kelinci dikalahkan oleh kura-kura dalam lomba lari', 73548494, 20), (189, 'Semut dan Lebah\n\nPada suatu hari hiduplah seekor semut yang mempunyai sifat sombong, suatu ketika ia sedang berjalan-jalan di hutan lalu si semut bertemu dengan sang lebah yang sedang membersihkan sarangnya.\n\nMelihat hal itu si semut berniat untuk menganggunya, si semut kemudian melempar batu-batu kecil ke sarang lebah melihat hal itu sang lebah tidak membalasnya ia hanya tersenyum.\n\nMenjelang hari senja semut masih berjalan-jalan di hutan. Kemudian ia bertemu kembali dengan sang lebah yang sedang mencari makanan, lantas si semut menganggunya lagi, namun kali ini gagal justru senjata ini mengenai si semut hingga jatuh ke dalam lumpur yang dalam, si semut berteriak minta tolong. \"Tolong-tolong.\" Mendengar teriakan sang lebah langsung mengambil dahan kayu.\n\nSemut langsung meraih dahan kayu dan lebah menariknya ke pinggir, setelah kejadian itu si semut merasa menyesal karena telah berbuat sombong, ia pun meminta maaf kepada sang lebah. Lebah pun memaafkannya, dan semenjak saat itu mereka pun akhirnya bersahabat.', 73071829, 20), (190, 'Pada suatu ketika hiduplah empat sekawan, yakni gagak, tikus, rusa dan kura-kura yang hidup bersama. Setiap pagi mereka berangkat bekerja ke tempat masing-masing. Dengan jadwal yang sama, rutin tiap hari mereka lalukan.\nPertama kura-kura dulu yang berangkat awal, lalu disusul oleh rusa dan gagak kemudian tikus yang terakhir berangkat, namun saat pulangnya rusa justru yang pertama sampai rumah, kemudian disusul dengan tikus dan gagak baru kemudian kura-kura yang terakhir.\nHingga pada suatu saat tikus, gagak dan kura-kura sudah sampai rumah, namun rusa belum tiba juga. Mereka pun khawatir, lalu gagak pun berusaha mencari rusa. Firasat mereka ternyata benar, rupanya rusa tengah terjebak di jaring pemburu. Tikus pun segera mengerat jaring itu hingga rusa bisa lari melepaskan diri. Namun malang bagi si lambat kura-kura, karenanya dengan mudah pemburu itu pun menangkapnya dan menaruh kura-kura tersebut di tasnya.\nMelihat hal itu maka rusa pun lantas berpura-pura jatuh dan terluka, hingga pemburu lantas meletakkan tasnya dan berlari menghampiri rusa yang jatuh tadi. Tikus dan gagak pun lantas berhasil membuka tas dan melepaskan kura-kura. Begitu pemburu tadi mendekati rusa tersebut lantas rusa pun berlari sekencang-kencangnya meninggalkan pemburu yang terbengong-bengong.\nHingga akhirnya selamatlah keempat kawanan itu tiba di rumah. Itulah pelajarannya, bahwa jika kompak bekerjasama, maka seberat apapun permasalahan yang dihadapi akan bisa diatasi dan dicarikan solusi penyelesaian masalahnya bersama-sama.', 85682053, 20), (191, 'Pada suatu musim yang sangat kering, dimana saat itu burung-burungpun sangat sulit mendapatkan sedikit air untuk diminum, seekor burung gagak menemukan sebuah kendi yang berisikan sedikit air. Tetapi kendi tersebut merupakan sebuah kendi yang tinggi dengan leher kendi sempit.\n\nBagaimanapun burung gagak tersebut berusaha untuk mencoba meminum air yang berada dalam kendi, dia tetap tidak dapat mencapainya. Burung gagak tersebut hampir merasa putus asa dan merasa akan meninggal karena kehausan. Kemudian tiba-tiba sebuah ide muncul dalam benaknya.\n\nDia lalu mengambil kerikil yang ada di samping kendi, kemudian menjatuhkannya ke dalam kendi satu persatu. Setiap kali burung gagak itu memasukkan kerikil ke dalam kendi, permukaan air dalam kendipun berangsur-angsur naik dan bertambah tinggi hingga akhirnya air tersebut dapat di capai oleh sang burung Gagak.', 78954688, 20), (192, 'Di sebuah kolam ada komunitas besar hewan air yang semuanya suka bermain satu sama lain. Suatu hari, dua nelayan melihat kolam dan hewan-hewan bermain dan berbicara tentang memancing di kolam tetapi mereka pergi karena sudah terlambat.\n\nKatak memberi tahu semua hewan bahwa mereka harus melarikan diri sebelum para nelayan kembali.\n\nNamun, semua hewan yakin akan kemampuan mereka untuk melarikan diri dan memutuskan untuk tetap tinggal. Nelayan datang keesokan harinya dengan jaring yang kuat dan menangkap semua hewan kecuali katak yang telah meninggalkan kolam.', 75698817, 20), (193, 'Kura-kura dan kelinci, yang berlomba lari.\nSi kelinci berlaci begitu cepat sedangkan kuru-kura yang berlari sangat lambat sehingga membuat kelinci sombong dengan tiduran dipohon ketika lomba berlangsung. \n\nNamun ketika kura-kura hampis finis, si kelincipun bangun dan buru-buru lari secepat kilat mengarah ke finis, tetapi sesampai finis yang jadi pemengan adalah kura-kura.', 82816613, 20), (194, 'pembaca diharapkan untuk menyimpulkan pesan yang terkandung dalam cerita tersebut.', 67572071, 20), (195, 'Sikancil anak nakal suka mencuri ketimun ayo lekas dikurung jangan diberi ampun', 63195221, 20), (196, 'Kisah buaya yang serakah\n\nDipinggiran sungai Ada seekor buaya yang sedang kelaparan, sudah tiga hari buaya iTu belum makan perutnya Teresa ia sekali mau tidak mau hari ini dia harus makan sebab kalau tidak bisa-bisa ia Akan mati kelaparan. Buaya iTu segera masuk ke sungai mencari mangsa', 73061294, 20), (197, 'Suatu hari ada seekor kacil sedang duduk di tepi sungai, di dalam sungai tersebut terdapat buaya yang lapar, biaya tersebut melihat seekor kang itu buaya itu mengibaskan ekor nya lalu buaya itu memanggil para kawanan buaya untuk menyantap seekor kancil tersebut', 73944621, 20), (198, 'Unsur berita yang pertama adalah what atau apa. Unsur ini menjelaskan mengenai apa peristiwa yang terjadi yang diberitakan. Peristiwa yang diberitakan pun harus sesuai fakta yang benar-benar terjadi tanpa boleh ditambahkan opini atau pendapat', 66305405, 20), (199, 'Cerita fabel ini menjadi sebuah karya sastra yang isinya cerita pendek dan singkat', 72884949, 20), (200, 'Fabel adalah bentuk yg klo di pegang mengeras', 67279251, 20), (201, 'Pada abad yg tidak di ketahui pasti , ada seorang putri yang cantik jelita dikenal dengan putri mandalika putri mandalika sangat sopan tutur bahasanya juga sangat ramah pada suatu hari putri mandalika dilamar oleh para pangeran dari berbagai negri tidak ada satupun undangan yang di tolaknya akibatnya terjadi persaingan yang sengit diantara mereka jika di biarkan maka akan terjadi malapetaka yang melanda kerajaan tunjung bitu akhirnya putri mandalika bersemedi dan mendengarkan suara gaib yang mengatakan ia harus mengorbankan diriya lalu ia mengundang seluruh pangeran yang melamarnya ketika semua telah berkumpul ia tidak berkata apapun dan langsung menceburkan diri ke laut bersamaan dengan itu beratus ratus *nyale muncul.....\n\nadat ini masih dilakukan warga setempat satu tahun sekali guna untuk mengenang putri mandalika\n', 79985791, 20); -- -------------------------------------------------------- -- -- Struktur dari tabel `jawaban` -- CREATE TABLE `jawaban` ( `id_jawaban` int(10) NOT NULL, `jawaban` text NOT NULL, `nis` int(10) NOT NULL, `id_soal` int(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `jawaban` -- INSERT INTO `jawaban` (`id_jawaban`, `jawaban`, `nis`, `id_soal`) VALUES (1, '5w dan 1h\nwhat (apa)\nwho (siapa)\nwhere (di mana)\nwhen (kapan)\nwhy (mengapa))\nhow (bagaimana)', 76613767, 11), (2, 'what = apa peristiwanya?\nwho = siapa yang mengalami peristiwa tersebut?\nwhere = dimana terjadinya peristiwa tersebut?\nwhy = mengapa peristiwa itu terjadi?\nwhen = kapan terjadinya peristiwa itu?\nhow = bagaimana proses peristiwanya?', 61033524, 11), (3, 'berita yang baik adalah berita yang memiliki enam unsur yang dikenal dengan 5W + 1H.', 67718935, 11), (4, 'Apa, siapa, Dimana, Kapan, mengapa, bagaimana', 77548559, 11), (5, 'apa, siapa, diman, kapan, mengapa bagaimana.', 61195365, 11), (6, 'apa siapa dimana kapan bagaimana', 63539857, 11), (7, 'what, who, where, who, why, how', 45621399, 11), (8, 'apa, siapa, di mana, kapan, mengapa, bagaimana', 64383503, 11), (9, '5w + 1h\nwhat, who, where, when, why, how', 88754925, 11), (10, 'apa, siapa, dimana, kapan, mengapa, bagaimana', 51783523, 11), (11, 'what, who, where, when, why, how', 54430870, 11), (12, 'what (apa), who (siapa), where (dimana), when (kapan), why (mengapa), how (bagaimana)', 47830725, 11), (13, 'Berita yang baik adalah berita yang memiliki enam unsur 5W+1H', 51605505, 11), (14, 'harus memiliki sw + 1h\nwhat (apa), who (siapa), where (dimana), when (kapan), why (mengapa), how (bagaimana)', 44353614, 11), (15, 'Berita yang memiliki enam unsur yang dikenal dengan 5W+1H', 58551074, 11), (16, 'what = apa peristiwanya?\nwho = siapa yang mengalami peristiwa itu?\nwhere = dimana terjadinya peristiwa itu?\nwhen = kapan terjadinya peristiwa?\nwhy = mengapa peristiwa itu terjadi?\nhow= bagaimana proses peristiwanya?', 65321279, 11), (17, '5W+1H\r\nwhat, who, where, when, why, how', 62025125, 11), (18, '<NAME>', 62432332, 11), (19, '<NAME>', 51847648, 11), (20, 'what (apa, who (siapa), where (dimana), when (kapan), why (mengapa), how (bagaimana) adalah pertanyaan yang dijawab dan dijelaskan daam berita', 53700396, 11), (21, 'Berita yang memiliki 6 unsur yang dikenal dengan 5W+1H', 89862474, 11), (22, 'what, who, where, when, why, how', 71621730, 11), (23, 'What : Apa peristiwanya?\nWho : Siapa yang mengalami peristiwa itu?\nWhere : Dimana terjadinya peristiwa itu?\nWhen : Kapan terjadinya peristiwa itu?\nWhy : Mengapa peristiwa itu terjadi?\nHow : Bagaimana proses peristiwa?', 75340538, 11), (24, '5w + 1h\nwhat (apa)\napa saja yang terkandung dalam peristiwa dalam berita tersebut\nwho (siapa)\nsiapa saja yang terlibat dalam peristiwa dalam berita tersebut\nwhen (kapan)\nkapan peristiwa itu terjadi\nwhere (di mana)\ndimana tempat peristiwa itu terjadi\nwhy (kenapa)\nkenapa peristiwa itu dapat terjadi atau latar belakangnya\nhow (bagaimana)\nbagaimana peristiwa itu terjadi atau kronologisnya', 63198148, 11), (25, 'Berita yang baik adalah berita yang memiliki enam unsur yang dikenal dengan 5W + 1H. What (apa), who (siapa), where (di mana), when (kapan), why (mengapa), dan how (bagaimana) adalah pertanyaan yang dijawab dan dijelaskan dalam berita.', 67299029, 11), (26, '5W+1H\nWhat, Who, Where, When, Why dan How', 65278868, 11), (27, 'Unsur-unsur berita disebut juga dengan pokok-pokok informasi yang terangkum dalam enam pertanyaan, yaitu 5W + 1H atau dalam bahasa Indonesia disingkat ADIKSIMBA (Apa, DI mana, Siapa, Mengapa, BAgaimana) yang ditempatkan pada bagian awal pemberitaan.', 48862861, 11), (28, 'What = Apa peristiwanya?\nWho = Siapa yang mengalami peristiwa itu?\nWhere = Di mana terjadinya peristiwa itu?\nWhen = Kapan terjadinya peristiwa itu?\nWhy = Mengapa peristiwa itu terjadi?\nHow = Bagaimana proses peristiwanya?', 69059941, 11), (29, '5w + 1h\n1. what (apa)\napa saja yang terkandung dalam peristiwa dalam berita tersebut\n2.who (siapa)\nsiapa saja yang terlibat dalam peristiwa dalam berita tersebut\n3. when (kapan)\nkapan peristiwa itu terjadi\n4. where (di mana)\ndimana tempat peristiwa itu terjadi\n5. why (kenapa)\nkenapa peristiwa itu dapat terjadi atau latar belakangnya\n6. how (bagaimana)\nbagaimana peristiwa itu terjadi atau kronologisnya', 41588451, 11), (30, 'Apa.\nSiapa, di mana, kapan.\nMengapa, bagaimana.', 68918558, 11), (31, 'berdasarkan fakta dan bukan pendapat atau opini penulis', 76613767, 12), (32, 'Peristiwa yang jarang terjadi, bukan suatu hal umum. \nAktual yakni pemberitaan tersebut masih segar dan baru terjadi bukan kejadian lampau. \nData yang disajikan real, asli, dan tidak direkayasa.', 61033524, 12), (33, 'judul berita mewakili keseluruhan isi berita, berdasarkan fakta dan bukan pendapat atau opini penulis.', 67718935, 12), (34, 'Berupa fakta, Menarik, Jelas', 77548559, 12), (35, 'berupa fakta, menarik, dan jelas', 61195365, 12), (36, 'berupa fakta, menarik, dan jelas', 63539857, 12), (37, 'faktual, aktual, unik, dan menarik', 45621399, 12), (38, 'faktual, kalimat mudah dipahami.', 64383503, 12), (39, 'menggunakan kalimat yang mudah dipahami\nmenarik\njelas', 88754925, 12), (40, 'berupa fakta, menarik, jelas, segera disampaikan', 51783523, 12), (41, 'faktual, aktual, menarik, unik', 54430870, 12), (42, 'Faktual, aktual, unik, menarik', 47830725, 12), (43, 'Faktual, Aktual, Unik, Menarik', 51605505, 12), (44, 'bersifat objektif', 44353614, 12), (45, 'Faktual, aktual, unik atau menarik', 58551074, 12), (46, 'berupa fakta, menggunakan kalimat yang mudah di pahami, menarik, jelas, segera disampaikan, merupakan berita terbaru', 65321279, 12), (47, 'Judul berita mewakili keseluruhan isi berita', 62025125, 12), (48, 'unsur unsur yang mengandung komponen', 62432332, 12), (49, 'unsur unsur yang mengandung komponen', 51847648, 12), (50, 'berupa fakta, menggunakan kalimat yang mudah dipahami, menarik, jelas, segera disampaikan merupakan berita terbaru', 53700396, 12), (51, 'Judul berita memiliki isi berita, berdasarkan fakta dan bukan pendapat atau opini penulis', 89862474, 12), (52, 'teks berita merupakan jenis teks yang berisi data-data yang bersifat faktual, berbahasa singkat dan efektif, dan informasi yang disampaikan bersifat urut', 71621730, 12), (53, 'Data yang disajikan riel, asli, dan tidak rekayasa menggunakan bahasa yang menarik dan dapat dimengerti pembaca', 75340538, 12), (54, 'Teks berita bersifat obyektif. Obyektif maksudnya sesuai keadaan yang terjadi tanpa ada pengaruh pendapat pribadi. \nBerdasarkan fakta dan bukan pendapat atau opini penulis. \nJudul berita mewakili keseluruhan isi berita \nBahasa yang dipakai efektif, mudah dipahami, lengkap, dan memikat pembaca.\nInformasi atas suatu peristiwa disampaikan secara urut atau kronologis. \nData dalam teks fakta disajikan lengkap, sesuai konteks, dan dapat dibuktikan kebenarannya oleh semua orang.', 63198148, 12), (55, 'Ciri-ciri teks berita Berupa fakta Menggunakan kalimat yang mudah di pahami MenarikJelasSegera di sampaikan Merupakan berita terbaru', 67299029, 12), (56, 'mengungkapkan fakta dan bukan opini penulis', 65278868, 12), (57, 'Berupa fakta, Menggunakan kalimat yang mudah di pahami, Menarik, Jelas, Segera di sampaikan, Merupakan berita terbaru', 48862861, 12), (58, 'Berupa fakta, Menggunakan kalimat yang mudah di pahami, Menarik, Jelas, Segera di sampaikan, Merupakan berita terbaru', 69059941, 12), (59, 'Teks berita bersifat obyektif. Obyektif maksudnya sesuai keadaan yang terjadi tanpa ada pengaruh pendapat pribadi. \nBerdasarkan fakta dan bukan pendapat atau opini penulis. \nJudul berita mewakili keseluruhan isi berita \nBahasa yang dipakai efektif, mudah dipahami, lengkap, dan memikat pembaca.\nInformasi atas suatu peristiwa disampaikan secara urut atau kronologis. \nData dalam teks fakta disajikan lengkap, sesuai konteks, dan dapat dibuktikan kebenarannya oleh semua orang.', 41588451, 12), (60, 'Bersifat faktual\nAktual\nKalimat mudah dipahami\nSegera disampaikan', 68918558, 12), (61, 'telah terjadi sebuah kecelakaan tunggal yang cukup hebat kemarin malam pada jalan tol cipali pada tanggal 5 april 2015. satu mobil mewah yang dikendarai oleh anak muda yang bernama Ferdi, dia mengendarai mobil dengan kecepatan yang tinggi yakni 120 km/jam.', 76613767, 13), (62, 'satu unit mobil yang ditunggangi satu keluarga terjun ke sungai sumatra selatan. empat orang tewas akibat kecelakaan tersebut. kecelakaan tersebut diduga berawal saat mobil melintas di jembatan penghubung jalan lintas sumatra desa sukaraja, pedamaran, rabu 30 juni 2021 siang, mobil diduga maju dengan kecepatan tinggi.', 61033524, 13), (63, 'Adek gw jatuh dari sepeda dan dia ter luka', 67718935, 13), (64, 'kecelakaan pesawat yang hilang', 77548559, 13), (65, 'kecelakaan mobil', 61195365, 13), (66, 'kecelakaan pesawat yang hilang', 63539857, 13), (67, 'kecelakaan di jalan jonggol cianjur', 45621399, 13), (68, 'kakak gua terjatuh dari sepeda saat lomba bersepeda', 64383503, 13), (69, 'terjadinya kecelakaan sepeda motor dengan kereta api', 88754925, 13), (70, 'kecelakaan antara mobil truk, dan sepeda motor', 51783523, 13), (71, 'tingkat kecelakaan di indonesia lebih tinggi dari eropa dan amerika', 54430870, 13), (72, 'Kecelakaan di jalur jonggol cianjur', 47830725, 13), (73, 'Kecelakaan di jalur Jonggol Cianjur', 51605505, 13), (74, 'berdasarkan korlantas, kerugian karena kecelakaan di indonesia mencapai rp 200 milyar', 44353614, 13), (75, 'Kecelakaan di jalur jonggol cianjur', 58551074, 13), (76, 'terjadinya kecelakaan di malang', 65321279, 13), (77, 'Telah terjadi kecelakaan lalu lintas yang menewaskan 2 pengendara motor dan 8 orang luka ringan serta 3 orang luka berat. Kecelakaan tersebut terjadi akibat lalu lintas yang mengalami masalah. Kecelakaan tersebut terjadi di jalan tol monas', 62025125, 13), (78, 'Adek gua terjatuh dari sepeda dan dia terluka', 62432332, 13), (79, 'Adik gua terjatuh dari sepeda dan terluka', 51847648, 13), (80, 'telah terjadi kecelakaan pesawat boing 8331 dengan tujuan kalimantan - bali. Pesawat yang kemudian pilot Irawan ini diberitakan telah hilang kontak sejak pukul 15.00 wib, diperkirakan pesawat terjadi di wilayah bromo, pasuruan. Sejak diberitakan, belum ada keterangan lebih lanjut peristiwa naas tersebut', 53700396, 13), (81, 'Tingkat kecelakaan di indonesia lebih tinggi dari eropa dan amerika', 89862474, 13), (82, 'kecelakaan mahasiswa di sidoarjo', 71621730, 13), (83, 'Telah terjadi kecelakaan lalu lintas yang menewaskan 2 pengendara motor dan 8 orang luka ringan serta 3 orang luka berat, kecelakaan tersebut terjadi akibat lampu lalu lintas yang mengalami masalah. kecelakaan terjadi di sekitar jalan pahlawan pada pukul 20.00 WIB', 75340538, 13), (84, 'Telah terjadi sebuah kecelakaan tunggal yang cukup hebat kemarin malam pada jalan Tol Cipali pada tanggal 5 April 2015. Satu mobil mewah yang di kendarai oleh seorang anak muda yang bernama Ferdi, ia mengendarai mobil dengan kecepatan yang tinggi yakni 120 KM/jam.\nMobil yang memiliki nomor polisi B 3763 AH tersebut telah menabrak pembatas jalan karena mengalami rem blong pada mobilnya. Mobil Ferarri dengan warna biru itu untung tidak menimbulkan kecelakaan dengan pengguna jalan yang lain karena pada saat itu Tol Cipali pun terlihat cukup macet pada arah yang sebaliknya.\nUntungnya pada saat kejadian kecelakaan yang terjadi sama sekali tidak mengakibatkan adanya korban jiwa, namun untuk pengemudi mobil Ferarri tersebut mengalami luka berat yang cukup parah dan saat ini tengah di rawat di Rumah sakit terdekat.', 63198148, 13), (85, 'Jakarta - Terjadi kecelakaan antara sepeda motor dengan mini bus di Kalideres, Jakarta Barat. Akibat kejadian itu, pengendara sepeda motor alami luka.\nDilihat dari akun instagram TMC Polda Metro Jaya, Sabtu (3/7/2021), disebutkan kejadian itu terjadi pada pukul 02.31 WIB. Pemotor menabrak mobil di depan Terminal Kalideres.\n\"02:31 #Kecelakaan Pemotor menabrak Minibus B 7913 LC di depan Terbus Kalideres, Jakarta Barat, korban luka-luka Pemotor dievakuasi ke RS Hemina Kalideres dan masih penanganan #Polri,\" tulis TMC Polda Metro.', 67299029, 13), (86, 'Terjadi kecelakaan antara sepeda motor dan mobil, yang mana kecelakaan terjadi karena pengemudi mobil berbelok arah secara tiba-tiba sehingga terjadi tabrakan.', 65278868, 13), (87, 'Telah terjadi sebuah kecelakan hebat kemarin malam di Jalan Tol Cipali pada tanggal 4 Maret 2015, sebuah Mobil Mewah ini dikemudikan oleh seorang anak muda yang bernama Agus, dia mengemudikan2 mobilnya dengan kecepatan diatas 120 KM/Jam. Mobil bernomor polisi B 3641 AH itu menabrak sebuah pembatas jalan karena mengalami rem blong pada mobilnya. Mobil Ferarri berwarna merah itu untungnya tidak membuat kecelakaan hebat karena pada saat itu Tol Cipali terlihat macet dari arah sebaliknya. Untunya dalam kejadian ini tidak terjadi korban jiwa, hanya saja sang pengemudi mengalami luka berat dan kini masih di rawat di Rumah Sakit terdekat.', 48862861, 13), (88, 'Telah terjadi sebuah kecelakaan hebat kemarin malam di Jalan Tol Cipali pada tanggal 4 Maret 2015, sebuah Mobil Mewah ini dikemudikan oleh seorang anak muda yang bernama Agus, ia mengemudikan mobil dengan kecepatan diatas 120 KM/Jam.\nMobil bernomor polisi B 3641 AH itu menabrak sebuah pembatas jalan sebab mengalami rem blong pada mobilnya. Mobil Ferarri berwarna merah itu untungnya tidak membuat kecelakaan hebat karena pada saat itu Tol Cipali terlihat macet dari arah sebaliknya.\nUntungnya dalam kejadian ini tidak ada korban jiwa, hanya saja sang pengemudi mengalami luka berat dan kini masih di rawat di Rumah Sakit terdekat.', 69059941, 13), (89, 'Telah terjadi sebuah kecelakaan tunggal yang cukup hebat kemarin malam pada jalan Tol Cipali pada tanggal 5 April 2015. Satu mobil mewah yang di kendarai oleh seorang anak muda yang bernama Ferdi, ia mengendarai mobil dengan kecepatan yang tinggi yakni 120 KM/jam.\nMobil yang memiliki nomor polisi B 3763 AH tersebut telah menabrak pembatas jalan karena mengalami rem blong pada mobilnya. Mobil Ferarri dengan warna biru itu untung tidak menimbulkan kecelakaan dengan pengguna jalan yang lain karena pada saat itu Tol Cipali pun terlihat cukup macet pada arah yang sebaliknya.\nUntungnya pada saat kejadian kecelakaan yang terjadi sama sekali tidak mengakibatkan adanya korban jiwa, namun untuk pengemudi mobil Ferarri tersebut mengalami luka berat yang cukup parah dan saat ini tengah di rawat di Rumah sakit terdekat.', 41588451, 13), (90, 'Sebuah kejadian tak terduga terjadi komplek perumahan Griya Jaya di Lampungkemarin malam jam 20.14 WIB . Rumah milik keluarga pak Hermana itu terbakar dan2 hangus tak tersisa. Peristiwa itu terjadi lantaran sang pemilik rumah yang menaruh lilinnya di atas lemari kayu miliknya. Untungnya saat kejadian itu sang pemilik rumah yaitu pak Hermana sedang pergi tahlilan di rumah tetangganya, sedangkan istrinya sedang pulang kampung. Dalam musibah itu, pak Hermana mengalami kerugian kurang lebih sekitar RP 765 Juta termasuk beberapa dokumen penting seperti Akta kelahiran, Ijasah dan surat-surat tanah miliknya.', 68918558, 13), (91, 'terjadi sebuah banjir bandang di sekitar area sungai ciliwung, banjir tersebut diduga disebabkan oleh adanya curah hujan yang turun dengan sangat deras dari jam 18.00 WIB sampai pagi pukul 08.00 WIB. sudah banyak keluarga dari 3 desa yang terendam banjir telah mengungsi ke kampung sebelah.', 76613767, 14), (92, 'Sebanyak 30 rumah warga di Desa Sindang Asih, Kabupaten Tangerang, Banten mengalami rusak berat dan ringan akibat diterjang angin puting beliung, pada Kamis 1 Juli 2021.', 61033524, 14), (93, 'Di daerah gw banjir dan banjir nya sangat dalam sampai 1m', 67718935, 14), (94, 'gempa bumi didaerah malang', 77548559, 14), (95, 'gempa bumi', 61195365, 14), (96, 'gempa bumi di daerah malang', 63539857, 14), (97, 'pendahulu', 45621399, 14), (98, 'gunung meletus, tsunami', 64383503, 14), (99, 'terjadinya banjir di pasuruan mencapai 1m', 88754925, 14), (100, 'sebanyak 30 orang. banten mengalami kerusakaan rumah akibat diterjang angin puting beliung', 51783523, 14), (101, 'banjir di banten', 54430870, 14), (102, 'Pendahulu', 47830725, 14), (103, 'Pendahulu', 51605505, 14), (104, 'gunung meletus, tsunami, gempa bumi', 44353614, 14), (105, 'Pendahulu', 58551074, 14), (106, 'terjadinya banjir bandang disekitar area jakarta', 65321279, 14), (107, 'Gunung meletus, tsunami, gempa bumi', 62025125, 14), (108, 'Di daerah guwa banjir dan banjirnya sangat dalam sampai 1M', 62432332, 14), (109, 'Di daerah guwa banjir sangat dalam sampai 1M', 51847648, 14), (110, 'telah terjadi gempa bumi dengan kekuatan 8,4 skala rikter dengan potensi tsunami. Menurut BMKG diperkirakan pusat gempa berada di 100m kedalaman laut dan terletak sejauh 30 km dari tepi pantai gempa tersebut diperkirakan kerusakan diberbagi wiayah', 53700396, 14), (111, 'Sebagai salah satu daerah etalase bencana alam di jawa barat, seluruh kecamatan digarut dituntut waspada terjadinya bencana alam', 89862474, 14), (112, 'pendahulu', 71621730, 14), (113, 'Banjir yang terjadi sejak senin kemarin mengakibatkan hampir seluruh akses menuju kabupaten pacita terendam banjir, dari data sementara ada 4000 warga yang diungsikan di beberapa tempat', 75340538, 14), (114, 'Banjir merendam pemukiman warga dan sejumlah bangunan sekolah di Lebak, Banten, Selasa sore. Para siswa harus menanggalkan alas kaki untuk berangkat ke sekolah.\nGuyuran hujan deras selama 3 hari. membuat aktivitas warga dan para siswa terganggu, Salah satunya di Sekolah Menengah Negeri 1 Rangkasbitung, Lebak, Banten.\nBanjir setinggi 30 hingga 50 cm membuat siswa harus berjalan menerjang genangan menuju sekolah tanpa alas kaki, meski demikian para siswa tetap semangat belajar.\nHingga tadi malam hujan masih mengguyur wilayah Rangkasbitung, L<NAME>, warga berharap sistem saluran air segera diperbaiki', 63198148, 14), (115, 'di Jakarta terjadi banjir karena adanya curah hujan yang sangat deras', 67299029, 14), (116, 'Panik, gempa bumi bergoyang di Malang dan terdapat ratusan orang mengalami luka-luka dan sekitar 10 orang meninggal karena tertimpa bangunan yang roboh.', 65278868, 14), (117, 'Terjadi banjir bandang disekitar sungai ciliwung, banjir tersebut diduga karena hujan yang turun sangat deras dari jam 19.00 WIB hingga pagi jam 09.00 WIB. 2 Desa terendam dan banyak keluarga yang mengungsi di kampung sebelah.\nSekitar 137 kepala keluarga kehilangan tempat tinggalnya karena banjir. Pemerintah segera memberikan bantuan berupa tempat pengungsian air bersih, makanan, minuman, obat-obatan dan pakaian.', 48862861, 14), (118, 'Terjadi banjir bandang di sekitar sungai ciliwung, banjir tersebut diduga karena hujan yang turun sangat deras dari jam 18.00 WIB hingga pagi jam 10.00 WIB. 2 Desa terenda, dan banyak keluarga yang mengungsi di kampung sebelah\nSekitar 150 kepala keluarga kehilangan tempat tinggalnya karena banjir. Pemerintah segera memberikan bantuan berupa tempat pengungsian air bersih, makanan, minuman, obat-obatan dan pakaian.\nSebelumnya juga pernah terjadi banjir di desa ini dua tahun yang lalu, tetapi banjir tahun ini lebih besar di bandingkan dengan tahun kemarin.\nSalah satu penyebabnya juga diduga karena kebiasaan masyarakat sekitar yang membuang sampah sembarangan di sungai ciliwung sehingga terjadi banjir ketika musim hujan datang.', 69059941, 14), (119, 'Banjir merendam pemukiman warga dan sejumlah bangunan sekolah di Lebak, Banten, Selasa sore. Para siswa harus menanggalkan alas kaki untuk berangkat ke sekolah.\nGuyuran hujan deras selama 3 hari. membuat aktivitas warga dan para siswa terganggu, Salah satunya di Sekolah Menengah Negeri 1 Rangkasbitung, Lebak, Banten.\nBanjir setinggi 30 hingga 50 cm membuat siswa harus berjalan menerjang genangan menuju sekolah tanpa alas kaki, meski demikian para siswa tetap semangat belajar.\nHingga tadi malam hujan masih mengguyur wilayah Rangkasbitung, Lebak Banten, warga berharap sistem saluran air segera diperbaiki', 41588451, 14), (120, 'Sebanyak 30 rumah warga di Desa Sindang Asih, Kabupaten Tangerang, Banten mengalami rusak berat dan ringan akibat diterjang angin puting beliung, pada Kamis 1 Juli 2021.', 68918558, 14), (121, 'menyusun pokok-pokok berita menjadi kalimat berita', 76613767, 15), (122, 'Menyimak berita dengan seksama, baik itu mendengarkan atau membaca ulang teks berita.\nMencatat pokok-pokok dari isi berita yang didapatkan. Mulai dari tema atau topik berita, peristiwa apa yang terjadi, orang yang diberitakan, tempat kejadian, waku kejadian, dan proses terjadinya peristiwa yang sedang diberitakan.\nKemudian menyusun pokok-pokok isi berita menjadi bentuk kalimat berita.', 61033524, 15), (123, 'inti permasalahan berita', 67718935, 15), (124, 'menyimak berita dengan seksama', 77548559, 15), (125, 'menyimak berita dengan seksama', 61195365, 15), (126, 'menyimak berita dengan seksama', 63539857, 15), (127, 'televisi', 45621399, 15), (128, 'menyimak berita', 64383503, 15), (129, 'gun<NAME>', 88754925, 15), (130, 'menyimak berita dengan seksama', 51783523, 15), (131, 'inti permsalahan dari berita', 54430870, 15), (132, 'Menyusun pokok pokok isi berita menjadi bentuk kalimat berita', 47830725, 15), (133, 'Inti permasalahan dari berita', 51605505, 15), (134, 'menyimak berita dengan seksama', 44353614, 15), (135, 'Televisi', 58551074, 15), (136, 'menyimak berita dengan seksama\nmencatat pokok-pokok isi berita', 65321279, 15), (137, 'Berita adalah kabar atau informasi berupa fakta terkini dari sebuah peristiwa', 62025125, 15), (138, 'Jelaskan isi teks', 62432332, 15), (139, 'Jelas isi teks', 51847648, 15), (140, 'dengan menarik isi dari berita tersebut', 53700396, 15), (141, 'Megawati terkait penanganan bencana alam di tanah air', 89862474, 15), (142, 'menyimak berita dengan seksama', 71621730, 15), (143, 'menyusun pokok pokok isi berita menjadi bentuk kalimat berita', 75340538, 15), (144, 'Menyimak berita dengan seksama, baik itu mendengarkan atau membaca ulang teks berita.\nMencatat pokok-pokok dari isi berita yang didapatkan. Mulai dari tema atau topik berita, peristiwa apa yang terjadi, orang yang diberitakan, tempat kejadian, waku kejadian, dan proses terjadinya peristiwa yang sedang diberitakan.\nKemudian menyusun pokok-pokok isi berita menjadi bentuk kalimat berita.\nSetelah itu, menulis berdasarkan pokok-pokok pikiran yang telah ditemukan dalam wacana berita ke dalam bentuk sebuah paragraf.', 63198148, 15), (145, 'menyimak berita dengan seksama\nmencatat pokok pokok isi berita', 67299029, 15), (146, 'inti permasalahan dari berita', 65278868, 15), (147, 'Cara menyimpulkan isi berita adalah menyimak berita saksama dan mencatat pokok-pokok berita pada saat mendengarkan berita. Catatlah pokok-pokok berita dengan kalimat pendek agar tidak ketinggalan dalam menyimak berita. Membuat kesimpulan berita. Kesimpulan dibuat dengan merangkaikan pokok-pokok berita yang telah dicatat menjadi beberapa kalimat.', 48862861, 15), (148, 'Membaca, mendengarkan, atau menyimak berita yang disampaikan dengan cermat dan teliti\nMencatat inti/pokok dari berita yang disampaikan\nMengambil kesimpulan dari inti yang dicatat', 69059941, 15), (149, 'menyusun pokok pokok isi berita menjadu bentuk kalimat berita', 41588451, 15), (150, 'mencari pokok pokok cerita atau bacaan yang paling penting dalam sebuah paragraf lalau dapat diringkas,disimpulkan, dan menanggapi isi cerita.', 68918558, 15), (151, 'fabel, legenda, hikayat', 76613767, 16), (152, 'legenda, mitos, fabel, dongeng lucu', 61033524, 16), (153, 'Legenda\nMitos\nFabel\nDongeng lucu', 67718935, 16), (154, 'fabel legenda', 77548559, 16), (155, 'fabel ,legenda', 61195365, 16), (156, 'fabel, legenda', 63539857, 16), (157, 'fabel, legenda, hikayat', 45621399, 16), (158, 'legenda, sage, mitos, fabel', 64383503, 16), (159, 'mitos, fabel, legenda', 88754925, 16), (160, 'fabel, legenda', 51783523, 16), (161, 'sage mitos, fabel', 54430870, 16), (162, 'Fabel, Pararel, Jenaka', 47830725, 16), (163, 'legenda mitos fabel dongeng lucu', 51605505, 16), (164, 'cerita legenda, cerita fabel, cerita plipur lara, cerita jenaka, cerita sage', 44353614, 16), (165, 'Cerita fabel cerita peripu lara', 58551074, 16), (166, 'pembaca diharapkan menyimpulkan pesan yang terkandung dalam cerita tersebut', 65321279, 16), (167, 'menyimak berita dengan seksama, baik itu mendengar atau membaca ulang teks berita', 62025125, 16), (168, '5W+1H yang berisi tentang klarifikasi', 62432332, 16), (169, '5W+1H yang berisi tentang klarifikasi', 51847648, 16), (170, 'fabel, legend', 53700396, 16), (171, 'Mitos legenda dongeng', 89862474, 16), (172, 'cerita legenda/asal-usul, fabel, cerita pelipur lara, cerita jenaka, sage dan epos', 71621730, 16), (173, 'Fabel, Mitos, Legenda, Sage, Epos, Jenaka, Hikayat, Parabel', 75340538, 16), (174, 'Cerita legenda adalah cerita yang menyampaikan tentang asal-usul suatu daerah atau tokoh.\nCerita fabel adalah cerita yang pelaku utamanya adaalah binatang dan bersifat fiksi.\nCerita pelipur lara adalah cerita yang berisi hal-hal indah yang bisa menghibur hati.\nCerita jenaka adalah cerita yang bersifat lucu dan terdapat unsur komedi, tetapi tetap mengandung pesan moral.\nCerita sage adalah cerita yang mengandung nilai sejarah pada suatu daerah.\nCerita epos adalah cerita yang menmenyampaikan kisah-kisah heroik dan kepahlawanan.', 63198148, 16), (175, 'mitos, legenda dongeng', 67299029, 16), (176, 'fabel mitos sage legenda', 65278868, 16), (177, 'Cerita Legenda, Cerita Fabel, Cerita Pelipur Lara, Cerita Jenaka, Cerita Sage, Cerita Epos', 48862861, 16), (178, 'cerita legenda (asal-usul), cerita fabel, cerita pelipur lara, cerita jenaka, cerita sage, cerita epos, dan lainnya.', 69059941, 16), (179, 'Cerita Legenda, Cer<NAME>, Cerita Pelipur Lara, Cerita Jenaka, Cerita Sage, Cerita Epos', 41588451, 16), (180, 'cerita legenda (asal-usul), cerita fabel, cerita pelipur lara, cerita jenaka, cerita sage, cerita epos, dan lainnya.', 68918558, 16), (181, 'disampaikan secara lisan, disampaikan secara turun temurun, tidak diketahui siapa yang membuatnya, dan kaya akan nilai nilai luhur', 76613767, 17), (182, 'cerita rakyat disampaikan secara lisan \ndisampaikan secara turun temurun \ntidak di ketahui siapa pertama kali membuatnya\nkaya akan nilai nilai luhur', 61033524, 17), (183, 'Disampaikan turun-temurun.', 67718935, 17), (184, 'kaya nilai nilai luhur', 77548559, 17), (185, 'kaya nilai nilai luhur', 61195365, 17), (186, 'kaya akan nilai nilai luhur', 63539857, 17), (187, 'disampaikan turun temurun', 45621399, 17), (188, 'bersifat tradisional\nberkembang dari mulut kemulut', 64383503, 17), (189, 'cerita rakyat disampaikan secara lisan', 88754925, 17), (190, 'kaya nilai nilai luhur\nberdifat tradisional', 51783523, 17), (191, 'tidak dikethui siapa pembuatnya\ndisampaikan secara turun temurun', 54430870, 17), (192, 'disampaikan secara turun-temurun\n- tidak diketahui siapa pembuatnya\n- kaya akan nilai nilai luhur', 47830725, 17), (193, 'Disampaikan turun temurun', 51605505, 17), (194, 'cerita rakyat disampaikan secara lisan\n-cerita disampaikan secara turun menurun\n-kaya akan nilai luhur', 44353614, 17), (195, 'Disampaikan turun-temurun', 58551074, 17), (196, 'carita legend, cerita fabel, cerita plipur lara, cerita sage, cerita epos', 65321279, 17), (197, 'Cerita rakyat disampaikan secara lisan, disampaikan secara turun temurun', 62025125, 17), (198, 'Kabar orang', 62432332, 17), (199, 'Kabar orang', 51847648, 17), (200, 'diceritakan turun menurun', 53700396, 17), (201, 'Disampaikan turun temurun', 89862474, 17), (202, 'cerita rakyat disampaikan secara lisan\ncerita disampaikan secara turun menurun\ntidak diketahui siapa pembuatnya\nkaya akan nilai-nilai luhur', 71621730, 17), (203, 'Cerita rakyat disampaikan secara lisan, sceara turun temurun', 75340538, 17), (204, 'Disampaikan secara turun-temurun.\nTidak diketahui siapa yang pertama kali membuatnya (anonim) karena berasal dari mulut ke mulut tanpa ada kaidah penulisan.\nKaya akan nilai-nilai luhur yang ingin disampaikan.\nBersifat tradisional.Memiliki banyak versi dan variasi akibat penyampaiannya yang secara lisan selama bertahun-tahun sehingga besar kemungkinan tercampur dengan budaya baru.\nMempunyai bentuk-bentuk klise dalam susunan atau cara pengungkapkannya.', 63198148, 17), (205, 'Cerita rakyat disampaikan secara lisan\nDisampaikan secara turun-temurun\nTidak diketahiu siapa pertama kali membuatnya\nKaya nilai-nilai luhur\nBersifat tradisional\nMemiliki banyak versi dan variasi\nMempunyai bentuk-bentuk klise dalam susunan atau cara pengungkapannya.', 67299029, 17), (206, 'distrubusi secara lisan, diwariskan secara turun temurun', 65278868, 17), (207, 'Disampaikan turun-temurun.\nTidak diketahui siapa yang pertama kali membuatnya.\nKaya nilai-nilai luhur.\nBersifat tradisional.\nMemiliki banyak versi dan variasi.\nMempunyai bentuk ? bentuk klise dalam susunan atau cara pengungkapkannya.', 48862861, 17), (208, 'Disampaikan turun-temurun\nTidak diketahui siapa yang pertama kali membuatnya\nKaya nilai-nilai luhur\nBersifat tradisional\nMemiliki banyak versi dan variasi\nMempunyai bentuk ? bentuk klise dalam susunan atau cara pengungkapkannya\nBersifat anonim, artinya nama pengarang tidak ada.\nBerkembang dari mulut ke mulut.\nCerita rakyat disampaikan secara lisan.\n', 69059941, 17), (209, 'Disampaikan secara turun-temurun.\nTidak diketahui siapa yang pertama kali membuatnya (anonim) karena berasal dari mulut ke mulut tanpa ada kaidah penulisan.\nKaya akan nilai-nilai luhur yang ingin disampaikan.\nBersifat tradisional.\nMemiliki banyak versi dan variasi akibat penyampaiannya yang secara lisan selama bertahun-tahun sehingga besar kemungkinan tercampur dengan budaya baru.\nMempunyai bentuk-bentuk klise dalam susunan atau cara pengungkapkannya.', 41588451, 17), (210, 'Oleh yang empunya cerita dianggap sebagai suatu kejadian yang sungguh- sungguh pernah terjadi.\nBersifat sekuler (keduniawian), terjadinya pada masa yang belum begitu lampau, dan bertempat di dunia seperti yang kita kenal sekarang. Tokoh utama dalam legenda adalah manusia.\n?Sejarah? kolektif, maksudnya sejarah yang banyak mengalami distorsi karena seringkali dapat jauh berbeda dengan kisah aslinya.\nBersifat migration yakni dapat berpindah-pindah, sehingga dikenal luas di daerah-daerah yang berbeda.\nBersifat siklus, yaitu sekelompok cerita yang berkisar pada suatu tokoh atau kejadian tertentu, misalnya di Jawa legenda-legenda mengenai Panji.', 68918558, 17), (211, 'cindelaras, ande ande lumut, joko delok', 76613767, 18), (212, '1. Jaka Budug dan Putri Kemuning.\n2. Jaka Seger dan Rara Anteng.\n3. Gunung Kawi.\n4. Keong Mas.', 61033524, 18), (213, 'Gunung Kawi\nKeong Mas\nAryo Menak.', 67718935, 18), (214, 'joko tarub, keong mas, timun mas', 77548559, 18), (215, 'joko tarub, keong mas, timun mas.', 61195365, 18), (216, 'joko tarub, keong mas, timun mas', 63539857, 18), (217, 'keong mas, asal usul kota surabaya', 45621399, 18), (218, 'pasuruan, jombang, kediri', 64383503, 18), (219, 'keong mas, aryo menak, gunung kawi', 88754925, 18), (220, 'joko tarub, keong mas, timun mas', 51783523, 18), (221, 'kisah timun mas\nkisah keong mas\nkisah cindelaras', 54430870, 18), (222, 'Gunung kawi, keong mas, ande-ande lumut', 47830725, 18), (223, 'Gunung Kawi Keong Mas Gunung Kawi Keong Mas <NAME>', 51605505, 18), (224, 'keong mas, ande-ande lumut, jaka seger dan roro anteng', 44353614, 18), (225, 'Keong mas, ande-ande lumut, jaka seger lan roro anteng', 58551074, 18), (226, 'gunung kawi, keong mas, asal-usul nama surabaya', 65321279, 18), (227, 'Ande ande lumut, keong mas', 62025125, 18), (228, '<NAME>', 62432332, 18), (229, '<NAME>', 51847648, 18), (230, 'aling dharma, joko tarup, gajamada (mojopahit)', 53700396, 18), (231, 'Jaka seger lan roro anteng, ande ande lumut, keong mas', 89862474, 18), (232, 'gunung kawi, keong mas, aryo perak', 71621730, 18), (233, 'keong mas, asal usul surabaya, legenda timun mas', 75340538, 18), (234, 'jaka seger lan roro anteng\nande ande lumut\nkeong mas', 63198148, 18), (235, 'Legenda asal mula Banyuwangi\nLegenda asal mula Gunung Kelud\nLegenda asal mula Kota Surabaya', 67299029, 18), (236, 'Raden Inu Kertapati\nDamar Wulan Dan Minak Jinggo\nKeong Mas', 65278868, 18), (237, 'jaka seger lan roro anteng, ande ande lumut, keong mas', 48862861, 18), (238, 'Asal-usul Surabaya\nAsal-usul Reog Ponorogo\nAsal usul Ranu Kumbolo', 69059941, 18), (239, 'jaka seger lan roro anteng\nande ande lumut\nkeong mas', 41588451, 18), (240, 'Asal usul Ranu Kumbolo\nRoro anteng dan Joko seger\nAsal usul gunung batok', 68918558, 18), (241, 'bagian orientasi, komplikasi, resolusi, dan koda', 76613767, 19), (242, '1. Tema: kehidupan binatang yang berperilaku menyerupai manusia.\n2. Latar:\n-Latar tempat: alam, seperti hutan, sungai,\nkolam, dan sebagainya.\n-Latar waktu: pada suatu hari\n-Latar suasana adalah suasana yang disajikan dalam cerita, seperti mencekam, menyenangkan, dan lain-lain\n3. Alur: alur maju (dari awal bergerak maju hingga terjadi akibat dari peristiwa sebelumnya)\n4. Cara penceritaan: Menggunakan sudut pandang dia-an atau orang ketiga.\n5. Tokoh: hewan jinak dan hewan liar.\n6. Watak tokoh: binatang jinak digambarkan memiliki sifat yang baik, sedangkan hewan liar digambarkan memiliki sifat yang buruk.\n7. Amanat adalah pesan yang disampaikan penulis secara tidak langsung.', 61033524, 19), (243, 'bagian orientasi, komplikasi, resolusi, dan koda.', 67718935, 19), (244, 'fabel adalah macam teks struktur', 77548559, 19), (245, 'fabel adalah macam teks struktur', 61195365, 19), (246, 'fabel adalah macam tek struktur', 63539857, 19), (247, 'tema, alur, latar, dan tokoh', 45621399, 19), (248, 'tema, alur, tokoh latar', 64383503, 19), (249, 'tema, alur, latar, tokoh', 88754925, 19), (250, 'fabel adalah macam teks struktur', 51783523, 19), (251, 'tema, alur, latar, tokoh', 54430870, 19), (252, 'Tema-alur-latar-tokoh', 47830725, 19), (253, 'Bagian orientasi, komplikasi, resolusi, & koda', 51605505, 19), (254, 'tema, alur, latar, tokoh', 44353614, 19), (255, 'Tokoh adalah para pelaku yang terdapat dalam sebuah fiksi', 58551074, 19), (256, 'tema, tokoh, penokohan, alur, latar, sudut pandang, gaya bahasa, amanat', 65321279, 19), (257, 'Tema adalah gagasan utama yang mendasari sebuah karya', 62025125, 19), (258, 'Fabel adalah macam teks struktur', 62432332, 19), (259, 'Fabel adalah macam teks struktur', 51847648, 19), (260, 'ada hewan-hewan didalamnya', 53700396, 19), (261, 'Tema, latar, alur, cara penceritaan, tokoh, watak tokoh, atau penokohan dan amanat', 89862474, 19), (262, 'tema = gagasan utama dari fabel\ntoko/penokohan = binatang - binatang yang berperilaku seperti manusia\nlatar = penempatan waktu/tempat/suasana dalam fabel\nalur = urutan peristiwa dari fabel yang diceritakan\namanat = pesan moral dari fabel', 71621730, 19), (263, 'Tema, tokoh, alur atau plot, sudung pandang, gaya dan nada', 75340538, 19), (264, 'Tokoh : tokoh utama dan tokoh pembantu\nPenokohan : Antagonis dan protagonis\nSetting atau latar :\nlatar tempat\nlatar waktu\nsosial\nTema\nAlur\nAmanat', 63198148, 19), (265, 'Tema: Gagasan utama dari fabel;\nTokoh/Penokohan: binatang-binatang yang berperilaku seperti manusia;\nLatar: Penempatan waktu/tempat/suasana dalam fabel;\nAlur: Urutan peristiwa dari fabel yang diceritakan;\nAmanat: Pesan moral dari fabel.', 67299029, 19), (266, 'Tema, gagasan utama\nTokoh merupakan binatang\nLatar waktu, tempat dan suasana\nAlur', 65278868, 19), (267, 'Tema: kehidupan binatang yang berperilaku menyerupai manusia.\nLatar tempat: alam, seperti hutan, sungai, kolam, dan sebagainya.\nLatar waktu: pada suatu hari\nLatar suasana adalah suasana yang disajikan dalam cerita, seperti mencekam, menyenangkan, dan lain-lain\nAlur: alur maju (dari awal bergerak maju hingga terjadi akibat dari peristiwa sebelumnya)\nCara penceritaan: Menggunakan sudut pandang dia-an atau orang ketiga.\nTokoh: hewan jinak dan hewan liar.', 48862861, 19), (268, 'Tema atau pokok cerita\nAlur yaitu jalan cerita atau plot yang terdiri dari alur maju, alur mundur, dan campuran (alur maju dan alur mundur).\nLatar atua setting terdiri dari suasana, waktu, tempat\nPenokohan terdiri dari protagonis yang sejalan dengan pembaca, antagonis sebagai tokoh yang berlawanan dengan protagonis, dan tritagonis sebagai tokoh yang tidak memihak manapun atau sebagai tokoh yang berdiri sendiri. Untuk watak dari perilaku tokoh tentang apa yang diceritakan pengarang dan apa yang diceritakan oleh tokoh lain.\nSudut pandang adalah cara pandang seorang pengarang atau pembaca dalam cerita. Sudut pandang dibagi menjadi dua yaitu sudut pandang pertama dengan kata ganti aku, saya, kami, dan kita. Sudut pandang ketiga dengan kata ganti mereka, nya, ia, dan dia\nAmanat adalah pesan yang disampaikan oleh pengarang kepada pembaca fabel.', 69059941, 19), (269, 'Tokoh : tokoh utama dan tokoh pembantu\nPenokohan : Antagonis dan protagonis\nSetting atau latar :\n- latar tempat\n- latar waktu\n- sosial\n-Tema\n-Alur\n-Amanat', 41588451, 19), (270, 'Tokoh : tokoh utama dan tokoh pembantu\nPenokohan : Antagonis dan protagonis\nSetting atau latar :\n- latar tempat\n- latar waktu\n- sosial\nTema\nAlur\nAmanat', 68918558, 19), (271, 'bosan dengan kelinci yang sombong karena bisa berlari dengan cepat, kura - kura menantangnya untuk berlomba. kelinci yang terlalu percaya diripun, menerima tantangan tersebut. tapi kerna kesombongannya kelinci dikalahkan oleh kura- kura dalam lomba lari', 76613767, 20), (272, 'Semut dan Lebah\n\nPada suatu hari hiduplah seekor semut yang mempunyai sifat sombong, suatu ketika ia sedang berjalan-jalan di hutan lalu si semut bertemu dengan sang lebah yang sedang membersihkan sarangnya.\n\nMelihat hal itu si semut berniat untuk menganggunya, si semut kemudian melempar batu-batu kecil ke sarang lebah melihat hal itu sang lebah tidak membalasnya ia hanya tersenyum.\n\nMenjelang hari senja semut masih berjalan-jalan di hutan. Kemudian ia bertemu kembali dengan sang lebah yang sedang mencari makanan, lantas si semut menganggunya lagi, namun kali ini gagal justru senjata ini mengenai si semut hingga jatuh ke dalam lumpur yang dalam, si semut berteriak minta tolong. \"Tolong-tolong.\" Mendengar teriakan sang lebah langsung mengambil dahan kayu.\n\nSemut langsung meraih dahan kayu dan lebah menariknya ke pinggir, setelah kejadian itu si semut merasa menyesal karena telah berbuat sombong, ia pun meminta maaf kepada sang lebah. Lebah pun memaafkannya, dan semenjak saat itu mereka pun akhirnya bersahabat.', 61033524, 20), (273, 'Sikancil anak nakal suka mencuri ketimun ayo lekas dikurung jangan diberi ampun', 67718935, 20), (274, 'si kancil anak nakal suka mencuri ketimun', 77548559, 20), (275, 'sikancil anak nakal suka mencuri ketimun', 61195365, 20), (276, 'si kancil anak nakal suka mencuri ketimun', 63539857, 20), (277, 'kelinci yang sombong', 45621399, 20), (278, 'semut dan lebah', 64383503, 20), (279, 'buaya yang serakah', 88754925, 20), (280, 'sikancil anak nakal suka mencuri ketimun', 51783523, 20), (281, 'semut, dan lebah', 54430870, 20), (282, 'Buaya yang serakah', 47830725, 20), (283, 'Buaya yang serakah', 51605505, 20), (284, 'kisah buaya yang sarakah', 44353614, 20), (285, 'unsur berita yang pertama menjelaskan tentang what (apa), menceritakan peristiwa apa yang terjadi di berita', 58551074, 20), (286, 'pembaca diharapkan untuk menyimpulkan pesan yang terkandung didalam cerita', 65321279, 20), (287, 'Kura kura dan kelinci yang berlomba lari', 62025125, 20), (288, 'Cerita fabel menjadi karya sastra yang isinya cerita pendek dan singkat', 62432332, 20), (289, 'Cerita fabel menjadi karya sastra yang isinya pendek dan singkat', 51847648, 20), (290, 'si kecil anak nakal suka mencuri ketimun ayo lekas dikung jangan diberi ampun', 53700396, 20), (291, 'Buaya yang serakah', 89862474, 20), (292, 'pembacaan diharapakan untuk menyimpulkan pesan yang terkandung dalam cerita tersebut', 71621730, 20), (293, 'Si kancil anak nakal suka mencuri ketimun ayo lekas dikurung jangan diberi ampun', 75340538, 20), (294, 'Di pinggiran sungai ada seekor buaya yang sedang kelaparan, sudah tiga hari Buaya itu belum makan perutnya terasa la sekali mau tidak mau hari ini dia harus makan sebab kalau tidak bisa-bisa ia akan mati kelaparan. Buaya itu segera masuk ke dalam Sungai ia berenang perlahan-lahan menyusuri sungai mencari mangsa', 63198148, 20), (295, 'nelayan membawa jaring yang kuat untuk menangkap semua ikan', 67299029, 20), (296, 'si kancil membohongi buaya\npada suatu hari kancil ingin menyeberang sungai tapi tidak bisa berenang, kemudian kancil memanggil buaya mengatakan pada buaya bahwa akan ada pesta daging di istana raja sulaiman, kancil berkata bahwa buaya diundang untuk datang ke pesta asal ada satu syarat, bahwa dia harus membantu kancil menyeberang sungai untuk mengundang tamu yang lain. buaya pun setuju dengan syarat kancil dan membantu kancil menyeberang sungai. setelah sampai di seberang sungai kancil kemudian langsung lari ke tengah lapang.', 65278868, 20), (297, 'Sikancil anak nakal suka mencuri ketimun ayo lekas dikurung jangan diberi ampun', 48862861, 20), (298, 'Kisah buaya yang serakah\n\nDipinggiran sungai Ada seekor buaya yang sedang kelaparan, sudah tiga hari buaya iTu belum makan perutnya Teresa ia sekali mau tidak mau hari ini dia harus makan sebab kalau tidak bisa-bisa ia Akan mati kelaparan. Buaya iTu segera masuk ke sungai mencari mangsa', 69059941, 20), (299, 'Di pinggiran sungai ada seekor buaya yang sedang kelaparan, sudah tiga hari Buaya itu belum makan perutnya terasa la sekali mau tidak mau hari ini dia harus makan sebab kalau tidak bisa-bisa ia akan mati kelaparan. Buaya itu segera masuk ke dalam Sungai ia berenang perlahan-lahan menyusuri sungai mencari mangsa.', 41588451, 20), (300, 'Cerita fabel ini menjadi sebuah karya sastra yang isinya cerita pendek dan singkat', 68918558, 20); -- -------------------------------------------------------- -- -- Struktur dari tabel `jenissoal` -- CREATE TABLE `jenissoal` ( `id_jenissoal` int(10) NOT NULL, `nama_jenissoal` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `jenissoal` -- INSERT INTO `jenissoal` (`id_jenissoal`, `nama_jenissoal`) VALUES (6, 'Ulangan B. Indonesia (7)'); -- -------------------------------------------------------- -- -- Struktur dari tabel `kelas` -- CREATE TABLE `kelas` ( `id_kelas` int(10) NOT NULL, `nama_kelas` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `kelas` -- INSERT INTO `kelas` (`id_kelas`, `nama_kelas`) VALUES (4, 'Kelas 7'), (5, 'Kelas 8'); -- -------------------------------------------------------- -- -- Struktur dari tabel `siswa` -- CREATE TABLE `siswa` ( `nis` int(10) NOT NULL, `nama_siswa` varchar(100) NOT NULL, `id_kelas` int(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `siswa` -- INSERT INTO `siswa` (`nis`, `nama_siswa`, `id_kelas`) VALUES (41588451, '<NAME>', 5), (44353614, '<NAME>', 5), (45621399, 'MUSYAROFAH', 5), (47830725, '<NAME>', 5), (48862861, '<NAME>', 5), (51605505, '<NAME>', 5), (51783523, '<NAME>', 5), (51847648, '<NAME>', 5), (53700396, '<NAME>', 5), (54430870, '<NAME>', 5), (58551074, '<NAME>', 5), (61033524, '<NAME>', 5), (61195365, '<NAME>', 5), (62025125, '<NAME>', 5), (62432332, '<NAME>', 5), (63195221, '<NAME>', 4), (63198148, '<NAME>', 5), (63539857, '<NAME>', 5), (64383503, '<NAME>', 5), (64850875, '<NAME>', 4), (65278868, '<NAME>', 5), (65321279, '<NAME>', 5), (66305405, '<NAME>', 4), (67279251, '<NAME>', 4), (67299029, '<NAME>', 5), (67572071, '<NAME>', 4), (67718935, '<NAME>', 5), (68918558, '<NAME>', 5), (69059941, '<NAME>', 5), (71621730, '<NAME>', 5), (72047765, '<NAME>', 4), (72884949, '<NAME>', 4), (73061294, '<NAME>', 4), (73071829, '<NAME>', 4), (73548494, 'FITRIA', 4), (73944621, '<NAME>', 4), (75340538, '<NAME>', 5), (75698817, '<NAME>', 4), (76613767, '<NAME>', 5), (77548559, 'SOFIA', 5), (78507745, '<NAME>', 4), (78954688, '<NAME>', 4), (79985791, '<NAME>', 4), (82816613, '<NAME>', 4), (85682053, '<NAME>', 4), (86677116, '<NAME>', 4), (87027317, '<NAME>', 4), (88754925, '<NAME>', 5), (88852019, '<NAME>', 4), (89862474, '<NAME>', 5); -- -------------------------------------------------------- -- -- Struktur dari tabel `soal` -- CREATE TABLE `soal` ( `id_soal` int(10) NOT NULL, `pertanyaan` varchar(300) NOT NULL, `id_jenissoal` int(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `soal` -- INSERT INTO `soal` (`id_soal`, `pertanyaan`, `id_jenissoal`) VALUES (11, 'Sebutkan dan jelaskan unsur-unsur dalam berita!', 6), (12, 'Sebutkan ciri ciri teks berita!', 6), (13, 'Buatlah secara singkat berita dengan tema kecelakaaan!', 6), (14, 'Buatlah sebuah berita yang bertema \"Bencana Alam\"!', 6), (15, 'Bagaimana cara menyimpulkan isi berita?', 6), (16, 'Sebutkan jenis-jenis cerita rakyat!', 6), (17, 'Sebutkan ciri-ciri cerita rakyat!', 6), (18, 'Sebutkan 3 judul cerita rakyat dari Propinsi Jawa Timur!', 6), (19, 'Sebutkan dan jelaskan unsur intrinsik / struktur cerita Fabel!', 6), (20, 'Ceritakanlah secara singkat dari fabel yang pernah kalian baca!', 6); -- -------------------------------------------------------- -- -- Struktur dari tabel `tbcosine` -- CREATE TABLE `tbcosine` ( `id` int(11) UNSIGNED NOT NULL, `idjudul` int(11) DEFAULT NULL, `count` float DEFAULT NULL, `persen` varchar(25) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `tbcosine` -- INSERT INTO `tbcosine` (`id`, `idjudul`, `count`, `persen`) VALUES (1, 1, 0.6641, '66.41%'), (2, 2, 0.1144, '11.44%'), (3, 3, 0, '0%'), (4, 4, 0.368, '36.8%'), (5, 5, 0.368, '36.8%'), (6, 6, 0.368, '36.8%'), (7, 7, 0, '0%'), (8, 8, 1, '100%'), (9, 9, 0, '0%'), (10, 10, 0.368, '36.8%'), (11, 11, 0, '0%'), (12, 12, 0.1144, '11.44%'), (13, 13, 0, '0%'), (14, 14, 0.1144, '11.44%'), (15, 15, 0, '0%'), (16, 16, 0.1144, '11.44%'), (17, 17, 0, '0%'), (18, 18, 0, '0%'), (19, 19, 0, '0%'), (20, 20, 0.1144, '11.44%'), (21, 21, 0, '0%'), (22, 22, 0, '0%'), (23, 23, 0.1144, '11.44%'), (24, 24, 0.6944, '69.44%'), (25, 25, 0.6641, '66.41%'), (26, 26, 0, '0%'), (27, 27, 1, '100%'), (28, 28, 0.6641, '66.41%'), (29, 29, 0.6944, '69.44%'), (30, 30, 1, '100%'); -- -------------------------------------------------------- -- -- Struktur dari tabel `tbdfidf` -- CREATE TABLE `tbdfidf` ( `id` int(11) UNSIGNED NOT NULL, `idtoken` int(11) DEFAULT NULL, `df` int(11) DEFAULT NULL, `n` int(11) DEFAULT NULL, `idf` float DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `tbdfidf` -- INSERT INTO `tbdfidf` (`id`, `idtoken`, `df`, `n`, `idf`) VALUES (1, 1, 9, 31, 0.537119), (2, 2, 19, 31, 0.212608), (3, 3, 17, 31, 0.260913), (4, 4, 17, 31, 0.260913), (5, 5, 17, 31, 0.260913), (6, 6, 16, 31, 0.287242), (7, 7, 17, 31, 0.260913), (8, 8, 17, 31, 0.260913); -- -------------------------------------------------------- -- -- Struktur dari tabel `tbdidfkaliqidf` -- CREATE TABLE `tbdidfkaliqidf` ( `id` int(11) UNSIGNED NOT NULL, `idtoken` int(11) DEFAULT NULL, `count` float DEFAULT NULL, `idjudul` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `tbdidfkaliqidf` -- INSERT INTO `tbdidfkaliqidf` (`id`, `idtoken`, `count`, `idjudul`) VALUES (1, 1, 0.288497, 1), (2, 2, 0.0452022, 1), (3, 3, 0, 1), (4, 4, 0, 1), (5, 5, 0, 1), (6, 6, 0, 1), (7, 7, 0, 1), (8, 8, 0, 1), (9, 1, 0, 2), (10, 2, 0.0452022, 2), (11, 3, 0, 2), (12, 4, 0, 2), (13, 5, 0, 2), (14, 6, 0, 2), (15, 7, 0, 2), (16, 8, 0, 2), (17, 1, 0, 3), (18, 2, 0, 3), (19, 3, 0, 3), (20, 4, 0, 3), (21, 5, 0, 3), (22, 6, 0, 3), (23, 7, 0, 3), (24, 8, 0, 3), (25, 1, 0, 4), (26, 2, 0.0452022, 4), (27, 3, 0, 4), (28, 4, 0, 4), (29, 5, 0, 4), (30, 6, 0, 4), (31, 7, 0, 4), (32, 8, 0, 4), (33, 1, 0, 5), (34, 2, 0.0452022, 5), (35, 3, 0, 5), (36, 4, 0, 5), (37, 5, 0, 5), (38, 6, 0, 5), (39, 7, 0, 5), (40, 8, 0, 5), (41, 1, 0, 6), (42, 2, 0.0452022, 6), (43, 3, 0, 6), (44, 4, 0, 6), (45, 5, 0, 6), (46, 6, 0, 6), (47, 7, 0, 6), (48, 8, 0, 6), (49, 1, 0, 7), (50, 2, 0, 7), (51, 3, 0, 7), (52, 4, 0, 7), (53, 5, 0, 7), (54, 6, 0, 7), (55, 7, 0, 7), (56, 8, 0, 7), (57, 1, 0.288497, 8), (58, 2, 0.0452022, 8), (59, 3, 0, 8), (60, 4, 0, 8), (61, 5, 0, 8), (62, 6, 0, 8), (63, 7, 0, 8), (64, 8, 0, 8), (65, 1, 0, 9), (66, 2, 0, 9), (67, 3, 0, 9), (68, 4, 0, 9), (69, 5, 0, 9), (70, 6, 0, 9), (71, 7, 0, 9), (72, 8, 0, 9), (73, 1, 0, 10), (74, 2, 0.0452022, 10), (75, 3, 0, 10), (76, 4, 0, 10), (77, 5, 0, 10), (78, 6, 0, 10), (79, 7, 0, 10), (80, 8, 0, 10), (81, 1, 0, 11), (82, 2, 0, 11), (83, 3, 0, 11), (84, 4, 0, 11), (85, 5, 0, 11), (86, 6, 0, 11), (87, 7, 0, 11), (88, 8, 0, 11), (89, 1, 0, 12), (90, 2, 0.0452022, 12), (91, 3, 0, 12), (92, 4, 0, 12), (93, 5, 0, 12), (94, 6, 0, 12), (95, 7, 0, 12), (96, 8, 0, 12), (97, 1, 0, 13), (98, 2, 0, 13), (99, 3, 0, 13), (100, 4, 0, 13), (101, 5, 0, 13), (102, 6, 0, 13), (103, 7, 0, 13), (104, 8, 0, 13), (105, 1, 0, 14), (106, 2, 0.0452022, 14), (107, 3, 0, 14), (108, 4, 0, 14), (109, 5, 0, 14), (110, 6, 0, 14), (111, 7, 0, 14), (112, 8, 0, 14), (113, 1, 0, 15), (114, 2, 0, 15), (115, 3, 0, 15), (116, 4, 0, 15), (117, 5, 0, 15), (118, 6, 0, 15), (119, 7, 0, 15), (120, 8, 0, 15), (121, 1, 0, 16), (122, 2, 0.0452022, 16), (123, 3, 0, 16), (124, 4, 0, 16), (125, 5, 0, 16), (126, 6, 0, 16), (127, 7, 0, 16), (128, 8, 0, 16), (129, 1, 0, 17), (130, 2, 0, 17), (131, 3, 0, 17), (132, 4, 0, 17), (133, 5, 0, 17), (134, 6, 0, 17), (135, 7, 0, 17), (136, 8, 0, 17), (137, 1, 0, 18), (138, 2, 0, 18), (139, 3, 0, 18), (140, 4, 0, 18), (141, 5, 0, 18), (142, 6, 0, 18), (143, 7, 0, 18), (144, 8, 0, 18), (145, 1, 0, 19), (146, 2, 0, 19), (147, 3, 0, 19), (148, 4, 0, 19), (149, 5, 0, 19), (150, 6, 0, 19), (151, 7, 0, 19), (152, 8, 0, 19), (153, 1, 0, 20), (154, 2, 0.0452022, 20), (155, 3, 0, 20), (156, 4, 0, 20), (157, 5, 0, 20), (158, 6, 0, 20), (159, 7, 0, 20), (160, 8, 0, 20), (161, 1, 0, 21), (162, 2, 0, 21), (163, 3, 0, 21), (164, 4, 0, 21), (165, 5, 0, 21), (166, 6, 0, 21), (167, 7, 0, 21), (168, 8, 0, 21), (169, 1, 0, 22), (170, 2, 0, 22), (171, 3, 0, 22), (172, 4, 0, 22), (173, 5, 0, 22), (174, 6, 0, 22), (175, 7, 0, 22), (176, 8, 0, 22), (177, 1, 0, 23), (178, 2, 0.0452022, 23), (179, 3, 0, 23), (180, 4, 0, 23), (181, 5, 0, 23), (182, 6, 0, 23), (183, 7, 0, 23), (184, 8, 0, 23), (185, 1, 0.288497, 24), (186, 2, 0.0904043, 24), (187, 3, 0, 24), (188, 4, 0, 24), (189, 5, 0, 24), (190, 6, 0, 24), (191, 7, 0, 24), (192, 8, 0, 24), (193, 1, 0.288497, 25), (194, 2, 0.0452022, 25), (195, 3, 0, 25), (196, 4, 0, 25), (197, 5, 0, 25), (198, 6, 0, 25), (199, 7, 0, 25), (200, 8, 0, 25), (201, 1, 0, 26), (202, 2, 0, 26), (203, 3, 0, 26), (204, 4, 0, 26), (205, 5, 0, 26), (206, 6, 0, 26), (207, 7, 0, 26), (208, 8, 0, 26), (209, 1, 0.288497, 27), (210, 2, 0.0452022, 27), (211, 3, 0, 27), (212, 4, 0, 27), (213, 5, 0, 27), (214, 6, 0, 27), (215, 7, 0, 27), (216, 8, 0, 27), (217, 1, 0.288497, 28), (218, 2, 0.0452022, 28), (219, 3, 0, 28), (220, 4, 0, 28), (221, 5, 0, 28), (222, 6, 0, 28), (223, 7, 0, 28), (224, 8, 0, 28), (225, 1, 0.288497, 29), (226, 2, 0.0904043, 29), (227, 3, 0, 29), (228, 4, 0, 29), (229, 5, 0, 29), (230, 6, 0, 29), (231, 7, 0, 29), (232, 8, 0, 29), (233, 1, 0.288497, 30), (234, 2, 0.0452022, 30), (235, 3, 0, 30), (236, 4, 0, 30), (237, 5, 0, 30), (238, 6, 0, 30), (239, 7, 0, 30), (240, 8, 0, 30); -- -------------------------------------------------------- -- -- Struktur dari tabel `tbdn` -- CREATE TABLE `tbdn` ( `id` int(11) UNSIGNED NOT NULL, `idjudul` int(11) DEFAULT NULL, `idtoken` int(11) DEFAULT NULL, `count` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `tbdn` -- INSERT INTO `tbdn` (`id`, `idjudul`, `idtoken`, `count`) VALUES (1, 1, 1, 1), (2, 1, 2, 1), (3, 1, 3, 1), (4, 1, 4, 1), (5, 1, 5, 1), (6, 1, 6, 1), (7, 1, 7, 1), (8, 1, 8, 1), (9, 2, 1, 0), (10, 2, 2, 1), (11, 2, 3, 1), (12, 2, 4, 1), (13, 2, 5, 1), (14, 2, 6, 1), (15, 2, 7, 1), (16, 2, 8, 1), (17, 3, 1, 0), (18, 3, 2, 0), (19, 3, 3, 0), (20, 3, 4, 0), (21, 3, 5, 0), (22, 3, 6, 0), (23, 3, 7, 0), (24, 3, 8, 0), (25, 4, 1, 0), (26, 4, 2, 1), (27, 4, 3, 0), (28, 4, 4, 0), (29, 4, 5, 0), (30, 4, 6, 0), (31, 4, 7, 0), (32, 4, 8, 0), (33, 5, 1, 0), (34, 5, 2, 1), (35, 5, 3, 0), (36, 5, 4, 0), (37, 5, 5, 0), (38, 5, 6, 0), (39, 5, 7, 0), (40, 5, 8, 0), (41, 6, 1, 0), (42, 6, 2, 1), (43, 6, 3, 0), (44, 6, 4, 0), (45, 6, 5, 0), (46, 6, 6, 0), (47, 6, 7, 0), (48, 6, 8, 0), (49, 7, 1, 0), (50, 7, 2, 0), (51, 7, 3, 1), (52, 7, 4, 2), (53, 7, 5, 1), (54, 7, 6, 0), (55, 7, 7, 1), (56, 7, 8, 1), (57, 8, 1, 1), (58, 8, 2, 1), (59, 8, 3, 0), (60, 8, 4, 0), (61, 8, 5, 0), (62, 8, 6, 0), (63, 8, 7, 0), (64, 8, 8, 0), (65, 9, 1, 0), (66, 9, 2, 0), (67, 9, 3, 1), (68, 9, 4, 1), (69, 9, 5, 1), (70, 9, 6, 1), (71, 9, 7, 1), (72, 9, 8, 1), (73, 10, 1, 0), (74, 10, 2, 1), (75, 10, 3, 0), (76, 10, 4, 0), (77, 10, 5, 0), (78, 10, 6, 0), (79, 10, 7, 0), (80, 10, 8, 0), (81, 11, 1, 0), (82, 11, 2, 0), (83, 11, 3, 1), (84, 11, 4, 1), (85, 11, 5, 1), (86, 11, 6, 1), (87, 11, 7, 1), (88, 11, 8, 1), (89, 12, 1, 0), (90, 12, 2, 1), (91, 12, 3, 1), (92, 12, 4, 1), (93, 12, 5, 1), (94, 12, 6, 1), (95, 12, 7, 1), (96, 12, 8, 1), (97, 13, 1, 0), (98, 13, 2, 0), (99, 13, 3, 0), (100, 13, 4, 0), (101, 13, 5, 0), (102, 13, 6, 0), (103, 13, 7, 0), (104, 13, 8, 0), (105, 14, 1, 0), (106, 14, 2, 1), (107, 14, 3, 1), (108, 14, 4, 1), (109, 14, 5, 1), (110, 14, 6, 1), (111, 14, 7, 1), (112, 14, 8, 1), (113, 15, 1, 0), (114, 15, 2, 0), (115, 15, 3, 0), (116, 15, 4, 0), (117, 15, 5, 0), (118, 15, 6, 0), (119, 15, 7, 0), (120, 15, 8, 0), (121, 16, 1, 0), (122, 16, 2, 1), (123, 16, 3, 1), (124, 16, 4, 1), (125, 16, 5, 1), (126, 16, 6, 1), (127, 16, 7, 1), (128, 16, 8, 1), (129, 17, 1, 0), (130, 17, 2, 0), (131, 17, 3, 1), (132, 17, 4, 1), (133, 17, 5, 1), (134, 17, 6, 1), (135, 17, 7, 1), (136, 17, 8, 1), (137, 18, 1, 0), (138, 18, 2, 0), (139, 18, 3, 0), (140, 18, 4, 0), (141, 18, 5, 0), (142, 18, 6, 0), (143, 18, 7, 0), (144, 18, 8, 0), (145, 19, 1, 0), (146, 19, 2, 0), (147, 19, 3, 0), (148, 19, 4, 0), (149, 19, 5, 0), (150, 19, 6, 0), (151, 19, 7, 0), (152, 19, 8, 0), (153, 20, 1, 0), (154, 20, 2, 1), (155, 20, 3, 1), (156, 20, 4, 1), (157, 20, 5, 1), (158, 20, 6, 1), (159, 20, 7, 1), (160, 20, 8, 1), (161, 21, 1, 0), (162, 21, 2, 0), (163, 21, 3, 0), (164, 21, 4, 0), (165, 21, 5, 0), (166, 21, 6, 0), (167, 21, 7, 0), (168, 21, 8, 0), (169, 22, 1, 0), (170, 22, 2, 0), (171, 22, 3, 1), (172, 22, 4, 1), (173, 22, 5, 1), (174, 22, 6, 1), (175, 22, 7, 1), (176, 22, 8, 1), (177, 23, 1, 0), (178, 23, 2, 1), (179, 23, 3, 1), (180, 23, 4, 1), (181, 23, 5, 1), (182, 23, 6, 1), (183, 23, 7, 1), (184, 23, 8, 1), (185, 24, 1, 1), (186, 24, 2, 2), (187, 24, 3, 1), (188, 24, 4, 1), (189, 24, 5, 1), (190, 24, 6, 1), (191, 24, 7, 1), (192, 24, 8, 1), (193, 25, 1, 1), (194, 25, 2, 1), (195, 25, 3, 1), (196, 25, 4, 1), (197, 25, 5, 1), (198, 25, 6, 1), (199, 25, 7, 1), (200, 25, 8, 1), (201, 26, 1, 0), (202, 26, 2, 0), (203, 26, 3, 1), (204, 26, 4, 1), (205, 26, 5, 1), (206, 26, 6, 1), (207, 26, 7, 1), (208, 26, 8, 1), (209, 27, 1, 1), (210, 27, 2, 1), (211, 27, 3, 0), (212, 27, 4, 0), (213, 27, 5, 0), (214, 27, 6, 0), (215, 27, 7, 0), (216, 27, 8, 0), (217, 28, 1, 1), (218, 28, 2, 1), (219, 28, 3, 1), (220, 28, 4, 1), (221, 28, 5, 1), (222, 28, 6, 1), (223, 28, 7, 1), (224, 28, 8, 1), (225, 29, 1, 1), (226, 29, 2, 2), (227, 29, 3, 1), (228, 29, 4, 1), (229, 29, 5, 1), (230, 29, 6, 1), (231, 29, 7, 1), (232, 29, 8, 1), (233, 30, 1, 1), (234, 30, 2, 1), (235, 30, 3, 0), (236, 30, 4, 0), (237, 30, 5, 0), (238, 30, 6, 0), (239, 30, 7, 0), (240, 30, 8, 0); -- -------------------------------------------------------- -- -- Struktur dari tabel `tbdnidfpangkat` -- CREATE TABLE `tbdnidfpangkat` ( `id` int(11) UNSIGNED NOT NULL, `idtoken` int(11) DEFAULT NULL, `count` float DEFAULT NULL, `idjudul` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `tbdnidfpangkat` -- INSERT INTO `tbdnidfpangkat` (`id`, `idtoken`, `count`, `idjudul`) VALUES (1, 1, 0.288497, 1), (2, 2, 0.0452022, 1), (3, 3, 0.0680756, 1), (4, 4, 0.0680756, 1), (5, 5, 0.0680756, 1), (6, 6, 0.082508, 1), (7, 7, 0.0680756, 1), (8, 8, 0.0680756, 1), (9, 1, 0, 2), (10, 2, 0.0452022, 2), (11, 3, 0.0680756, 2), (12, 4, 0.0680756, 2), (13, 5, 0.0680756, 2), (14, 6, 0.082508, 2), (15, 7, 0.0680756, 2), (16, 8, 0.0680756, 2), (17, 1, 0, 3), (18, 2, 0, 3), (19, 3, 0, 3), (20, 4, 0, 3), (21, 5, 0, 3), (22, 6, 0, 3), (23, 7, 0, 3), (24, 8, 0, 3), (25, 1, 0, 4), (26, 2, 0.0452022, 4), (27, 3, 0, 4), (28, 4, 0, 4), (29, 5, 0, 4), (30, 6, 0, 4), (31, 7, 0, 4), (32, 8, 0, 4), (33, 1, 0, 5), (34, 2, 0.0452022, 5), (35, 3, 0, 5), (36, 4, 0, 5), (37, 5, 0, 5), (38, 6, 0, 5), (39, 7, 0, 5), (40, 8, 0, 5), (41, 1, 0, 6), (42, 2, 0.0452022, 6), (43, 3, 0, 6), (44, 4, 0, 6), (45, 5, 0, 6), (46, 6, 0, 6), (47, 7, 0, 6), (48, 8, 0, 6), (49, 1, 0, 7), (50, 2, 0, 7), (51, 3, 0.0680756, 7), (52, 4, 0.272302, 7), (53, 5, 0.0680756, 7), (54, 6, 0, 7), (55, 7, 0.0680756, 7), (56, 8, 0.0680756, 7), (57, 1, 0.288497, 8), (58, 2, 0.0452022, 8), (59, 3, 0, 8), (60, 4, 0, 8), (61, 5, 0, 8), (62, 6, 0, 8), (63, 7, 0, 8), (64, 8, 0, 8), (65, 1, 0, 9), (66, 2, 0, 9), (67, 3, 0.0680756, 9), (68, 4, 0.0680756, 9), (69, 5, 0.0680756, 9), (70, 6, 0.082508, 9), (71, 7, 0.0680756, 9), (72, 8, 0.0680756, 9), (73, 1, 0, 10), (74, 2, 0.0452022, 10), (75, 3, 0, 10), (76, 4, 0, 10), (77, 5, 0, 10), (78, 6, 0, 10), (79, 7, 0, 10), (80, 8, 0, 10), (81, 1, 0, 11), (82, 2, 0, 11), (83, 3, 0.0680756, 11), (84, 4, 0.0680756, 11), (85, 5, 0.0680756, 11), (86, 6, 0.082508, 11), (87, 7, 0.0680756, 11), (88, 8, 0.0680756, 11), (89, 1, 0, 12), (90, 2, 0.0452022, 12), (91, 3, 0.0680756, 12), (92, 4, 0.0680756, 12), (93, 5, 0.0680756, 12), (94, 6, 0.082508, 12), (95, 7, 0.0680756, 12), (96, 8, 0.0680756, 12), (97, 1, 0, 13), (98, 2, 0, 13), (99, 3, 0, 13), (100, 4, 0, 13), (101, 5, 0, 13), (102, 6, 0, 13), (103, 7, 0, 13), (104, 8, 0, 13), (105, 1, 0, 14), (106, 2, 0.0452022, 14), (107, 3, 0.0680756, 14), (108, 4, 0.0680756, 14), (109, 5, 0.0680756, 14), (110, 6, 0.082508, 14), (111, 7, 0.0680756, 14), (112, 8, 0.0680756, 14), (113, 1, 0, 15), (114, 2, 0, 15), (115, 3, 0, 15), (116, 4, 0, 15), (117, 5, 0, 15), (118, 6, 0, 15), (119, 7, 0, 15), (120, 8, 0, 15), (121, 1, 0, 16), (122, 2, 0.0452022, 16), (123, 3, 0.0680756, 16), (124, 4, 0.0680756, 16), (125, 5, 0.0680756, 16), (126, 6, 0.082508, 16), (127, 7, 0.0680756, 16), (128, 8, 0.0680756, 16), (129, 1, 0, 17), (130, 2, 0, 17), (131, 3, 0.0680756, 17), (132, 4, 0.0680756, 17), (133, 5, 0.0680756, 17), (134, 6, 0.082508, 17), (135, 7, 0.0680756, 17), (136, 8, 0.0680756, 17), (137, 1, 0, 18), (138, 2, 0, 18), (139, 3, 0, 18), (140, 4, 0, 18), (141, 5, 0, 18), (142, 6, 0, 18), (143, 7, 0, 18), (144, 8, 0, 18), (145, 1, 0, 19), (146, 2, 0, 19), (147, 3, 0, 19), (148, 4, 0, 19), (149, 5, 0, 19), (150, 6, 0, 19), (151, 7, 0, 19), (152, 8, 0, 19), (153, 1, 0, 20), (154, 2, 0.0452022, 20), (155, 3, 0.0680756, 20), (156, 4, 0.0680756, 20), (157, 5, 0.0680756, 20), (158, 6, 0.082508, 20), (159, 7, 0.0680756, 20), (160, 8, 0.0680756, 20), (161, 1, 0, 21), (162, 2, 0, 21), (163, 3, 0, 21), (164, 4, 0, 21), (165, 5, 0, 21), (166, 6, 0, 21), (167, 7, 0, 21), (168, 8, 0, 21), (169, 1, 0, 22), (170, 2, 0, 22), (171, 3, 0.0680756, 22), (172, 4, 0.0680756, 22), (173, 5, 0.0680756, 22), (174, 6, 0.082508, 22), (175, 7, 0.0680756, 22), (176, 8, 0.0680756, 22), (177, 1, 0, 23), (178, 2, 0.0452022, 23), (179, 3, 0.0680756, 23), (180, 4, 0.0680756, 23), (181, 5, 0.0680756, 23), (182, 6, 0.082508, 23), (183, 7, 0.0680756, 23), (184, 8, 0.0680756, 23), (185, 1, 0.288497, 24), (186, 2, 0.180809, 24), (187, 3, 0.0680756, 24), (188, 4, 0.0680756, 24), (189, 5, 0.0680756, 24), (190, 6, 0.082508, 24), (191, 7, 0.0680756, 24), (192, 8, 0.0680756, 24), (193, 1, 0.288497, 25), (194, 2, 0.0452022, 25), (195, 3, 0.0680756, 25), (196, 4, 0.0680756, 25), (197, 5, 0.0680756, 25), (198, 6, 0.082508, 25), (199, 7, 0.0680756, 25), (200, 8, 0.0680756, 25), (201, 1, 0, 26), (202, 2, 0, 26), (203, 3, 0.0680756, 26), (204, 4, 0.0680756, 26), (205, 5, 0.0680756, 26), (206, 6, 0.082508, 26), (207, 7, 0.0680756, 26), (208, 8, 0.0680756, 26), (209, 1, 0.288497, 27), (210, 2, 0.0452022, 27), (211, 3, 0, 27), (212, 4, 0, 27), (213, 5, 0, 27), (214, 6, 0, 27), (215, 7, 0, 27), (216, 8, 0, 27), (217, 1, 0.288497, 28), (218, 2, 0.0452022, 28), (219, 3, 0.0680756, 28), (220, 4, 0.0680756, 28), (221, 5, 0.0680756, 28), (222, 6, 0.082508, 28), (223, 7, 0.0680756, 28), (224, 8, 0.0680756, 28), (225, 1, 0.288497, 29), (226, 2, 0.180809, 29), (227, 3, 0.0680756, 29), (228, 4, 0.0680756, 29), (229, 5, 0.0680756, 29), (230, 6, 0.082508, 29), (231, 7, 0.0680756, 29), (232, 8, 0.0680756, 29), (233, 1, 0.288497, 30), (234, 2, 0.0452022, 30), (235, 3, 0, 30), (236, 4, 0, 30), (237, 5, 0, 30), (238, 6, 0, 30), (239, 7, 0, 30), (240, 8, 0, 30); -- -------------------------------------------------------- -- -- Struktur dari tabel `tbq` -- CREATE TABLE `tbq` ( `id` int(11) UNSIGNED NOT NULL, `idtoken` int(11) DEFAULT NULL, `count` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `tbq` -- INSERT INTO `tbq` (`id`, `idtoken`, `count`) VALUES (1, 1, 1), (2, 2, 1); -- -------------------------------------------------------- -- -- Struktur dari tabel `tbqidfpangkat` -- CREATE TABLE `tbqidfpangkat` ( `id` int(11) UNSIGNED NOT NULL, `idtoken` int(11) DEFAULT NULL, `count` float DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `tbqidfpangkat` -- INSERT INTO `tbqidfpangkat` (`id`, `idtoken`, `count`) VALUES (1, 1, 0.288497), (2, 2, 0.0452022); -- -------------------------------------------------------- -- -- Struktur dari tabel `tbtoken` -- CREATE TABLE `tbtoken` ( `id` int(11) NOT NULL, `term` varchar(30) NOT NULL, `count` int(11) NOT NULL, `bobot` float DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `tbtoken` -- INSERT INTO `tbtoken` (`id`, `term`, `count`, `bobot`) VALUES (1, 'mana', 2, NULL), (2, 'bagaimana', 2, NULL), (3, 'what', 1, NULL), (4, 'who', 1, NULL), (5, 'where', 1, NULL), (6, 'when', 1, NULL), (7, 'why', 1, NULL), (8, 'how', 1, NULL); -- -------------------------------------------------------- -- -- Struktur dari tabel `user` -- CREATE TABLE `user` ( `id` int(11) NOT NULL, `username` varchar(15) NOT NULL, `password` varchar(15) NOT NULL, `nama` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data untuk tabel `user` -- INSERT INTO `user` (`id`, `username`, `password`, `nama`) VALUES (1, 'yazid', 'yazid', '<NAME>'), (2, 'admin', 'admin', '<PASSWORD>'); -- -- Indexes for dumped tables -- -- -- Indeks untuk tabel `datatest` -- ALTER TABLE `datatest` ADD PRIMARY KEY (`id_jawaban`); -- -- Indeks untuk tabel `jawaban` -- ALTER TABLE `jawaban` ADD PRIMARY KEY (`id_jawaban`), ADD KEY `id_soal` (`id_soal`); -- -- Indeks untuk tabel `jenissoal` -- ALTER TABLE `jenissoal` ADD PRIMARY KEY (`id_jenissoal`); -- -- Indeks untuk tabel `kelas` -- ALTER TABLE `kelas` ADD PRIMARY KEY (`id_kelas`); -- -- Indeks untuk tabel `siswa` -- ALTER TABLE `siswa` ADD PRIMARY KEY (`nis`), ADD KEY `id_kelas` (`id_kelas`); -- -- Indeks untuk tabel `soal` -- ALTER TABLE `soal` ADD PRIMARY KEY (`id_soal`), ADD KEY `id_jenissoal` (`id_jenissoal`); -- -- Indeks untuk tabel `tbcosine` -- ALTER TABLE `tbcosine` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `tbdfidf` -- ALTER TABLE `tbdfidf` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `tbdidfkaliqidf` -- ALTER TABLE `tbdidfkaliqidf` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `tbdn` -- ALTER TABLE `tbdn` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `tbdnidfpangkat` -- ALTER TABLE `tbdnidfpangkat` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `tbq` -- ALTER TABLE `tbq` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `tbqidfpangkat` -- ALTER TABLE `tbqidfpangkat` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `tbtoken` -- ALTER TABLE `tbtoken` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id`,`username`); -- -- AUTO_INCREMENT untuk tabel yang dibuang -- -- -- AUTO_INCREMENT untuk tabel `datatest` -- ALTER TABLE `datatest` MODIFY `id_jawaban` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=202; -- -- AUTO_INCREMENT untuk tabel `jawaban` -- ALTER TABLE `jawaban` MODIFY `id_jawaban` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=301; -- -- AUTO_INCREMENT untuk tabel `jenissoal` -- ALTER TABLE `jenissoal` MODIFY `id_jenissoal` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT untuk tabel `kelas` -- ALTER TABLE `kelas` MODIFY `id_kelas` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT untuk tabel `siswa` -- ALTER TABLE `siswa` MODIFY `nis` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=89862475; -- -- AUTO_INCREMENT untuk tabel `soal` -- ALTER TABLE `soal` MODIFY `id_soal` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; -- -- AUTO_INCREMENT untuk tabel `tbcosine` -- ALTER TABLE `tbcosine` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; -- -- AUTO_INCREMENT untuk tabel `tbdfidf` -- ALTER TABLE `tbdfidf` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT untuk tabel `tbdidfkaliqidf` -- ALTER TABLE `tbdidfkaliqidf` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=241; -- -- AUTO_INCREMENT untuk tabel `tbdn` -- ALTER TABLE `tbdn` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=241; -- -- AUTO_INCREMENT untuk tabel `tbdnidfpangkat` -- ALTER TABLE `tbdnidfpangkat` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=241; -- -- AUTO_INCREMENT untuk tabel `tbq` -- ALTER TABLE `tbq` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT untuk tabel `tbqidfpangkat` -- ALTER TABLE `tbqidfpangkat` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT untuk tabel `tbtoken` -- ALTER TABLE `tbtoken` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT untuk tabel `user` -- ALTER TABLE `user` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables) -- -- -- Ketidakleluasaan untuk tabel `siswa` -- ALTER TABLE `siswa` ADD CONSTRAINT `siswa_ibfk_1` FOREIGN KEY (`id_kelas`) REFERENCES `kelas` (`id_kelas`); -- -- Ketidakleluasaan untuk tabel `soal` -- ALTER TABLE `soal` ADD CONSTRAINT `soal_ibfk_1` FOREIGN KEY (`id_jenissoal`) REFERENCES `jenissoal` (`id_jenissoal`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<filename>db/migrate/000150_admin_notification_config.sql INSERT INTO `config` (`key`, `value`) VALUES ( 'notification-admin-is-enable', '1' ); INSERT INTO `config` (`key`, `value`) VALUES ( 'notification-admin-is-enable-takeout', '0' );
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <NAME> -- Read date: 22 Oct 2018 -- Description: Reads record(s) from the TD_MATRIX and TD_Release table -- ============================================= CREATE OR ALTER PROCEDURE Data_Matrix_ReadLanguage @RlsCode INT ,@CcnUsername NVARCHAR(256) AS BEGIN SET NOCOUNT ON; DECLARE @GroupUserHasAccess TABLE (GRP_ID INT NOT NULL); INSERT INTO @GroupUserHasAccess EXEC Security_Group_AccessList @CcnUsername SELECT LNG_ISO_CODE LngIsoCode ,LNG_ISO_NAME LngIsoName FROM TD_MATRIX INNER JOIN TD_RELEASE ON RLS_ID = MTR_RLS_ID AND RLS_CODE = @RlsCode AND RLS_DELETE_FLAG = 0 INNER JOIN @GroupUserHasAccess g ON g.GRP_ID = RLS_GRP_ID INNER JOIN TS_LANGUAGE ON LNG_ID = MTR_LNG_ID AND LNG_DELETE_FLAG = 0 WHERE MTR_DELETE_FLAG = 0 END GO
<reponame>Shuttl-Tech/antlr_psql -- file:int8.sql ln:30 expect:true SELECT * FROM INT8_TBL WHERE q2 >= 4567890123456789
-- file:transactions.sql ln:196 expect:true SELECT a.xmin = b.xmin FROM savepoints a, savepoints b WHERE a.a=6 AND b.a=7
<reponame>raphaelchampeimont/aurora-rds-localdisk-benchmark -- Create the table which will receive test data DROP TABLE IF EXISTS benchmark; CREATE TABLE benchmark ( d1 double precision, d2 double precision, d3 double precision, d4 double precision, d5 double precision, s1 text, s2 text, s3 text, s4 text, s5 text ); -- Write benchmark (5 x 2E7 rows = 100 M rows) -- We use constant values so that the CPU is as least used as possible EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) INSERT INTO benchmark SELECT 0.5487519831907406, 0.4872935938111851, 0.49332102249181675, 0.7625924579550725, 0.05153777115574787, '0.9926690628615165', '0.018826968012793932', '0.4878975579926579', '0.5737164736350058', '0.9911040422334372' FROM generate_series(1, 2E7) AS v; EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) INSERT INTO benchmark SELECT 0.5487519831907406, 0.4872935938111851, 0.49332102249181675, 0.7625924579550725, 0.05153777115574787, '0.9926690628615165', '0.018826968012793932', '0.4878975579926579', '0.5737164736350058', '0.9911040422334372' FROM generate_series(1, 2E7) AS v; EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) INSERT INTO benchmark SELECT 0.5487519831907406, 0.4872935938111851, 0.49332102249181675, 0.7625924579550725, 0.05153777115574787, '0.9926690628615165', '0.018826968012793932', '0.4878975579926579', '0.5737164736350058', '0.9911040422334372' FROM generate_series(1, 2E7) AS v; EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) INSERT INTO benchmark SELECT 0.5487519831907406, 0.4872935938111851, 0.49332102249181675, 0.7625924579550725, 0.05153777115574787, '0.9926690628615165', '0.018826968012793932', '0.4878975579926579', '0.5737164736350058', '0.9911040422334372' FROM generate_series(1, 2E7) AS v; EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) INSERT INTO benchmark SELECT 0.5487519831907406, 0.4872935938111851, 0.49332102249181675, 0.7625924579550725, 0.05153777115574787, '0.9926690628615165', '0.018826968012793932', '0.4878975579926579', '0.5737164736350058', '0.9911040422334372' FROM generate_series(1, 2E7) AS v; -- Print table size SELECT pg_size_pretty( pg_relation_size('benchmark')); -- Read benchmark EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) SELECT * FROM benchmark; EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) SELECT * FROM benchmark; EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) SELECT * FROM benchmark; EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) SELECT * FROM benchmark; EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) SELECT * FROM benchmark;
CREATE TABLE IF NOT EXISTS spring(idspring INT NOT NULL, host VARCHAR(25) NULL, port INT NULL, type VARCHAR(25) NULL, PRIMARY KEY(IDSPRING))
ALTER TABLE bacteria ADD COLUMN fk_sub_specie BIGINT; ALTER TABLE bacteria ADD CONSTRAINT fk_bacteria_sub_specie_specie FOREIGN KEY (fk_sub_specie) REFERENCES specie (id);
<reponame>MukulKolpe/almanac.httparchive.org<filename>sql/2019/third-parties/05_09.sql #standardSQL # Top 100 third party requests by request volume SELECT requestUrl, COUNT(0) AS totalRequests, SUM(requestBytes) AS totalBytes, ROUND(COUNT(0) * 100 / MAX(t2.totalRequestCount), 2) AS percentRequestCount FROM ( SELECT url AS requestUrl, respBodySize AS requestBytes FROM `httparchive.almanac.summary_requests` WHERE date = '2019-07-01' ), ( SELECT COUNT(0) AS totalRequestCount FROM `httparchive.almanac.summary_requests` WHERE date = '2019-07-01' ) GROUP BY requestUrl ORDER BY totalRequests DESC LIMIT 100
<reponame>aemlima2019/DS_BDAemlima USE FIT_ALUNOS GO CREATE TABLE CLIENTE_C ( IDCLI INT NOT NULL IDENTITY (1,1) , NOMECLI VARCHAR(100) NOT NULL , TELEFONECLI VARCHAR(20) NOT NULL ,CONSTRAINT PKCLIEN PRIMARY KEY (IDCLI) ); CREATE TABLE PRODUTOS_P ( IDPROD INT NOT NULL IDENTITY (1,1) ,NOMEPROD VARCHAR (60) ,CONSTRAINT PKPROD PRIMARY KEY (IDPROD) ); CREATE TABLE PEDIDO_P ( NUMPED INT NOT NULL ,IDCLI INT NOT NULL ,DATAHORA DATETIME ,CONSTRAINT PKPED PRIMARY KEY (NUMPED) ,CONSTRAINT FKPEDCLI FOREIGN KEY (IDCLI) REFERENCES PRODUTOS_P(IDPROD) ); CREATE TABLE ITEM_PEDIDO ( NUMPED INT NOT NULL ,IDPROD INT NOT NULL ,QUANTIDADE INT NULL ,CONSTRAINT PKITEMPED FOREIGN KEY (NUMPED) REFERENCES PEDIDO_P (NUMPED) , CONSTRAINT PKITEMPROD FOREIGN KEY (IDPROD) REFERENCES PRODUTOS_P (IDPROD) ); CREATE TABLE TELEFONE_T ( IDCLI INT NOT NULL ,NUMERO1 CHAR(20) ,NUMERO2 CHAR(20) ,CONSTRAINT PKTELCLI FOREIGN KEY (IDCLI) REFERENCES CLIENTE_C (IDCLI) );
{{ config( materialized = 'table', unique_key = 'event_guid' ) }} with int_events as ( select event_guid, user_guid, session_guid, page_url, NULLIF(split_part(page_url, '/', 5), '') as product_guid, event_type from {{ ref('stg_events') }} order by user_guid, session_guid, product_guid ) select * from int_events -- How does a user decide to checkout a product -- typically when does a user create an account after viewing certain product -- what product makes a user most likely to create an account
/* Navicat Premium Data Transfer Source Server : 127.0.0.1 Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : yj Target Server Type : MySQL Target Server Version : 50721 File Encoding : 65001 Date: 17/04/2018 17:03:01 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for group -- ---------------------------- DROP TABLE IF EXISTS `group`; CREATE TABLE `group` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `group_name` varchar(25) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '组名', `create_time` int(10) UNSIGNED NOT NULL COMMENT '创建时间', `update_time` int(10) UNSIGNED NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of group -- ---------------------------- INSERT INTO `group` VALUES (1, '一组', 1523424767, 1523424767); INSERT INTO `group` VALUES (3, '二组', 1523425108, 1523425108); INSERT INTO `group` VALUES (4, '三组', 1523431255, 1523431255); -- ---------------------------- -- Table structure for score -- ---------------------------- DROP TABLE IF EXISTS `score`; CREATE TABLE `score` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `group_id` int(10) UNSIGNED NOT NULL, `staff_id` int(10) UNSIGNED NOT NULL COMMENT '对应员工', `value` int(10) UNSIGNED NOT NULL COMMENT '业绩', `create_time` int(10) UNSIGNED NOT NULL COMMENT '创建时间', `update_time` int(10) UNSIGNED NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 48 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Fixed; -- ---------------------------- -- Records of score -- ---------------------------- INSERT INTO `score` VALUES (28, 3, 13, 2369, 1523433210, 1523433210); INSERT INTO `score` VALUES (27, 1, 10, 1820, 1523433019, 1523433037); INSERT INTO `score` VALUES (24, 3, 11, 1523, 1523432767, 1523433267); INSERT INTO `score` VALUES (26, 3, 11, 1529, 1523432914, 1523433268); INSERT INTO `score` VALUES (25, 1, 10, 1200, 1523432787, 1523433039); INSERT INTO `score` VALUES (42, 4, 16, 5223, 1523436940, 1523436940); INSERT INTO `score` VALUES (41, 4, 16, 32, 1523436828, 1523769841); INSERT INTO `score` VALUES (29, 3, 13, 8523, 1523433234, 1523433234); INSERT INTO `score` VALUES (46, 4, 12, 1535, 1523769960, 1523769960); INSERT INTO `score` VALUES (47, 1, 18, 5823, 1523943124, 1523943124); -- ---------------------------- -- Table structure for staff -- ---------------------------- DROP TABLE IF EXISTS `staff`; CREATE TABLE `staff` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `group_id` int(11) NOT NULL COMMENT '分组id', `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '用户名称', `create_time` int(11) NOT NULL COMMENT '创建时间', `update_time` int(10) UNSIGNED NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 27 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of staff -- ---------------------------- INSERT INTO `staff` VALUES (13, 3, '王恒', 1523433210, 1523433210); INSERT INTO `staff` VALUES (11, 3, '哈哈', 1523432845, 1523432845); INSERT INTO `staff` VALUES (12, 4, '哈哈', 1523432977, 1523432977); INSERT INTO `staff` VALUES (10, 1, '呼呼', 1523432767, 1523496060); INSERT INTO `staff` VALUES (16, 4, '小红', 1523436828, 1523436828); INSERT INTO `staff` VALUES (18, 1, '呵呵', 1523943124, 1523943725); -- ---------------------------- -- Table structure for test -- ---------------------------- DROP TABLE IF EXISTS `test`; CREATE TABLE `test` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `group_id` int(10) UNSIGNED NOT NULL COMMENT '组id', `staff_id` int(10) UNSIGNED NOT NULL COMMENT '成员id', `call_num` int(11) UNSIGNED NOT NULL COMMENT '外呼次数', `call_time` int(10) UNSIGNED NOT NULL COMMENT '外呼时长', `h_call` int(11) UNSIGNED NOT NULL COMMENT '已接通', `n_call` int(11) UNSIGNED NOT NULL COMMENT '未接通', `n_intention` int(11) UNSIGNED NOT NULL COMMENT '无意向', `h_intention` int(11) UNSIGNED NOT NULL COMMENT '有意向', `weixin` int(11) UNSIGNED NOT NULL COMMENT '微信通过', `register` int(11) UNSIGNED NOT NULL COMMENT '注册次数', `w_return` int(11) UNSIGNED NOT NULL COMMENT '待回访', `clinch` int(10) UNSIGNED NOT NULL COMMENT '成交', `create_time` int(10) UNSIGNED NOT NULL COMMENT '创建时间', `update_time` int(10) UNSIGNED NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = MyISAM AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; -- ---------------------------- -- Records of test -- ---------------------------- INSERT INTO `test` VALUES (1, 1, 10, 99, 88, 88, 88, 8, 8, 8, 88, 88, 8, 1523778532, 1523857961); INSERT INTO `test` VALUES (2, 4, 12, 8, 8, 888, 8, 8, 88, 8, 88, 8, 8, 1523784722, 1523784722); INSERT INTO `test` VALUES (3, 4, 16, 562, 232, 230, 231, 323, 20, 21, 23, 23, 0, 1523842903, 1523842903); INSERT INTO `test` VALUES (4, 1, 10, 15, 133, 12, 52, 2, 125, 1236, 25, 35, 123, 1523844637, 1523942229); INSERT INTO `test` VALUES (6, 3, 11, 982, 232, 2323, 2323, 212, 21212, 312, 1231, 121, 321, 1523942855, 1523942855); INSERT INTO `test` VALUES (7, 3, 13, 485, 15313, 135151, 5151, 1, 212162, 1515, 1215, 15121, 1212, 1523942975, 1523942975); INSERT INTO `test` VALUES (8, 1, 18, 845, 2, 1, 23, 1212, 21, 3213, 32, 321, 13, 1523943152, 1523943152); INSERT INTO `test` VALUES (9, 1, 19, 999, 56, 523, 232, 212, 231, 21231, 23, 12, 12, 1523948037, 1523948037); SET FOREIGN_KEY_CHECKS = 1;
-- -- Tigase Jabber/XMPP Server -- Copyright (C) 2004-2012 "<NAME>" <<EMAIL>> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by -- the Free Software Foundation, either version 3 of the License. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Affero General Public License for more details. -- -- You should have received a copy of the GNU Affero General Public License -- along with this program. Look for COPYING file in the top folder. -- If not, see http://www.gnu.org/licenses/. -- -- $Rev: $ -- Last modified by $Author: $ -- $Date: $ -- -- Database stored procedures and functions for Tigase schema version 5.1 -- QUERY START: source database/mysql-schema-4-sp.sql; -- QUERY END: -- QUERY START: drop procedure if exists TigUpdatePairs; -- QUERY END: delimiter // -- QUERY START: -- Procedure to efficiently and safely update data in tig_pairs table create procedure TigUpdatePairs(_nid bigint, _uid bigint, _tkey varchar(255) CHARSET utf8, _tval mediumtext CHARSET utf8) begin if exists(SELECT 1 FROM tig_pairs WHERE nid = _nid AND uid = _uid AND pkey = _tkey) then UPDATE tig_pairs SET pval = _tval WHERE nid = _nid AND uid = _uid AND pkey = _tkey; ELSE INSERT INTO tig_pairs (nid, uid, pkey, pval) VALUES (_nid, _uid, _tkey, _tval); END IF; end // -- QUERY END: delimiter ;
create or replace function mapping.get_code_system_id ( _code_system_identifier varchar(500) ) returns integer as $$ declare _code_system_id integer; begin if (trim(coalesce(_code_system_identifier, '')) = '') then _code_system_identifier = 'NO-CODE-SYSTEM'; end if; select code_system_id into _code_system_id from mapping.code_system where code_system_identifier = _code_system_identifier; if (_code_system_id is null) then raise exception 'Could not find code_system_identifier of %', _code_system_identifier; return null; end if; return _code_system_id; end; $$ language plpgsql;
ALTER TABLE action_items ADD COLUMN priority decimal;
alter table repository_statistic add column oosla_created_before datetime; alter table repository_statistic add column oosla_text_unit_count bigint default 0; alter table repository_statistic add column oosla_text_unit_word_count bigint default 0;
-- Deploy oak:seedTable_user to pg BEGIN; INSERT INTO public."user" (username, email, "password", avatar, role_id) VALUES ('aurelia'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '1'::integer), ('marina'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '1'::integer), ('nicolas'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '1'::integer), ('anthony'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '1'::integer), ('charlotte'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '1'::integer), ('cesar'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '1'::integer), ('joseph'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '1'::integer), ('marc'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '2'::integer), ('medhi'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '2'::integer), ('jean'::text, '<EMAIL>'::text, '$2b$10$8PjgbfnY6sfjTGZBllAmS.Sbf9Ayp.vAfXWcdbv36nDuN2K6d.Gb6'::text, '1'::integer, '2'::integer) returning 'Added user N°' || id || ': '|| username; COMMIT;
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Máy chủ: localhost -- Thời gian đã tạo: Th10 27, 2019 lúc 05:14 AM -- Phiên bản máy phục vụ: 10.4.8-MariaDB -- Phiên bản PHP: 7.1.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Cơ sở dữ liệu: `cay-da-la-tien` -- -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `articles` -- CREATE TABLE `articles` ( `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `content` text COLLATE utf8_unicode_ci DEFAULT NULL, `avatar` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cat_articles_id` int(11) DEFAULT NULL, `file` text COLLATE utf8_unicode_ci DEFAULT NULL, `author` int(11) NOT NULL, `status` int(11) NOT NULL, `is_hot_new` int(11) DEFAULT NULL, `views` int(11) DEFAULT NULL, `created_at` int(11) NOT NULL, `updated_at` int(11) DEFAULT NULL, `is_del` int(1) DEFAULT NULL, `tags` text COLLATE utf8_unicode_ci DEFAULT NULL, `id` int(11) NOT NULL, `type` int(11) NOT NULL COMMENT '1- Du lịch , 2- tin tức, 3-đặc sản quê hương' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- -- Đang đổ dữ liệu cho bảng `articles` -- INSERT INTO `articles` (`title`, `slug`, `description`, `content`, `avatar`, `cat_articles_id`, `file`, `author`, `status`, `is_hot_new`, `views`, `created_at`, `updated_at`, `is_del`, `tags`, `id`, `type`) VALUES ('7 lợi ích của bảo hiểm du lịch quốc tế bạn nhất định phải biết', '7-loi-ich-cua-bao-hiem-du-lich-quoc-te-ban-nhat-dinh-phai-biet', '7 lợi ích của bảo hiểm du lịch quốc tế bạn nhất định phải biết', '<p>7 lợi &iacute;ch của bảo hiểm du lịch quốc tế bạn nhất định phải biếtsadsad&nbsp;</p>\r\n', '72226062_2429586057157163_911093224976678912_o1574414439.png', 2, NULL, 1, 2, 1, 1, 1574414439, NULL, 0, 'tags', 2, 3), ('<NAME> - tham vọng mở cửa ngõ mới với thế giới của Bắc Kinhádasd', 'dai-hung-tham-vong-mo-cua-ngo-moi-voi-the-gioi-cua-bac-kinhadasd', 'sadsa', '<p><NAME> - tham vọng mở cửa ng&otilde; mới với thế giới của <NAME>&aacute;dasd &aacute;d</p>\r\n', '72226062_2429586057157163_911093224976678912_o1574414659.png', 2, NULL, 1, 2, 0, 1, 1574414659, NULL, 0, 'tag', 3, 3), (' 7 lợi ích của bảo hiểm du lịch quốc tế bạn nhất định phải biếtádasdas', '7-loi-ich-cua-bao-hiem-du-lich-quoc-te-ban-nhat-dinh-phai-bietadasdas', '7-loi-ich-cua-bao-hiem-du-lich-quoc-te-ban-nhat-dinh-phai-bietadasdasad', '<p>7-loi-ich-cua-bao-hiem-du-lich-quoc-te-ban-nhat-dinh-phai-bietadasdasad&nbsp;</p>\r\n', 'a2_black1574414924.png', 2, NULL, 1, 0, 1, 1, 1574414924, NULL, 0, 'atg', 4, 1), ('sdrfsdf ', 'sdrfsdf', 'sdfsd ', '<p>sdfsdf dsfsdf</p>\r\n', 'a2_black1574415214.png', NULL, NULL, 1, 2, 1, 1, 1574415214, NULL, 0, 'fsdf', 5, 3), ('sdrfsdf ', 'sdrfsdf', 'sdfsd ', '<p>sdfsdf dsfsdf</p>\r\n', 'a2_black1574415270.png', NULL, NULL, 1, 2, 1, 1, 1574415270, NULL, 0, 'fsdf', 6, 3); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `auth_assignment` -- CREATE TABLE `auth_assignment` ( `item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `user_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `created_at` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- -- Đang đổ dữ liệu cho bảng `auth_assignment` -- INSERT INTO `auth_assignment` (`item_name`, `user_id`, `created_at`) VALUES ('Admin', '1', 1567591654); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `auth_item` -- CREATE TABLE `auth_item` ( `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `type` smallint(6) NOT NULL, `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `rule_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `data` blob DEFAULT NULL, `created_at` int(11) DEFAULT NULL, `updated_at` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- -- Đang đổ dữ liệu cho bảng `auth_item` -- INSERT INTO `auth_item` (`name`, `type`, `description`, `rule_name`, `data`, `created_at`, `updated_at`) VALUES ('/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/about-us/*', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/about-us/create', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/about-us/delete', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/about-us/index', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/about-us/update', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/about-us/view', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/*', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/active', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/create', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/del', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/disable', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/duyet-tin', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/index', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/is-delete', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/khong-duyet-tin', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/list-articles-cat', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/update', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/articles/view', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/cat-articles/*', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/cat-articles/create', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/cat-articles/delete', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/cat-articles/index', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/cat-articles/update', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/cat-articles/view', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/debug/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/default/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/default/db-explain', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/default/download-mail', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/default/index', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/default/toolbar', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/default/view', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/user/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/user/reset-identity', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/debug/user/set-identity', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/gii/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/gii/default/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/gii/default/action', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/gii/default/diff', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/gii/default/index', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/gii/default/preview', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/gii/default/view', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/huong-ve-que-huong/*', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/huong-ve-que-huong/index', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/info-profile/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/info-profile/update', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/info-profile/uploadPhoto', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/log-system/*', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/log-system/index', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/rbac/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/rbac/assignment/*', 2, NULL, NULL, NULL, 1567591577, 1567591577), ('/rbac/assignment/assign', 2, NULL, NULL, NULL, 1567591577, 1567591577), ('/rbac/assignment/index', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/assignment/remove', 2, NULL, NULL, NULL, 1567591577, 1567591577), ('/rbac/assignment/view', 2, NULL, NULL, NULL, 1567591577, 1567591577), ('/rbac/permission/*', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/permission/assign', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/permission/create', 2, NULL, NULL, NULL, 1567591577, 1567591577), ('/rbac/permission/delete', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/permission/index', 2, NULL, NULL, NULL, 1567591577, 1567591577), ('/rbac/permission/remove', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/permission/update', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/permission/view', 2, NULL, NULL, NULL, 1567591577, 1567591577), ('/rbac/role/*', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/role/assign', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/role/create', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/role/delete', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/role/index', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/role/remove', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/role/update', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/role/view', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/route/*', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/route/assign', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/route/index', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/route/refresh', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/route/remove', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/rule/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/rbac/rule/create', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/rule/delete', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/rbac/rule/index', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/rbac/rule/update', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/rbac/rule/view', 2, NULL, NULL, NULL, 1567591583, 1567591583), ('/site/*', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/site/error', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/site/index', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/site/login', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/site/logout', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/site/request-password-reset', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/site/resend-verification-email', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/site/reset-password', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/site/signup', 2, NULL, NULL, NULL, 1567591584, 1567591584), ('/site/verify-email', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-hinh/*', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-hinh/create', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-hinh/delete', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-hinh/index', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-hinh/update', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-hinh/view', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-video/*', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-video/create', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-video/delete', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-video/index', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/thu-vien-video/update', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/user/*', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/user/create', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/user/doi-mat-khau', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/user/index', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/user/khoa-tai-khoan', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('/user/reset-password', 2, NULL, NULL, NULL, 1572233118, 1572233118), ('Admin', 2, NULL, NULL, NULL, 1567591633, 1567591633); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `auth_item_child` -- CREATE TABLE `auth_item_child` ( `parent` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `child` varchar(64) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- -- Đang đổ dữ liệu cho bảng `auth_item_child` -- INSERT INTO `auth_item_child` (`parent`, `child`) VALUES ('Admin', '/*'), ('Admin', '/debug/*'), ('Admin', '/debug/default/*'), ('Admin', '/debug/default/db-explain'), ('Admin', '/debug/default/download-mail'), ('Admin', '/debug/default/index'), ('Admin', '/debug/default/toolbar'), ('Admin', '/debug/default/view'), ('Admin', '/debug/user/*'), ('Admin', '/debug/user/reset-identity'), ('Admin', '/debug/user/set-identity'), ('Admin', '/gii/*'), ('Admin', '/gii/default/*'), ('Admin', '/gii/default/action'), ('Admin', '/gii/default/diff'), ('Admin', '/gii/default/index'), ('Admin', '/gii/default/preview'), ('Admin', '/gii/default/view'), ('Admin', '/info-profile/*'), ('Admin', '/info-profile/update'), ('Admin', '/rbac/*'), ('Admin', '/rbac/assignment/*'), ('Admin', '/rbac/assignment/assign'), ('Admin', '/rbac/assignment/index'), ('Admin', '/rbac/assignment/remove'), ('Admin', '/rbac/assignment/view'), ('Admin', '/rbac/permission/*'), ('Admin', '/rbac/permission/assign'), ('Admin', '/rbac/permission/create'), ('Admin', '/rbac/permission/delete'), ('Admin', '/rbac/permission/index'), ('Admin', '/rbac/permission/remove'), ('Admin', '/rbac/permission/update'), ('Admin', '/rbac/permission/view'), ('Admin', '/rbac/role/*'), ('Admin', '/rbac/role/assign'), ('Admin', '/rbac/role/create'), ('Admin', '/rbac/role/delete'), ('Admin', '/rbac/role/index'), ('Admin', '/rbac/role/remove'), ('Admin', '/rbac/role/update'), ('Admin', '/rbac/role/view'), ('Admin', '/rbac/route/*'), ('Admin', '/rbac/route/assign'), ('Admin', '/rbac/route/index'), ('Admin', '/rbac/route/refresh'), ('Admin', '/rbac/route/remove'), ('Admin', '/rbac/rule/*'), ('Admin', '/rbac/rule/create'), ('Admin', '/rbac/rule/delete'), ('Admin', '/rbac/rule/index'), ('Admin', '/rbac/rule/update'), ('Admin', '/rbac/rule/view'), ('Admin', '/site/*'), ('Admin', '/site/error'), ('Admin', '/site/index'), ('Admin', '/site/login'), ('Admin', '/site/logout'), ('Admin', '/site/signup'); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `auth_rule` -- CREATE TABLE `auth_rule` ( `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `data` blob DEFAULT NULL, `created_at` int(11) DEFAULT NULL, `updated_at` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `banner` -- CREATE TABLE `banner` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `img` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `banner` -- INSERT INTO `banner` (`id`, `title`, `img`, `status`) VALUES (1, 'Tiêu đề 1', '1574398038-Makita2.png', 1), (2, 'Tiêu đề 2', '1574398147-banner.jpg', 1); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `cat_articles` -- CREATE TABLE `cat_articles` ( `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `parent_id` int(11) DEFAULT NULL, `level` int(11) DEFAULT NULL, `code` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) NOT NULL, `id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- -- Đang đổ dữ liệu cho bảng `cat_articles` -- INSERT INTO `cat_articles` (`name`, `parent_id`, `level`, `code`, `status`, `id`) VALUES ('TIN TỨC', NULL, NULL, 'tin-tuc', 1, 2); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `huong_ve_que_huong` -- CREATE TABLE `huong_ve_que_huong` ( `id` int(11) NOT NULL, `full_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `cell_phone` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `huong_ve_que_huong` -- INSERT INTO `huong_ve_que_huong` (`id`, `full_name`, `cell_phone`, `address`, `created_at`) VALUES (1, '<NAME>', '0987001396', 'thai thinh, thai binh', 1574394648), (2, '<NAME>', '0987001396', 'Thái bình', 1574395519); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `info_profile` -- CREATE TABLE `info_profile` ( `id` int(11) NOT NULL, `full_name` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `birth_day` int(11) DEFAULT NULL, `cell_phone` int(10) DEFAULT NULL, `city` int(11) DEFAULT NULL, `district` int(11) DEFAULT NULL, `ward` int(11) DEFAULT NULL, `avatar` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `gender` int(11) DEFAULT NULL, `user_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -- -- Đang đổ dữ liệu cho bảng `info_profile` -- INSERT INTO `info_profile` (`id`, `full_name`, `birth_day`, `cell_phone`, `city`, `district`, `ward`, `avatar`, `gender`, `user_id`) VALUES (1, '<NAME>', 0, 987001396, 0, 0, 0, '', 1, 1), (5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 6), (8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 9); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `migration` -- CREATE TABLE `migration` ( `version` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL, `apply_time` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; -- -- Đang đổ dữ liệu cho bảng `migration` -- INSERT INTO `migration` (`version`, `apply_time`) VALUES ('m000000_000000_base', 1567562899), ('m130524_201442_init', 1567562901), ('m140506_102106_rbac_init', 1567585375), ('m170907_052038_rbac_add_index_on_auth_assignment_user_id', 1567585375), ('m180523_151638_rbac_updates_indexes_without_prefix', 1567585376), ('m190124_110200_add_verification_token_column_to_user_table', 1567562901); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `tags` -- CREATE TABLE `tags` ( `id` int(11) NOT NULL, `tag_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `articles_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `tags` -- INSERT INTO `tags` (`id`, `tag_name`, `articles_id`) VALUES (1, 'tags', 2), (2, 'tag', 3), (3, 'atg', 4), (4, 'fsdf', 5), (5, 'fsdf', 6); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `thu_vien_hinh` -- CREATE TABLE `thu_vien_hinh` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` int(11) NOT NULL, `file` text COLLATE utf8_unicode_ci NOT NULL, `sub_avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `img1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `img2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `img3` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `img4` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `img5` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `img6` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `thu_vien_video` -- CREATE TABLE `thu_vien_video` ( `id` int(11) NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Đang đổ dữ liệu cho bảng `thu_vien_video` -- INSERT INTO `thu_vien_video` (`id`, `title`, `link`, `created_at`) VALUES (1, 'Cây đa la tiến', 'https://www.youtube.com/embed/Tw3A6mUChAk', 1572232753), (2, 'Video thăm qua di tích lịch sử cây đa la tiến', 'https://www.youtube.com/embed/GQ4F9k4USfA', 1574390971), (3, 'Video thăm qua di tích lịch sử Cây Đa La Tiến', 'https://www.youtube.com/embed/Tw3A6mUChAk', 1574391003), (4, 'Video thăm qua di tích lịch sử Cây Đa La Tiến', 'https://www.youtube.com/embed/GQ4F9k4USfA', 1574391019); -- -------------------------------------------------------- -- -- Cấu trúc bảng cho bảng `user` -- CREATE TABLE `user` ( `id` int(11) NOT NULL, `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `status` smallint(6) NOT NULL DEFAULT 10, `created_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL, `verification_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- -- Đang đổ dữ liệu cho bảng `user` -- INSERT INTO `user` (`id`, `username`, `auth_key`, `password_hash`, `password_reset_token`, `email`, `status`, `created_at`, `updated_at`, `verification_token`) VALUES (1, 'admin', '<PASSWORD>', '$2y$13$yBHyh9Q3wMNy1I3NZA6MVOuENbawQyvsMrmSZf7YWibEygVbkXODy', NULL, '<EMAIL>', 10, 1567563706, 1572321158, 'Efw9XlaSpN0hRZ-NQIeiYoP0yiW18H3b_1567563706'), (6, 'admin2', 'IFkS3WD2hnuZcv7WUsvJoBdwl-deuHli', '$2y$13$TLpZwhuF5a1em/3QkoQ/GO0c0SkmpHp6yzhytypE7JIaik.Eml726', NULL, '<EMAIL>', 10, 1567580150, 1567580150, 'wDmfMXLOasbDTWZqGzxr9b1uBSWr69iU_1567580150'), (9, 'test2', 'cl1yScLT2w0ACW6s2EOzH0HsLA75KCqY', '$2y$13$TrC1h/I1l6D/QqD9F7ehx.2ZZM9k6AsdheqcCtust/VRM2jMGZjQW', NULL, '<EMAIL>', 10, 1567580747, 1567580747, 'QShnbQGKHzXCm-YaOoDX0p7ywL-Alik2_1567580747'); -- -- Chỉ mục cho các bảng đã đổ -- -- -- Chỉ mục cho bảng `articles` -- ALTER TABLE `articles` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `auth_assignment` -- ALTER TABLE `auth_assignment` ADD PRIMARY KEY (`item_name`,`user_id`) USING BTREE, ADD KEY `idx-auth_assignment-user_id` (`user_id`) USING BTREE; -- -- Chỉ mục cho bảng `auth_item` -- ALTER TABLE `auth_item` ADD PRIMARY KEY (`name`) USING BTREE, ADD KEY `rule_name` (`rule_name`) USING BTREE, ADD KEY `idx-auth_item-type` (`type`) USING BTREE; -- -- Chỉ mục cho bảng `auth_item_child` -- ALTER TABLE `auth_item_child` ADD PRIMARY KEY (`parent`,`child`) USING BTREE, ADD KEY `child` (`child`) USING BTREE; -- -- Chỉ mục cho bảng `auth_rule` -- ALTER TABLE `auth_rule` ADD PRIMARY KEY (`name`) USING BTREE; -- -- Chỉ mục cho bảng `banner` -- ALTER TABLE `banner` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `cat_articles` -- ALTER TABLE `cat_articles` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `huong_ve_que_huong` -- ALTER TABLE `huong_ve_que_huong` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `info_profile` -- ALTER TABLE `info_profile` ADD PRIMARY KEY (`id`) USING BTREE; -- -- Chỉ mục cho bảng `migration` -- ALTER TABLE `migration` ADD PRIMARY KEY (`version`) USING BTREE; -- -- Chỉ mục cho bảng `tags` -- ALTER TABLE `tags` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `thu_vien_hinh` -- ALTER TABLE `thu_vien_hinh` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `thu_vien_video` -- ALTER TABLE `thu_vien_video` ADD PRIMARY KEY (`id`); -- -- Chỉ mục cho bảng `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id`) USING BTREE, ADD UNIQUE KEY `username` (`username`) USING BTREE, ADD UNIQUE KEY `email` (`email`) USING BTREE, ADD UNIQUE KEY `password_reset_token` (`<PASSWORD>`) USING BTREE; -- -- AUTO_INCREMENT cho các bảng đã đổ -- -- -- AUTO_INCREMENT cho bảng `articles` -- ALTER TABLE `articles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT cho bảng `banner` -- ALTER TABLE `banner` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT cho bảng `cat_articles` -- ALTER TABLE `cat_articles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT cho bảng `huong_ve_que_huong` -- ALTER TABLE `huong_ve_que_huong` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT cho bảng `info_profile` -- ALTER TABLE `info_profile` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT cho bảng `tags` -- ALTER TABLE `tags` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT cho bảng `thu_vien_hinh` -- ALTER TABLE `thu_vien_hinh` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT cho bảng `thu_vien_video` -- ALTER TABLE `thu_vien_video` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT cho bảng `user` -- ALTER TABLE `user` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- Các ràng buộc cho các bảng đã đổ -- -- -- Các ràng buộc cho bảng `auth_assignment` -- ALTER TABLE `auth_assignment` ADD CONSTRAINT `auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Các ràng buộc cho bảng `auth_item` -- ALTER TABLE `auth_item` ADD CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE; -- -- Các ràng buộc cho bảng `auth_item_child` -- ALTER TABLE `auth_item_child` ADD CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
create table `roles` ( `id` INT unsigned not null AUTO_INCREMENT, `name` VARCHAR(20) not null, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; create table `adventurers` ( `id` INT unsigned NOT NULL AUTO_INCREMENT, `name` VARCHAR(20) NOT NULL, `gender` VARCHAR(5) NOT NULL, `role_id` INT unsigned NOT NULL, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), constraint `fk_role` foreign key (`role_id`) references `roles` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; insert into `roles` (`name`) values ('剣士'), ('戦士'), ('魔法使い'), ('僧侶'); insert into `adventurers` (`name`, `gender`, `role_id`) values ('タロウ', 'M', 1), ('アリサ', 'F', 2), ('スギタ', 'F', 3), ('アオイ', 'F', 4);
<filename>src/modules/database/prisma/migrations/20210928022854_initial/migration.sql -- CreateTable CREATE TABLE "User" ( "id" TEXT NOT NULL, "name" VARCHAR NOT NULL, "authId" INTEGER NOT NULL, "email" VARCHAR NOT NULL, "enabled" BOOLEAN NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "deletedAt" TIMESTAMP(6), CONSTRAINT "User_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Address" ( "id" TEXT NOT NULL, "zipCode" VARCHAR NOT NULL, "street" VARCHAR NOT NULL, "city" VARCHAR NOT NULL, "state" VARCHAR NOT NULL, "country" VARCHAR NOT NULL, "number" VARCHAR, "complement" VARCHAR, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "userId" TEXT, CONSTRAINT "Address_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Category" ( "id" TEXT NOT NULL, "name" VARCHAR NOT NULL, "description" VARCHAR NOT NULL, "enabled" BOOLEAN NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "Category_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Product" ( "id" TEXT NOT NULL, "name" VARCHAR NOT NULL, "description" VARCHAR NOT NULL, "enabled" BOOLEAN NOT NULL, "price" DECIMAL(10,2) NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "Product_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Cart" ( "id" TEXT NOT NULL, "userId" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "Cart_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "CartItem" ( "id" TEXT NOT NULL, "cartId" TEXT, "productId" TEXT NOT NULL, "quantity" INTEGER NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "CartItem_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Order" ( "id" TEXT NOT NULL, "userId" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "deletedAt" TIMESTAMP(6), CONSTRAINT "Order_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "OrderItem" ( "id" TEXT NOT NULL, "cartId" TEXT, "productId" TEXT NOT NULL, "quantity" INTEGER NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "OrderItem_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Discount" ( "id" TEXT NOT NULL, "name" VARCHAR NOT NULL, "description" VARCHAR NOT NULL, "percentage" DECIMAL(3,2) NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "Discount_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "_CategoryToProduct" ( "A" TEXT NOT NULL, "B" TEXT NOT NULL ); -- CreateTable CREATE TABLE "_DiscountToProduct" ( "A" TEXT NOT NULL, "B" TEXT NOT NULL ); -- CreateIndex CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); -- CreateIndex CREATE UNIQUE INDEX "_CategoryToProduct_AB_unique" ON "_CategoryToProduct"("A", "B"); -- CreateIndex CREATE INDEX "_CategoryToProduct_B_index" ON "_CategoryToProduct"("B"); -- CreateIndex CREATE UNIQUE INDEX "_DiscountToProduct_AB_unique" ON "_DiscountToProduct"("A", "B"); -- CreateIndex CREATE INDEX "_DiscountToProduct_B_index" ON "_DiscountToProduct"("B"); -- AddForeignKey ALTER TABLE "Address" ADD CONSTRAINT "Address_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "Cart" ADD CONSTRAINT "Cart_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "CartItem" ADD CONSTRAINT "CartItem_cartId_fkey" FOREIGN KEY ("cartId") REFERENCES "Cart"("id") ON DELETE SET NULL ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "CartItem" ADD CONSTRAINT "CartItem_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE RESTRICT ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "Order" ADD CONSTRAINT "Order_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "OrderItem" ADD CONSTRAINT "OrderItem_cartId_fkey" FOREIGN KEY ("cartId") REFERENCES "Order"("id") ON DELETE SET NULL ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "OrderItem" ADD CONSTRAINT "OrderItem_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE RESTRICT ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "_CategoryToProduct" ADD FOREIGN KEY ("A") REFERENCES "Category"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "_CategoryToProduct" ADD FOREIGN KEY ("B") REFERENCES "Product"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "_DiscountToProduct" ADD FOREIGN KEY ("A") REFERENCES "Discount"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "_DiscountToProduct" ADD FOREIGN KEY ("B") REFERENCES "Product"("id") ON DELETE CASCADE ON UPDATE CASCADE;
<filename>ji-database/src/test/resources/querybuilder/derby/createView.sql CREATE TABLE table1 ( id INT, name VARCHAR(50) ); CREATE TABLE table2 ( id INT ); INSERT INTO table1 VALUES (1, 'name_1'); INSERT INTO table1 VALUES (2, 'name_2'); INSERT INTO table1 VALUES (3, 'name_3'); INSERT INTO table1 VALUES (4, 'name_4'); INSERT INTO table1 VALUES (5, 'name_5'); INSERT INTO table1 VALUES (6, 'name_6'); INSERT INTO table2 VALUES (1); INSERT INTO table2 VALUES (2); INSERT INTO table2 VALUES (3); INSERT INTO table2 VALUES (4); INSERT INTO table2 VALUES (5); INSERT INTO table2 VALUES (6); INSERT INTO table2 VALUES (7); INSERT INTO table2 VALUES (8); INSERT INTO table2 VALUES (9);
DROP TABLE IF EXISTS students; CREATE TABLE students ( id INTEGER PRIMARY KEY AUTOINCREMENT, roll_No INTEGER NOT NULL, name VARCHAR(100) NOT NULL, math_Marks INTEGER NOT NULL, physics_Marks INTEGER NOT NULL, chemistry_Marks INTEGER NOT NULL, total_Marks INTEGER NOT NULL, percentage INTEGER NOT NULL );
SELECT name, id FROM rights WHERE name = :rightName
<filename>frontend-api-develop/internal/platform/db/migrations/20200527041012_create_overtime_weights_table.up.sql<gh_stars>0 create table if not exists overtime_weights( id serial primary key not null, created_at timestamp not null, updated_at timestamp not null, deleted_at timestamp, organization_id integer not null, normal_day_weight real, weekend_weight real, holiday_weight real ); alter table overtime_weights add constraint ot_weight_organization_id foreign key (organization_id) references organizations (id); comment on column overtime_weights.id is 'overtime_weights id'; comment on column overtime_weights.created_at is 'Save timestamp when create'; comment on column overtime_weights.updated_at is 'Save timestamp when update'; comment on column overtime_weights.deleted_at is 'Timestamp delete logic this record. When delete save current time'; comment on column overtime_weights.organization_id is 'organization id'; comment on column overtime_weights.normal_day_weight is 'Weight of normal day'; comment on column overtime_weights.weekend_weight is 'Weight of weekend'; comment on column overtime_weights.holiday_weight is 'Weight of holiday';
with base_data as ( select * from data d join metadata m on d.meta_id=m.id where variable_id=1 ), mean_temperature as ( select base_data.id, avg(value) as t_avg from base_data group by base_data.id ), day_temperature as ( select base_data.id, avg(value) as t_day from base_data where date_part('hour', tstamp) >= 6 and date_part('hour', tstamp) < 18 group by base_data.id ), night_temperature as ( select id, avg(value) as t_night from base_data group by base_data.id ), var as ( select t.id, t_var from ( select base_data.id, date_trunc('day', tstamp) as day, stddev_samp(value) as t_var from base_data group by base_data.id, date_trunc('day', tstamp) ) t ), amount as ( select id, count(*) as "N" from base_data group by id ) select m.id, device_id, avg(mean_temperature.t_avg) as tavg, avg(day_temperature.t_day) as tavg_day, avg(night_temperature.t_night) as tavg_night, avg(var.t_var) as t_var, min(amount."N") as N, location from metadata m join mean_temperature on m.id=mean_temperature.id join day_temperature on m.id=day_temperature.id join night_temperature on m.id=night_temperature.id join amount on m.id=amount.id join var on m.id=var.id group by m.id, device_id, location order by m.id asc
<gh_stars>0 -- MySQL Script generated by MySQL Workbench -- Thu Sep 5 18:29:44 2019 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'; -- ----------------------------------------------------- -- Schema mydb -- ----------------------------------------------------- -- ----------------------------------------------------- -- Schema mydb -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET utf8 ; USE `mydb` ; -- ----------------------------------------------------- -- Table `mydb`.`clientes` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`clientes` ( `id_clientes` INT NOT NULL AUTO_INCREMENT, `razon_social` VARCHAR(45) NULL, `nro_documento` VARCHAR(45) NULL, `estado` TINYINT NULL, PRIMARY KEY (`id_clientes`), UNIQUE INDEX `id_clientes_UNIQUE` (`id_clientes` ASC) VISIBLE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `mydb`.`categorias` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`categorias` ( `id_categorias` INT NOT NULL AUTO_INCREMENT, `descripcion` VARCHAR(45) NULL, `estado` TINYINT NULL, PRIMARY KEY (`id_categorias`), UNIQUE INDEX `id_categorias_UNIQUE` (`id_categorias` ASC) VISIBLE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `mydb`.`productos` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`productos` ( `id_productos` INT NOT NULL AUTO_INCREMENT, `codigo` INT NULL, `descripcion` VARCHAR(45) NULL, `precio_compra` INT NULL, `precio_venta` INT NULL, `stock` INT NULL, `estado` TINYINT NULL, UNIQUE INDEX `id_productos_UNIQUE` (`id_productos` ASC) VISIBLE, PRIMARY KEY (`id_productos`), CONSTRAINT `fk_id_categorias` FOREIGN KEY (`id_productos`) REFERENCES `mydb`.`categorias` (`id_categorias`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
<reponame>reushftw/esther-esthetica -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : jeu. 27 juin 2019 à 18:27 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Base de données : `esther_esthetica` -- -- -------------------------------------------------------- -- -- Structure de la table `category` -- DROP TABLE IF EXISTS `category`; CREATE TABLE IF NOT EXISTS `category` ( `id` int(11) NOT NULL AUTO_INCREMENT, `chirurgie_id` int(11) NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `nameen` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `coverimage` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` longtext COLLATE utf8_unicode_ci NOT NULL, `descriptionen` longtext COLLATE utf8_unicode_ci NOT NULL, `backimage` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `details` longtext COLLATE utf8_unicode_ci NOT NULL, `detailsen` longtext COLLATE utf8_unicode_ci NOT NULL, `baimage` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `detailsimage` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `details1` longtext COLLATE utf8_unicode_ci NOT NULL, `details1en` longtext COLLATE utf8_unicode_ci NOT NULL, `detailsimage2` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `details2` longtext COLLATE utf8_unicode_ci NOT NULL, `details2en` longtext COLLATE utf8_unicode_ci NOT NULL, `detailsimage3` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `before_operation` longtext COLLATE utf8_unicode_ci NOT NULL, `before_operationen` longtext COLLATE utf8_unicode_ci NOT NULL, `before_operation1` longtext COLLATE utf8_unicode_ci NOT NULL, `before_operation1en` longtext COLLATE utf8_unicode_ci NOT NULL, `deroulement_operation` longtext COLLATE utf8_unicode_ci NOT NULL, `deroulement_operationen` longtext COLLATE utf8_unicode_ci NOT NULL, `after_operation` longtext COLLATE utf8_unicode_ci NOT NULL, `after_operationen` longtext COLLATE utf8_unicode_ci NOT NULL, `after_operation1` longtext COLLATE utf8_unicode_ci NOT NULL, `after_operation1en` longtext COLLATE utf8_unicode_ci NOT NULL, `complications` longtext COLLATE utf8_unicode_ci NOT NULL, `complicationsen` longtext COLLATE utf8_unicode_ci NOT NULL, `complications1` longtext COLLATE utf8_unicode_ci NOT NULL, `complications1en` longtext COLLATE utf8_unicode_ci NOT NULL, `tarifs` longtext COLLATE utf8_unicode_ci NOT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `IDX_64C19C1B6C5A438` (`chirurgie_id`) ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Déchargement des données de la table `category` -- INSERT INTO `category` (`id`, `chirurgie_id`, `name`, `nameen`, `coverimage`, `description`, `descriptionen`, `backimage`, `details`, `detailsen`, `baimage`, `detailsimage`, `details1`, `details1en`, `detailsimage2`, `details2`, `details2en`, `detailsimage3`, `before_operation`, `before_operationen`, `before_operation1`, `before_operation1en`, `deroulement_operation`, `deroulement_operationen`, `after_operation`, `after_operationen`, `after_operation1`, `after_operation1en`, `complications`, `complicationsen`, `complications1`, `complications1en`, `tarifs`, `updated_at`) VALUES (1, 1, 'Augmentation Mammaire', 'Breast augmentation', 'iStock_000013873434_Large-e1410171564524.jpg', 'L’augmentation mammaire est une opération de chirurgie mammaire visant à augmenter la taille des seins. Cette procédure peut s’effectuer de deux manières: l’augmentation des seins par implants mammaires ou par lipofiling…', 'Breast augmentation is a breast surgery operation to increase the size of the breasts. This procedure can be done in two ways: breast augmentation by breast implants or lipofiling ...', 'augmentation-mammaire.jpg', 'L’augmentation mammaire est l’intervention chirurgicale de référence en Tunisie consistant à augmenter le volume des seins ou d’en modifier la forme de façon à harmoniser le buste par rapport à la silhouette de la patiente. Cette intervention concerne les seins trop petits suite à un amaigrissement, une grossesse ou à une modification hormonale (hypotrophies) ou les seins hypoplasiques c’est à dire dont l’insuffisance de volume est d’origine constitutionnelle.\r\n\r\nEn chirurgie esthétique, les objectifs et les stratégies chirurgicales d’une augmentation mammaire diffèrent d’une patiente à une autre. Le galbe et le volume sont adaptés en fonction des souhaits de la patiente. La chirurgie agit sur la forme des seins, leur volume et sur leur base d’implantation.', 'Breast augmentation is the reference surgery in Tunisia to increase the size of the breasts or to change the shape of the breasts so as to harmonize the bust with respect to the silhouette of the patient. This intervention concerns too small breasts following a weight loss, a pregnancy or a hormonal modification (hypotrophies) or hypoplastic breasts, that is to say whose insufficiency of volume is of constitutional origin. In cosmetic surgery, the objectives and surgical strategies of a breast augmentation differ from one patient to another. The curve and the volume are adapted according to the wishes of the patient. Surgery affects the shape of the breasts, their volume and their implantation base.', 'Avant-apres-seins.jpg', 'prothese-anatomique-prothese-ronde.jpg', 'L’augmentation des seins par pose de prothèses mammaires La prothèse mammaire est une enveloppe de silicone remplie de gel ou d’une solution saline avec une forme spécifique, elle modifie la taille, la forme et le galbe des seins lorsqu’ils sont trop petits ou totalement inexistants. L’implant mammaire peut se mettre en arrière de la glande mammaire sur le muscle pectoral ou en arrière de ce même muscle directement contre le thorax. Grâce à cette intervention de chirurgie mammaire, la poitrine retrouve ainsi toute sa rondeur. Plusieurs cas sont possibles chez les femmes qui souhaitent recourir à des prothèses mammaires : – La femme a une petite poitrine et voudrait une taille correspondant à ses désirs. – Un sein est plus petit que l’autre et la femme souhaite rétablir l’harmonie de sa poitrine. – Après un amaigrissement ou une grossesse, les seins se sont vidés et la femme souhaite retrouver son tour de poitrine initial. – La glande est peu ou pas développée et la poitrine est plate.', 'Breast augmentation by laying breast implants The breast implant is a silicone shell filled with gel or saline with a specific shape, it changes the size, shape and contour of the breasts when they are too small or totally nonexistent. The breast implant can be placed behind the mammary gland on the pectoral muscle or behind the same muscle directly against the thorax. Thanks to this operation of breast surgery, the chest thus regains all its roundness. Several cases are possible in women who wish to use breast prostheses: - The woman has a small chest and wants a size corresponding to her desires. - One breast is smaller than the other and the woman wishes to restore the harmony of her breast. - After a slimming or pregnancy, the breasts have emptied and the woman wants to regain his initial chest. - The gland is little or not developed and the chest is flat.', 'chirurgie-mammaire.png', 'Les différents types de prothèses mammaires Le praticien établit un examen morphologique des seins. Il examine la glande mammaire, le tissu graisseux mammaire, les muscles thoraciques et la qualité cutanée (si la peau est fine ou épaisse). Le chirurgien conseille le type de prothèse le mieux adapté à la patiente (prothèse ronde ou anatomique) ainsi que le site d’implantation (rétro- musculaire ou non). Un essayage avec un soutien-gorge adapté est effectué lors de la consultation.Les prothèses mammaires anatomiques Elles ont la faculté de reproduire une forme naturelle du sein (forme en goutte ou poire) mais peuvent subir un risque de rotation. Ce risque de rotation est exceptionnel si la technique chirurgicale est correcte. Leur aspect naturel est particulièrement adapté aux patientes minces avec des tissus non épais ou n’ayant que peu de glande mammaire, ainsi que pour les cas de reconstruction mammaire Les prothèses rondes Elles permettent un décolleté plus pigeonnant et un aspect davantage bombé dans la partie haute des seins. En cas de rotation, il n’y a pas d’altération de la forme du sein, les prothèses rondes étant hémisphériques. Les prothèses en gel de silicone Les implants mammaires les plus utilisés sont constitués d’une enveloppe de silicone contenant un gel de silicone ce qui procure un toucher très naturel et agréable. En plus de l’effet naturel ressenti à la palpation, les prothèses en gel de silicone offrent le résultat le plus esthétique et le plus harmonieux. Prothèses remplies d’Hydrogel : Il s’agit d’un gel aqueux, homologué depuis 2005, composé en grande partie d’eau gélifiée par un dérivé de cellulose. Ce gel, de consistance plus naturelle que le serum physiologique, est lui aussi résorbable par l’organisme en cas de rupture de l’enveloppe. L’augmentation des seins par lipofilling Le lipofilling des seins est une technique d’augmentation mammaire par injection de graisse. C’est une technique révolutionnaire qui utilise un excès graisseux pour récréer un sein souple et naturel tout en redressant la silhouette par liposuccion.', 'The different types of breast prostheses The practitioner establishes a morphological examination of the breasts. It examines the mammary gland, mammary fat tissue, thoracic muscles and skin quality (if the skin is thin or thick). The surgeon advises the type of prosthesis that is best suited to the patient (round or anatomic prosthesis) as well as the implantation site (retro-muscular or not). A fitting with a matching bra is carried out during the consultation. Anatomic breast prostheses They have the ability to reproduce a natural form of the breast (form in drop or pear) but can be rotated. This risk of rotation is exceptional if the surgical technique is correct. Their natural appearance is particularly adapted to thin patients with non-thick tissue or having only a little mammary gland, as well as for cases of breast reconstruction The round prostheses They allow a more plunging neckline and a more domed appearance in the upper part breasts. In case of rotation, there is no alteration of the shape of the breast, the round prostheses being hemispherical. Silicone Gel Prostheses The most commonly used breast implants consist of a silicone-filled silicone gel casing that provides a very natural and pleasant feel. In addition to the natural feel of palpation, silicone gel prostheses offer the most aesthetic and harmonious result. Prostheses filled with Hydrogel: This is an aqueous gel, approved since 2005, largely composed of water gelled with a cellulose derivative. This gel, of more natural consistency than the physiological serum, is also absorbable by the body in case of rupture of the envelope. Breast augmentation by lipofilling Breast lipofilling is a technique of breast augmentation by injection of fat. It is a revolutionary technique that uses excess fat to recreate a supple and natural breast while straightening the figure with liposuction. absorbable-ˈsôr-,əbˈzôrbəbəl Définitions de absorbable Adjectif 1 able to be absorbed, especially into the body.', 'position-du-prothese.jpg', '<b>Avant l’opération:</b>\r\n\r\n– Un bilan sanguin préopératoire sera réalisé conformément aux prescriptions ainsi qu’un bilan radiologique du sein (mammographie,échographie).\r\n\r\n– Le médecin anesthésiste sera vu en consultation au plus tard 24h avant l’intervention.\r\n\r\n– Aucun médicament contenant de l’aspirine ne devra être pris dans les dix jours précédant l’opération.\r\n\r\n– On vous demandera probablement de rester à jeun (ne rien manger ni boire) six heures avant l’intervention.\r\n\r\n– Les données scientifiques sont, à l’heure actuelle, unanimes quant aux effets néfastes de la consommation tabagique dans les semaines entourant une intervention chirurgicale. Ces effets sont multiples et peuvent entrainer des complications cicatricielles majeures, des échecs de la chirurgie et favoriser l’infection des matériels implantables. Dans cette optique, la communauté des chirurgiens plasticiens s’accorde sur une demande d’arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). La cigarette électronique doit être considérée de la même manière.\r\n\r\nL’opération se fait sous anesthésie générale. Elle dure environ entre 1h et 2h30 et la patiente passe une nuit en clinique.\r\n\r\nIncisions cutanées :\r\nIl existe plusieurs « voies d’abord » possibles :\r\n• voies aréolaires, avec incision dans le segment inférieur de la circonférence de l’aréole, ou ouverture horizontale contournant le mamelon par-dessous; (1 et 2)\r\n• voie axillaire, avec incision sous le bras, dans l’aisselle; (3)\r\n• voie sous-mammaire, avec incision placée dans le sillon situé sous le sein. (4)\r\n\r\nLe tracé de ces incisions correspond bien sûr à l’emplacement des futures cicatrices, qui seront donc dissimulées dans des zones de jonction ou des replis naturels.', '<b> Before the operation: </ b> - A preoperative blood work will be done according to the prescriptions as well as a radiological assessment of the breast (mammography, ultrasound). - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within ten days of the operation. - You will probably be asked to stay fast (do not eat or drink anything) six hours before the procedure. - The current scientific evidence is unanimous about the harmful effects of smoking in the weeks surrounding a surgical procedure. These effects are multiple and can lead to major scarring complications, surgical failures and infection of implantable materials. With this in mind, the community of plastic surgeons agrees on a request for complete cessation of smoking at least one month before the procedure and then until healing (usually 15 days after surgery). The electronic cigarette must be considered in the same way. The operation is done under general anesthesia. It lasts approximately between 1 and 2:30 and the patient spends one night in the clinic. Skin incisions: There are several possible \"ways of approach\": • areolar arteries, with incision in the lower segment of the areola circumference, or horizontal opening bypassing the nipple from below; (1 and 2) • axillary way, with incision under the arm, in the armpit; (3) • sub-mammary way, with incision placed in the furrow located under the breast. (4) The course of these incisions corresponds, of course, to the location of future scars, which will therefore be hidden in junction zones or natural folds.', 'Mise en place des prothèses: En passant par les incisions, les implants peuvent alors être introduits dans les loges réalisées. Deux positionnements sont possibles : • prémusculaire, où les prothèses sont placées directement derrière la glande, en avant des muscles pectoraux ; • rétromusculaire, où les prothèses sont placées plus profondément, en arrière des muscles pectoraux. Le choix entre ces deux emplacements, avec leurs avantages et inconvénients respectifs, aura été discuté avec votre chirurgien.Gestes complémentaires: En cas de ptôse mammaire associée (seins tombants, aréoles basses), on a vu qu’il pouvait être souhaitable de réduire l’enveloppe cutanée du sein afin de le faire remonter («mastopexie»). Cette résection de peau se traduira alors par des cicatrices plus importantes (autour de l’aréole ± verticale ± horizontale dans le sillon sous-mammaire) Drains et pansement: Un petit drain peut être mis en place en fonction des habitudes du chirurgien et des conditions locales. C’est un dispositif destiné à évacuer le sang qui pourrait s’accumuler autour des prothèses. En fin d’intervention, un pansement « modelant » est réalisé avec un bandage élastique.', 'Placement of prostheses: Through the incisions, the implants can then be introduced into the boxes made. Two positions are possible: • premuscular, where the prostheses are placed directly behind the gland, in front of the pectoral muscles; • retromuscular, where the prostheses are placed deeper, behind the pectoral muscles. The choice between these two sites, with their respective advantages and disadvantages, will have been discussed with your surgeon. Complementary actions: In case of associated breast ptosis (drooping breasts, low areolas), it has been seen that it may be desirable to reduce the risk. cutaneous envelope of the breast in order to raise it (\"mastopexy\"). This resection of the skin will then result in larger scars (around the areola ± vertical ± horizontal in the sub-mammary groove) Drains and dressing: A small drain can be put in place according to the habits of the surgeon and the conditions local. It is a device intended to evacuate the blood which could accumulate around the prostheses. At the end of the procedure, a \"modeling\" dressing is made with an elastic bandage.', '', '', '<b>Après l’opération:</b>\r\n\r\n– Les suites opératoires peuvent parfois être douloureuses les premiers jours, notamment lorsque les implants sont de gros volume et surtout s’ils sont placés derrière les muscles. Un traitement antalgique, adapté à l’intensité des douleurs, sera prescrit pendant quelques jours. Dans le meilleur des cas, la patiente ressentira une forte sensation de tension.\r\n\r\n– Œdème (gonflement), ecchymoses (bleus) et gêne à l’élévation des bras sont fréquents les premiers temps.\r\n\r\n– Le premier pansement est retiré après quelques jours. Il est alors remplacé par un pansement plus léger. Un soutien-gorge pourra alors être recommandé nuit et jour pendant quelques semaines.\r\n\r\n– La plupart du temps, les fils de suture sont internes et résorbables. Dans le cas contraire, ils seront retirés au bout de quelques jours.\r\n\r\n– Il convient d’envisager une convalescence avec interruption d’activité d’une durée de cinq à dix jours.', '<b> After the operation: </ b> - The operative follow-up can sometimes be painful the first days, especially when the implants are of big volume and especially if they are placed behind the muscles. An analgesic treatment, adapted to the intensity of the pains, will be prescribed for a few days. In the best case, the patient will feel a strong sense of tension. - Edema (swelling), bruising (blue) and discomfort to the elevation of the arms are frequent the first times. - The first dressing is removed after a few days. It is then replaced by a lighter dressing. A bra can be recommended night and day for a few weeks. - Most of the time, the sutures are internal and resorbable. If not, they will be removed after a few days. - It is advisable to envisage a convalescence with interruption of activity of a duration of five to ten days.', '– Il est conseillé d’attendre un à deux mois pour reprendre une activité sportive. – Un délai de deux à trois mois est nécessaire pour apprécier le résultat définitif. C’est le temps nécessaire pour que les seins aient retrouvé toute leur souplesse et que les prothèses se soient stabilisées. – L’intervention aura permis une amélioration du volume et de la forme de la poitrine. Les cicatrices sont habituellement très discrètes. Le gain de volume mammaire a une répercussion sur la silhouette globale, permettant une plus grande liberté vestimentaire. Au-delà de ces améliorations physiques, le recouvrement d’une féminité pleine et entière a souvent un effet très bénéfique sur le plan psychologique.', '- It is advisable to wait one to two months to resume a sports activity. - A period of two to three months is necessary to assess the final result. This is the time needed for the breasts to regain all their flexibility and that the prostheses have stabilized. - The intervention has improved the volume and shape of the chest. The scars are usually very discreet. The gain in breast volume has an impact on the overall silhouette, allowing greater freedom of dress. Beyond these physical improvements, the recovery of full femininity often has a very beneficial psychological effect.', 'Imperfections du résultat:\r\n\r\n• une asymétrie de volume résiduelle, incomplètement corrigée malgré des implants de taille différente ;\r\n• une fermeté un peu trop grande avec souplesse et mobilité jugées insuffisantes (surtout avec de gros implants) ;\r\n• un aspect un peu artificiel, notamment chez les patientes très maigres, avec une trop grande visibilité des bords de la prothèse, en particulier dans le segment supérieur ;\r\n• la perceptibilité au toucher des implants est toujours possible, surtout quand l’épaisseur de la couverture tissulaire (peau + graisse + glande) recouvrant la prothèse est faible. Cette palpation directe de la membrane prothétique, voire de plis, est plus fréquente chez les patientes minces, avec des implants de gros volumes, remplis de serum pysiologique et en position prépectorale.\r\n• l’aggravation d’une ptose mammaire peut être observée, surtout en cas d’utilisation de volumineux implants.\r\nEn cas d’insatisfaction, certaines de ces imperfections pourront éventuellement bénéficier d’une correction chirurgicale après quelques mois.\r\n\r\nQuestions diverses:\r\n\r\nGrossesse/allaitement: Après une mise en place de prothèses mammaires, une grossesse est envisageable sans aucun danger, ni pour la patiente ni pour l’enfant mais il est recommandé d’attendre au moins six mois après l’intervention. Pour ce qui concerne l’allaitement, il n’est pas non plus dangereux et reste possible dans la plupart des cas.\r\nMaladies auto-immunes: Les très nombreux travaux scientifiques internationaux réalisés à grande échelle sur ce sujet ont unanimement apporté la preuve qu’il n’y a pas plus de risque de survenue de ce type de maladies rares chez les patientes porteuses d’implants (en particulier en silicone) que dans la population féminine générale.\r\n\r\nDurée de vie des implants: La durée de vie moyenne est estimée aux alentours de 10 ans.\r\n\r\nSurveillance: L’échographie mammaire est un examen non irradiant et très performant pour juger de l’intégrité de la prothèse. Une échographie doit être réalisée au moindre doute clinique et pour certains systématiquement 1 fois par an.\r\nLe changement prothétique n’est envisagé qu’en cas d’anomalie clinique ou radiologique ou encore à la demande de la patiente.\r\n\r\nComplications envisageables:\r\n\r\n– En ce qui concerne l’anesthésie, lors de la consultation préopératoire obligatoire, le médecin anesthésiste informera lui-même la patiente des risques anesthésiques. Il faut savoir que l’anesthésie, quelle qu’elle soit, induit dans l’organisme des réactions parfois imprévisibles et plus ou moins faciles à maîtriser.\r\nToutefois, en ayant recours à un anesthésiste – réanimateur compétent, exerçant dans un contexte réellement chirurgical, les risques encourus sont devenus statistiquement très faibles. Il faut en effet garder à l’esprit que les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en dehors de l’urgence et chez une personne en bonne santé.\r\n\r\n– En ce qui concerne le geste chirurgical, en choisissant un chirurgien plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement.\r\nEn pratique, la grande majorité des augmentations mammaires réalisées dans les règles se passe sans aucun problème, les suites opératoires sont simples et les patientes sont pleinement satisfaites de leur résultat. Pourtant, parfois, des complications peuvent survenir au décours de l’intervention, certaines inhérentes au geste chirurgical mammaire et d’autre spécifiquement liées aux implants :', 'Imperfections of the result: • residual volume asymmetry, incompletely corrected despite implants of different sizes; • a firmness a little too big with flexibility and mobility considered insufficient (especially with large implants); • a somewhat artificial appearance, especially in very thin patients, with too much visibility of the edges of the prosthesis, especially in the upper segment; • the tactile perceptibility of the implants is always possible, especially when the thickness of the tissue covering (skin + fat + gland) covering the prosthesis is low. This direct palpation of the prosthetic membrane, or even folds, is more frequent in thin patients, with large volume implants, filled with pysiological serum and in the prepectoral position. • worsening of mammary ptosis can be observed, especially when using large implants. In case of dissatisfaction, some of these imperfections may eventually benefit from a surgical correction after a few months. Divers questions: Pregnancy / breastfeeding: After breast implants are put in place, a pregnancy is conceivable without any danger for either the patient or the child, but it is recommended to wait at least six months after the procedure. As for breastfeeding, it is not dangerous either and is still possible in most cases. Autoimmune diseases: The large number of large-scale international scientific studies on this subject have unanimously demonstrated that there is no greater risk of this type of rare disease occurring in implant-bearing patients ( especially in silicone) than in the general female population. Implant life: The average life is estimated at around 10 years. Monitoring: Breast ultrasound is a non-irradiating, high-performance test for judging the integrity of the prosthesis. An ultrasound should be performed at the least clinical doubt and for some systematically once a year. The prosthetic change is only considered in case of clinical or radiological abnormality or at the request of the patient. Possible complications: - With regard to anesthesia, during the obligatory preoperative consultation, the anesthetist will inform the patient of the anesthetic risks. It should be known that anesthesia, whatever it is, induces in the body reactions sometimes unpredictable and more or less easy to control. However, by using a competent anesthetist - resuscitator, practicing in a truly surgical context, the risks incurred became statistically very small. It must be borne in mind that techniques, anesthetic products and surveillance methods have made tremendous progress over the last thirty years, providing optimal safety, especially when the operation is carried out outside the emergency room. and in a healthy person. - Regarding the surgical procedure, by choosing a qualified and competent plastic surgeon, trained in this type of intervention, you limit these risks as much as possible, without however completely eliminating them. In practice, the vast majority of breast augmentation performed in the rules occurs without any problem, the operative follow-ups are simple and the patients are fully satisfied with their result. However, sometimes, complications can occur during the course of the intervention, some inherent to the breast surgery and other specifically related to the implants:', 'Complications inhérentes au geste chirurgical mammaire: • Épanchements / infections – hématome : l’accumulation de sang autour de la prothèse est une complication précoce pouvant survenir au cours des premières heures. S’il est important, une reprise au bloc opératoire est alors préférable afin d’évacuer le sang et de stopper le saignement à son origine ; – épanchement séreux : une accumulation de liquide lymphatique autour de la prothèse est un phénomène assez fréquent dans les suites opératoires immédiates. Il est souvent associé à un œdème. Il se traduit par une augmentation transitoire du volume mammaire. Il disparaît spontanément et progressivement ; – infection : rare après ce type de chirurgie. Elle peut ne pas être résolue par le seul traitement antibiotique et impose alors une reprise chirurgicale pour drainage et ablation de l’implant pendant quelques mois (temps nécessaire avant de pouvoir remettre en place une nouvelle prothèse sans risque). • Nécrose cutanée Elle est consécutive à un manque d’oxygénation tissulaire dû à une insuffisance d’apport sanguin localisé, qui peut être favorisé par une tension excessive, un hématome, une infection ou un tabagisme important chez la patiente. Il s’agit d’une complication très rare mais redoutée car, à l’extrême, elle peut localement mettre à nu la prothèse, notamment par une désunion des sutures. Une reprise chirurgicale s’impose souvent, avec parfois la nécessité de retirer provisoirement l’implant. • Anomalies de cicatrisation Le processus de cicatrisation mettant en jeu des phénomènes assez aléatoires, il arrive parfois que les cicatrices ne soient pas, à terme, aussi discrètes qu’escompté, pouvant alors prendre des aspects très variables : élargies, rétractiles, adhérentes, hyper ou hypopigmentées, hypertrophiques (boursouflées), voire exceptionnellement chéloïdes. • Altération de la sensibilité Elles sont fréquentes les premiers mois mais finissent la plupart du temps par régresser. Rarement toutefois, un certain degré de dysesthésie (diminution ou exagération de la sensibilité au toucher) peut persister, en particulier au niveau de l’aréole et du mamelon. • Galactorrhée/épanchements lactés Il a été rapporté de très rares cas de stimulation hormonale postopératoire inexpliquée, se traduisant par une sécrétion de lait (« galactorrhée ») avec parfois une collection du liquide autour de la prothèse. • Pneumothorax Rare, il bénéficiera d’un traitement spécifique. Risques spécifiquement liés aux implants: • Formation de « plis » ou aspect de « vagues » Les implants étant souples, il est possible que leur enveloppe se plisse et que ces plis soient perceptibles au toucher, voire même visibles sous la peau dans certaines positions, donnant alors un aspect de vagues. Ce phénomène, un peu plus fréquent avec le serum physiologique qu’avec le gel de silicone, survient surtout chez des patientes minces. Une intervention de lipomodelage peut parfois être proposée. Elle consiste à apposer une fine couche de graisse sous la peau du sein afin de «camoufler» l’implant. • Rupture On a vu que les implants ne peuvent être considérés comme définitifs avec une durée de vie moyenne de l’ordre de 10 ans. Une perte d’étanchéité de l’enveloppe peut donc survenir à terme. Il peut s’agir d’une simple porosité, d’ouvertures punctiformes, de microfissurations, voire de véritables brèches. Cela peut être, très rarement, la conséquence d’un traumatisme violent ou d’une piqûre accidentelle et, beaucoup plus souvent, le résultat d’une usure progressive de la paroi due à l’ancienneté. Dans tous les cas, il en résulte une issue possible du produit de remplissage de la prothèse, avec des conséquences différentes selon la nature de ce contenu – avec le sérum physiologique ou l’hydrogel résorbables, on assiste à un dégonflement partiel ou total, rapide ou lent ; – avec le gel de silicone (non résorbable), celui-ci va rester contenu au sein de la membrane qui isole la prothèse. Cela peut alors favoriser l’apparition d’une coque, mais peut aussi rester sans conséquence et passer totalement inaperçu. Dans certains cas devenus beaucoup plus rares (notamment du fait de la meilleure « cohésivité» des gels actuels), on peut toutefois assister à une pénétration progressive du gel dans les tissus environnants (siliconome). La rupture prothétique impose une intervention visant à changer les implants. • Malposition / déplacement Un mauvais positionnement, ou le déplacement secondaire des implants, affectant alors la forme de la poitrine, peuvent parfois justifier une correction chirurgicale. • Rotation Bien que relativement rare en pratique, le pivotement d’une prothèse « anatomique » reste théoriquement possible et peut affecter le résultat esthétique. • Déformation de la paroi thoracique Dans de rares cas, des prothèses avec coques fibreuses, laissées longtemps en place, peuvent «s’imprimer» dans les tissus, laissant lors de leur ablation une déformation de la paroi thoracique délicate à corriger. • Sérome tardif péri-prothétique Dans de très rares cas, une accumulation liquidienne peut survenir tardivement autour de la prothèse. Un tel épanchement tardif, a fortiori s’il est associé à d’autres anomalies cliniques du sein, impose de faire réaliser un bilan sénologique auprès d’un radiologue spécialisé pour réaliser une ponction sous échographie à fin d’analyses. En cas de masse mammaire ou d’épanchement récidivant, une exploration chirurgicale permettra une analyse de la capsule péri-prothétique afin d’éliminer un très exceptionnel Lymphome Anaplasique à Grandes Cellules associé aux implants mammaires (LAGC-AIM).', 'Complications inherent to breast surgery: • Effusions / infections - hematoma: the accumulation of blood around the prosthesis is an early complication that can occur during the first hours. If it is important, a recovery in the operating room is then preferable in order to evacuate the blood and stop the bleeding at its origin; - serous effusion: an accumulation of lymphatic fluid around the prosthesis is a fairly common phenomenon in the immediate postoperative course. It is often associated with edema. It results in a transient increase in breast volume. It disappears spontaneously and gradually; - infection: rare after this type of surgery.', '<html>\r\n<b>Tarifs:</b>\r\nL’augmentation mammaire par prothèses mammaires rondes coûte 1950 euros\r\nL’augmentation mammaire par prothèses mammaires anatomiques coûte 2150 euros\r\nL’augmentation mammaire par lipofilling coûte 1650 euros\r\n</html>', '2019-01-17 00:00:00'), (2, 1, 'Réduction Mammaire', 'Breast reduction', 'reduction-mammaire2.jpg', 'La réduction mammaire réduit la taille exagérée des seins et corrige le relâchement de la peau lorsque le poids de la poitrine…\r\n\r\n', 'Breast reduction reduces the exaggerated size of breasts and corrects sagging of the skin when the weight of the breast ...', 'reduction-mammaire2.jpg', 'La réduction mammaire réduit la taille exagérée des seins et corrige le relâchement de la peau lorsque le poids de la poitrine a entraîné son affaissement. Nombre de femmes sont gênées par des seins lourds ou flasques. Ce phénomène peut provoquer des douleurs au niveau des épaules et du dos ou des soucis psychiques.\r\n\r\nL’intervention chirurgicale a pour but la réduction du volume des seins, la correction de la ptose et d’une éventuelle asymétrie, afin d’obtenir deux seins harmonieux en eux-mêmes et par rapport à la morphologie de la patiente (deux seins réduits, ascensionnés, symétrisés et remodelés).\r\n\r\nUne réduction mammaire se réalise pour des motivations d’ordre esthétique ou médical, elle ne garantit pas seulement des seins plus petits, mais aussi des seins plus fermes grâce à l’effet lifting de l’intervention.', 'Breast reduction reduces the exaggerated size of the breasts and corrects sagging skin when the weight of the breast has caused it to sag. Many women are embarrassed by heavy or flaccid breasts. This phenomenon can cause pain in the shoulders and back or psychic worries. The purpose of the surgical intervention is to reduce the volume of the breasts, correct the ptosis and possible asymmetry, in order to obtain two harmonious breasts in themselves and in relation to the morphology of the patient (two reduced breasts). , ascended, symmetrized and remodeled). Breast reduction is performed for reasons of aesthetic or medical, it not only guarantees smaller breasts, but also firmer breasts through the lifting effect of the intervention.', 'reduction-mammaire.jpg', '3-cicatrices-reduction-mammaire.jpg', '<!DOCTYPE html>\r\n<html>\r\n<head>\r\n</head>\r\n<body>\r\n<b>Avant l’opération:</b> – Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions ainsi qu’un bilan radiologique du sein (mammographie, échographie…). – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). – L’arrêt d’une éventuelle contraception orale peut être requis, notamment en cas de facteur de risques associés (obésité, mauvais état veineux, trouble de la coagulation). L’intervention se fait sous anesthésie générale et nécessite une hospitalisation de 1 à 3 jours. En fonction du chirurgien et de l’importance de l’hypertrophie, l’intervention peut durer de deux à quatre heures. L’intervention réalise l’ablation du tissu mammaire en excès. On conserve un volume en harmonie avec la silhouette de la patiente et conforme à ses désirs. Ce volume mammaire résiduel est ascensionné, concentré et remodelé. Il faut ensuite adapter l’enveloppe cutanée, ce qui impose de retirer la peau en excès de manière à assurer une bonne tenue et un bon galbe aux nouveaux seins. Les berges de la peau ainsi découpées sont alors suturées : ces sutures sont à l’origine des cicatrices. Souvent ces cicatrices ont la forme d’un T inversé avec trois composantes : péri-aréolaire au pourtour de l’aréole entre la peau brune et la peau blanche, verticale, entre le pôle inférieur de l’aréole et le sillon sous-mammaire, horizontale, dissimulée dans le sillon sous-mammaire. La longueur de la cicatrice horizontale est proportionnelle à l’importance de l’hypertrophie et de la ptose. Parfois, notamment lorsque l’hypertrophie et la ptôse sont modérées, on peut réaliser une méthode dite « verticale» qui permet de supprimer la cicatrice transversale dans le sillon sous-mammaire et de réduire la rançon cicatricielle à ses composantes péri-aréolaire et verticale.\r\n</body>\r\n</html>', ' <! DOCTYPE html> <Html> <Head> </ Head> <Body> <b> Before the operation: </ b> - A usual pre-operative check-up is carried out according to the prescriptions as well as a radiological assessment of the breast (mammography, ultrasound ...). - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). - Stopping a possible oral contraception may be required, especially in case of risk factors associated (obesity, poor venous condition, bleeding disorder). The procedure is performed under general anesthesia and requires hospitalization for 1 to 3 days. Depending on the surgeon and the importance of hypertrophy, the procedure can last from two to four hours. The procedure carries out the removal of excess breast tissue. A volume is kept in harmony with the silhouette of the patient and in accordance with her desires. This residual breast volume is ascended, concentrated and remodeled. It is then necessary to adapt the skin envelope, which requires removing the excess skin so as to ensure a good fit and a good curve to the new breasts. The edges of the skin thus cut are then sutured: these sutures are at the origin of the scars. Often these scars have the shape of an inverted T with three components: periareolar around the areola between the brown skin and the white skin, vertical, between the lower pole of the areola and the submembrane groove, horizontal, hidden in the sub-mammary groove. The length of the horizontal scar is proportional to the extent of hypertrophy and ptosis. Sometimes, especially when hypertrophy and ptosis are moderate, we can achieve a so-called \"vertical\" method that eliminates the transverse scar in the inframammary groove and reduce the cicatricial ransom to its periareolar and vertical components. </ Body> </ Html>', '', '<!DOCTYPE html><html><head></head><body>En fin d’intervention un pansement modelant, avec des bandes élastiques en forme de soutien-gorge, est confectionné. <b>Après l’opération:</b> – Les suites opératoires sont en général peu douloureuses, ne nécessitant que des antalgiques simples. – Un gonflement (œdème) et des ecchymoses (bleus) des seins, ainsi qu’une gêne à l’élévation des bras sont fréquemment observés. – Le premier pansement est retiré au bout de 24 à 48 heures, remplacé par un pansement plus léger. Le pansement sera refait régulièrement jusqu’à ce que la cicatrisation soit acquise. – On met alors en place un soutien-gorge assurant une bonne contention. – Le port de ce soutien-gorge est conseillé pendant environ un mois, au décours de l’intervention. – Il convient d’envisager une convalescence et un arrêt de travail d’une durée de 8 à 21 jours. – On conseille d’attendre un à deux mois pour reprendre une activité sportive. Le résultat ne peut être jugé qu’à partir d’un an après l’intervention: la poitrine a alors le plus souvent un galbe harmonieux, sy- métrique ou très proche de la symétrie, et naturel. Au-delà de l’amélioration locale, cette intervention a en général un retentissement favorable sur l’équilibre du poids, la pratique des sports, les possibilités vestimentaires et l’état psychologique. Imperfections du résultat: Il s’agit essentiellement des cicatrices, qui font l’objet d’une surveillance attentive : il est fréquent qu’elles prennent un aspect rosé et gonflé au cours des deuxième et troisième mois post-opératoires ; au-delà, elles s’estompent en général progressivement pour devenir, avec le temps, peu visibles. Elles peuvent toutefois demeurer élargies, blanches ou au contraire brunes. En ce qui concerne les cicatrices, il faut savoir que, si elles s’estompent bien, en général, avec le temps, elles ne sauraient disparaître complètement. A cet égard, il ne faut pas oublier que si c’est le chirurgien qui réalise les sutures, la cicatrice, elle, est le fait de la patiente. Parfois, il peut persister une asymétrie des seins, qu’il s’agisse du volume, de la hauteur, de la taille ou de l’orientation des aréoles. Dans tous les cas, une correction chirurgicale secondaire peut être faite, mais il convient d’attendre au moins un an ou deux. Complications envisageables: • En ce qui concerne l’anesthésie, lors de la consultation, le médecin anesthésiste informera lui-même la patiente des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles, et plus ou moins faciles à maîtriser : le fait d’avoir recours à un Anesthésiste parfaitement compétent, exerçant dans un contexte réellement chirurgical fait que les risques encourus sont devenus statistiquement très faibles. • En ce qui concerne le geste chirurgical : en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. Pour autant, et malgré leur faible fréquence, vous devez être informée des complications possibles : • Les accidents thrombo-emboliques (phlébite, embolie pulmonaire), bien que globalement très rares après ce type d’intervention, sont parmi les plus redoutables. Des mesures préventives rigoureuses doivent en minimiser l’incidence :port de bas anti-thrombose, lever précoce, éventuellement traitement anti-coagulant. • La survenue d’une infection nécessite un traitement antibiotique et parfois un drainage chirurgical. • Un hématome peut nécessiter un geste d’évacuation. • Un retard de cicatrisation peut parfois être observé, qui allonge les suites opératoires. • Une nécrose de la peau, de la glande, ou de l’aréole en fait rarement observée avec les techniques modernes, peut être responsable d’un retard de cicatrisation (le risque en est très accru par l’intoxication tabagique, et en cas de gigantomasties ou de très importantes hypertrophies). • Des altérations de la sensibilité, notamment mamelonnaire, peuvent parfois persister, même si la sensibilité redevient le plus souvent normale dans un délai de 6 à 18 mois. Ainsi, dans la très grande majorité des cas, cette intervention, bien étudiée au préalable et correctement réalisée, donne un résultat très appréciable en termes de confort, même si la rançon cicatricielle inévitable en reste le principal inconvénient. Au total, il ne faut pas surévaluer les risques mais simplement prendre conscience qu’une intervention chirurgicale, même apparemment simple, comporte toujours une petite part d’aléas. Le recours à un Ch<NAME> qualifié vous assure que celui-ci a la formation et la compétence requises pour savoir éviter ces complications, ou les traiter efficacement le cas échéant.</body></html>', '<! DOCTYPE html> <html> <head> </ head> <body> At the end of the procedure a modeling bandage, with elastic bands in the shape of a bra, is made. <b> After the operation: </ b> - The postoperative course is usually painless, requiring only simple analgesics. - Swelling (edema) and bruising (bruises) of the breasts, as well as discomfort to the elevation of the arms are frequently observed. - The first dressing is removed after 24 to 48 hours, replaced by a lighter dressing. The dressing will be redone regularly until healing is achieved. - We then put in place a bra ensuring good contention. - The wearing of this bra is recommended for about a month, after the intervention. - It is advisable to envisage a convalescence and a work stoppage of a duration of 8 to 21 days. - It is advisable to wait one to two months to resume a sporting activity. The result can not be judged until one year after the intervention: the chest then has most often a harmonious curve, symmetrical or very close to the symmetry, and natural. Beyond the local improvement, this intervention generally has a favorable impact on the balance of the weight, the practice of the sports, the sartorial possibilities and the psychological state. Imperfections of the result: These are essentially scars, which are carefully monitored: they often appear rosy and swollen during the second and third postoperative months; beyond that, they generally fade away gradually and become, with time, hardly visible. They can however remain enlarged, white or on the contrary brown. As for the scars, it should be known that, if they fade well, in general, with the time, they can not disappear completely. In this respect, it must not be forgotten that if the surgeon makes the sutures, the scar is the patient\'s. Sometimes there is breast asymmetry, whether in volume, height, size or orientation of the areola. In all cases, a secondary surgical correction can be made, but it should wait at least a year or two. Possible complications: • With regard to anesthesia, during the consultation, the anesthesiologist doctor will inform the patient of the anesthetic risks. It should be known that anesthesia induces in the body reactions sometimes unpredictable, and more or less easy to control: the fact of having recourse to a perfectly competent Anesthetist, exercising in a really surgical context makes that the risks incurred have become statistically very weak. • Regarding the surgical procedure: by choosing a qualified and competent Plastic surgeon, trained in this type of procedure, you limit these risks as much as possible, without however completely eliminating them. However, despite their low frequency, you should be aware of possible complications: • Thromboembolic events (phlebitis, pulmonary embolism), although generally very rare after this type of intervention, are among the most formidable. Rigorous preventive measures must minimize the incidence: low anti-thrombosis, early lifting, possibly anti-coagulant treatment. • The occurrence of an infection requires antibiotic treatment and sometimes surgical drainage. • A hematoma may require an evacuation gesture. • A delay of healing can sometimes be observed, which lengthens the operative follow-up. • Necrosis of the skin, gland, or areola is rarely observed with modern techniques, may be responsible for delayed healing (the risk is greatly increased by smoking intoxication, and in case gigantomasties or very important hypertrophies). • Changes in sensitivity, particularly nipples, can sometimes persist, even if the sensitivity returns to normal most often within 6 to 18 months. Thus, in the vast majority of cases, this intervention, well studied beforehand and correctly performed, gives a very appreciable result in terms of comfort, even if the inevitable cicatricial ransom remains the main disadvantage. In total, one should not overstate the risks but simply be aware that a surgical procedure, even apparently simple, always has a small share of hazards. The use of a qualified plastic surgeon ensures that he has the training and skills required to know how to avoid these complications, or treat them effectively if necessary. </ Body> </ html>', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '<!DOCTYPE html> <html> <head> </head> <body><b>Tarifs:</b> La réduction mammaire coûte 1800 euros </body></html>', '2019-01-17 00:00:00'); INSERT INTO `category` (`id`, `chirurgie_id`, `name`, `nameen`, `coverimage`, `description`, `descriptionen`, `backimage`, `details`, `detailsen`, `baimage`, `detailsimage`, `details1`, `details1en`, `detailsimage2`, `details2`, `details2en`, `detailsimage3`, `before_operation`, `before_operationen`, `before_operation1`, `before_operation1en`, `deroulement_operation`, `deroulement_operationen`, `after_operation`, `after_operationen`, `after_operation1`, `after_operation1en`, `complications`, `complicationsen`, `complications1`, `complications1en`, `tarifs`, `updated_at`) VALUES (3, 1, 'Lifting Mammaire', 'Breast Lift', 'lifting-mammaire.jpg', 'Le lifting mammaire est une technique chirurgicale qui a pour but de remonter et raffermir les seins…', 'The breast lift is a surgical technique that aims to lift and firm the breasts ...', 'LIFTING-MAMMAIRE (1).jpg', 'Le lifting des seins ou lifting mammaire est souvent proposé lorsque les seins perdent de leur tenue, souvent à cause d’évènements comme le vieillissement, une grossesse ou une perte de poids. L’intervention chirurgicale a pour but de remettre l’aréole et le mamelon en bonne position, de recentrer et d’ascensionner la glande et de retirer la peau excédentaire afin d’obtenir deux seins harmonieux, joliment galbés et ascensionnés.\r\n', 'Breast lift or breast lift is often offered when breasts lose their hold, often because of events such as aging, pregnancy or weight loss. The surgical procedure is to put the areola and nipple in a good position, refocus and ascend the gland and remove the excess skin to obtain two harmonious breasts, beautifully curved and ascended.', 'lifting-seins.jpg', '2-cicatrices-lifting-mammaire.jpg', '<b>Déroulement de l’opération:</b> <br><b>Avant l’opération:</b> – Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions ainsi qu’une mammographie et une échographie mammaire. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). Le lifting mammaire dure généralement entre 1h30 et 3h selon les différents cas et nécessite une anesthésie générale ainsi qu’1 ou 2 jours d’hospitalisation. L’intervention permet de remonter et de galber la poitrine en intervenant sur la peau et la glande, qui est alors repositionnée et concentrée. L’excédent de peau est retiré afin d’obtenir une enveloppe cutanée adaptée. Le sein prend alors un bel aspect plus ferme et soutenu. L’aréole et le mamelon sont alors replacés plus haut. Les cicatrices laissées par l’opération sont dues à la suture des pourtours de la peau qui a été incisée. Lorsque la ptôse est plus sérieuse, la cicatrice prend l’aspect d’un T inversé. On peut la décomposer de la manière suivante : une cicatrice située tout autour de l’aréole, au niveau de la démarcation de couleur de la peau ; une cicatrice verticale partant du bas de l’aréole et descendant jusqu’au pli du sein ; et une cicatrice horizontale (proportionnelle à la ptôse opérée) quasiment invisible dans le pli du sein.', ' <b> Procedure of the operation: </ b> <br> <b> Before the operation: </ b> - A usual pre-operative check-up is carried out in accordance with the prescriptions as well as a mammogram and a breast ultrasound. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). The breast lift usually lasts between 1h30 and 3h depending on the different cases and requires a general anesthesia and 1 or 2 days of hospitalization. The procedure is used to lift and curve the chest by intervening on the skin and the gland, which is then repositioned and concentrated. The excess skin is removed to obtain a suitable skin envelope. The breast then takes on a beautiful, firmer and more sustained appearance. The areola and nipple are then placed higher. The scars left by the operation are due to the suture of the edges of the skin that has been incised. When the ptosis is more serious, the scar takes on the appearance of an inverted T. It can be broken down as follows: a scar located all around the areola, at the level of the color demarcation of the skin; a vertical scar from the bottom of the areola and descending to the fold of the breast; and a horizontal scar (proportional to the operated ptosis) almost invisible in the fold of the breast.', 'lifting-mammaire-shema.jpg', 'Une fois l’intervention achevée, un bandage souple et maintenant la poitrine tel un soutien-gorge, est posé.', 'Once the procedure is completed, a soft bandage and now the chest like a bra, is placed.', '', '', '', '', '', '', '', '<b>Après l’opération:</b>\r\n– À la fin de l’opération, les seins sont fermement maintenus. – Après l’intervention, peu de douleurs se font ressentir, de simples antalgiques suffisent à les atténuer. – Les symptômes les plus courants sont : l’apparition d’un œdème des seins (gonflement) et d’ecchymoses (bleus), ainsi qu’une difficulté à lever les bras. – Un à deux jours après l’opération, le pansement initial est retiré au profit d’un bandage plus léger et plus souple, tel un bustier flexible prenant la forme des courbes du corps. – Il est recommandé de porter un soutien-gorge de contention pendant un mois après l’intervention, 24h/24. – Pour cette intervention, 7 à 10 jours d’arrêt de travail et de repos sont conseillés, et toute activité sportive doit être interrompue pendant un ou deux mois. – Il faut compter environ une année après l’opération pour apprécier les résultats. Sur le plan local, les seins sont symétriques, le rendu est naturel et harmonieux. Sur le plan général, cette opération a un impact positif sur la pratique d’activités sportives, la stabilité du poids, l’équilibre psychologique et le choix possible des tenues vestimentaires. – Il faut seulement patienter le temps imparti pour que les cicatrices s’estompent et veiller à respecter scrupuleusement les consignes de surveillance. – L’opération ne modifie ni la sensibilité ni le naturel des seins qui continuent, entre autres, de réagir en cas de modification hormonale ou de variation de poids. Complications envisageables: Concernant l’anesthésie : la patiente est informée des risques lors de la consultation avec le médecin anesthésiste. Il arrive que l’organisme réagisse de manière inattendue et difficilement contrôlable à l’anesthésie. Les risques sont toutefois quasiment négligeables si l’on fait appel à un anesthésiste réellement compétent et habitué à pratiquer en chirurgie. Il faut garder à l’esprit que ces deux dernières décennies, les produits, les techniques et les procédés utilisés en anesthésie ont vraiment progressé. Concernant l’acte chirurgical: les risques restent faibles (mais pas nuls) si le choix d’un chirurgien plasticien est fait prudemment et sérieusement en fonction de ses compétences pour pratiquer une telle intervention. Les complications suite à une chirurgie de la ptose mammaire, réalisée dans les règles de l’art, restent toutefois des cas isolés. La plupart des opérations se déroulent à merveille et les résultats enchantent pleinement les patientes. – Une infection, nécessitant la prise d’antibiotiques, voire un drainage chirurgical. – Un hématome, requérant un geste d’évacuation. – Une cicatrisation trop longue, prolongeant la phase post-opératoire. – Une partie de peau nécrosée, allongeant le temps de cicatrisation : fait très rare, grâce aux nouvelles techniques, risques accrus par le tabagisme. – Une désensibilisation partielle, notamment au niveau du mamelon : il faut attendre en général 6 à 18 mois pour retrouver une sensibilité totale. – Des cicatrices évoluant de manière inattendue vers un aspect hypertrophique, ou même chéloïde, perturbant le bon résultat esthétique et nécessitant de longs traitements au niveau local.', '<b> After the operation: </ b> - At the end of the operation, the breasts are firmly maintained. - After the intervention, little pain is felt, simple analgesics are enough to mitigate. - The most common symptoms are: the appearance of breast edema (swelling) and bruising (blue), as well as difficulty raising arms. - One to two days after the operation, the initial dressing is removed in favor of a lighter and more flexible bandage, such as a flexible bustier in the shape of the curves of the body. - It is recommended to wear a compression bra for one month after the intervention, 24 hours a day. - For this procedure, 7 to 10 days off work and rest are recommended, and any sports activity must be interrupted for one or two months. - It takes approximately one year after the operation to assess the results. On the local level, the breasts are symmetrical, the rendering is natural and harmonious. In general, this operation has a positive impact on the practice of sports activities, the stability of weight, the psychological balance and the possible choice of outfits. - It is only necessary to wait for the time allotted for the scars to fade away and take care to respect scrupulously the instructions of surveillance. - The operation does not change the sensitivity or the natural breasts that continue, among other things, to react in case of hormonal modification or weight change. Possible complications: Concerning anesthesia: the patient is informed of the risks during the consultation with the anesthesiologist. Sometimes the body reacts unexpectedly and difficultly to control anesthesia. The risks, however, are almost negligible if one appeals to a really competent anesthetist and used to practice in surgery. It must be kept in mind that over the last two decades the products, techniques and processes used in anesthesia have really progressed. Regarding the surgical act: the risks remain low (but not zero) if the choice of a plastic surgeon is made carefully and seriously according to his skills to perform such an intervention. Complications following a mammary ptosis surgery, performed in the state of the art, however, remain isolated cases. Most of the operations are going very well and the results are a delight for the patients. - An infection, requiring the taking of antibiotics, even surgical drainage. - A hematoma, requiring an evacuation gesture. - Healing too long, prolonging the post-operative phase. - A part of necrotic skin, prolonging the healing time: very rare, thanks to new techniques, risks increased by smoking. - Partial desensitization, especially at the nipple: it usually takes 6 to 18 months to regain full sensitivity. - Scars evolving unexpectedly towards a hypertrophic aspect, or even keloid, disrupting the good aesthetic result and requiring long treatments at the local level.', '', '', '', '', '', '', '', '2019-02-27 00:00:00'), (4, 1, 'Gynécomastie', 'Gynecomastia', 'Genycomastie.jpg', 'Phénomène très fréquent, la gynécomastie est une hypertrophie des seins chez l’homme entraînant un développement excessif de la glande mammaire…', 'Very common phenomenon, gynecomastia is a hypertrophy of the breasts in men leading to excessive development of the mammary gland ...', 'Gynecomastie.jpg', 'Une gynécomastie est définie par une augmentation du volume de la glande mammaire chez l’homme. Elle correspond à une hyperplasie uni ou bilatérale. Généralement elle est idiopathique, c’est à dire qu’il n’existe aucune cause à sa survenue ; cependant, dans certains cas elle peut être en rapport avec une production hormonale anormale, ou liée à la prise de certains médicaments. Elle est également associée à une prise de poids.\r\n\r\nL’augmentation du volume mammaire chez l’homme, notamment en période d’adolescence, est souvent mal vécue et peut poser de nombreux problèmes psychologiques. Cette atteinte physique chez l’adolescent, au moment même où il construit son image d’homme, peut entraîner un repli sur lui-même, voire un véritable complexe. De plus, cette gynécomastie peut s’avérer douloureuse.\r\n\r\nLe but de la chirurgie correctrice est de rétablir au mieux l’anatomie normale avec pour principes de :\r\n• Réduire le volume mammaire par exérèse chirurgicale directe (mastectomie sous-cutanée) pour les formes glandulaires, ou par lipoaspiration pour les formes graisseuses.\r\n\r\n• Diminuer l’excédent cutané: généralement, la diminution du volume glandulaire va permettre la rétraction cutanée. Cette rétraction cutanée est favorisée par la lipoaspiration mais elle est d’autant plus nette qu’il s’agit d’un homme jeune et que la peau est de bonne qualité (peau ferme, élastique, sans vergeture).', 'Gynecomastia is defined by an increase in the volume of the mammary gland in humans. It corresponds to a uni or bilateral hyperplasia. Generally it is idiopathic, that is to say that there is no cause for its occurrence; however, in some cases it may be related to abnormal hormonal production, or related to taking certain drugs. It is also associated with weight gain. The increase in breast volume in men, especially in adolescence, is often poorly experienced and can pose many psychological problems. This physical attack on the teenager, at the very moment when he builds his image of man, can lead to a retreat on himself, even a real complex. In addition, this gynecomastia can be painful. The purpose of the corrective surgery is to restore the normal anatomy with the principles of: • Reduce breast volume by direct surgical excision (subcutaneous mastectomy) for glandular forms, or by liposuction for fat forms. • Decrease the excess skin: usually, the reduction in glandular volume will allow skin retraction. This skin retraction is favored by liposuction but it is even more clear that it is a young man and the skin is good (firm skin, elastic, without stretch marks).', 'Genycomastie-avant-apres.jpg', 'gynecomastie-anatomie.jpg', '<b>Avant l’intervention:</b> – Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). L’opération se déroule sous anesthésie générale, et nécessite 1 à 2 jours d’hospitalisation. La durée d’intervention est variable en fonction du chirurgien et de la technique utilisée, pouvant aller de quelques minutes en cas de lipoaspiration isolée à deux heures pour les formes complexes nécessitant une réduction majeure. Dans l’intervention type, une incision est réalisée au bord inférieur de l’aréole. A partir de cette incision, le chirurgien peut enlever la glande mammaire (mastectomie sous-cutanée) et la graisse en trop. Souvent en plus de ce geste, le chirurgien peut pratiquer une lipoaspiration à la périphérie de l’excès glandulaire afin d’harmoniser l’ensemble et favoriser la rétraction cutanée. En cas de gynécomastie à prédominance graisseuse, l’exérèse peut se faire parfois par lipoaspiration seule. Les cicatrices sont alors très courtes et peuvent être situées à distance de la gynécomastie, comme au niveau des régions sous mammaire ou axillaire. Lorsque la gynécomastie et l’excès de peau sont très importants, le chirurgien peut être amené à faire des cicatrices plus longues et donc plus visibles. Ces cicatrices peuvent alors être péri- mamelonnaires (autour de l’aréole), horizontales et se prolonger de part et d’autre de l’aréole. En fin d’intervention, un pansement « modelant » est réalisé, souvent avec un bandage élastique.', '<b> Before the procedure: </ b> - A pre-operative check-up is carried out in accordance with the regulations. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). The operation is performed under general anesthesia, and requires 1 to 2 days of hospitalization. The duration of intervention varies according to the surgeon and the technique used, ranging from a few minutes in the case of isolated liposuction to two hours for complex forms requiring major reduction. In the typical procedure, an incision is made at the lower edge of the areola. From this incision, the surgeon can remove the mammary gland (subcutaneous mastectomy) and excess fat. Often in addition to this gesture, the surgeon may practice liposuction on the periphery of the excess glandular to harmonize the whole and promote skin retraction. In the case of predominantly fatty gynecomastia, excision can sometimes be done by liposuction alone. The scars are then very short and can be located at a distance from the gynecomastia, as in the regions under mammary or axillary. When gynecomastia and excess skin are very important, the surgeon may have to make scars longer and therefore more visible. These scars can then be perimethal (around the areola), horizontal and extend on both sides of the areola. At the end of the procedure, a \"modeling\" dressing is performed, often with an elastic bandage.', '', '<b>Avant l’intervention:</b> – Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). L’opération se déroule sous anesthésie générale, et nécessite 1 à 2 jours d’hospitalisation. La durée d’intervention est variable en fonction du chirurgien et de la technique utilisée, pouvant aller de quelques minutes en cas de lipoaspiration isolée à deux heures pour les formes complexes nécessitant une réduction majeure. Dans l’intervention type, une incision est réalisée au bord inférieur de l’aréole. A partir de cette incision, le chirurgien peut enlever la glande mammaire (mastectomie sous-cutanée) et la graisse en trop. Souvent en plus de ce geste, le chirurgien peut pratiquer une lipoaspiration à la périphérie de l’excès glandulaire afin d’harmoniser l’ensemble et favoriser la rétraction cutanée. En cas de gynécomastie à prédominance graisseuse, l’exérèse peut se faire parfois par lipoaspiration seule. Les cicatrices sont alors très courtes et peuvent être situées à distance de la gynécomastie, comme au niveau des régions sous mammaire ou axillaire. Lorsque la gynécomastie et l’excès de peau sont très importants, le chirurgien peut être amené à faire des cicatrices plus longues et donc plus visibles. Ces cicatrices peuvent alors être péri- mamelonnaires (autour de l’aréole), horizontales et se prolonger de part et d’autre de l’aréole. En fin d’intervention, un pansement « modelant » est réalisé, souvent avec un bandage élastique. Après l’opération – Les suites opératoires peuvent parfois être douloureuses les premiers jours. Un traitement antalgique, adapté à l’intensité des douleurs sera prescrit pendant quelques jours. – En cas de lipoaspiration isolée, le patient peut ressentir localement des douleurs à type de « fortes courbatures ». Œdème (gonflement), ecchymoses (bleus) et gêne à l’élévation des bras sont fréquents les premiers temps. – Le premier pansement est retiré après quelques jours. Il est alors remplacé par un pansement plus léger. Souvent, le pansement initial est compressif, puis, rapidement, un pansement plus léger est associé à un «boléro» ou un gilet de contention à porter jour et nuit pendant un certain temps. Cette contention aide à la rétraction cutanée et favorise une cicatrisation uniforme. – La durée totale d’arrêt de travail varie de cinq à vingt et un jour. Il est conseillé d’attendre un à deux mois avant de reprendre une activité sportive. – L’amélioration est souvent nette et immédiate. Cependant, un délai de deux à trois mois est nécessaire pour apprécier le résultat définitif. C’est le temps nécessaire pour que l’œdème post-opératoire disparaisse et que l’excédent cutané se rétracte. – La diminution du volume mammaire apporte un confort physique, notamment lors de l’habillement. Enfin le résultat est souvent très bénéfique sur le plan psychologique car une gynécomastie est souvent considérée comme une ombre à la virilité. Imperfections du résultat: • une asymétrie résiduelle de volume: elle peut être due à une exérèse moins importante d’un côté que de l’autre, notamment lorsqu’il existait déjà une asymétrie de volume avant l’intervention. Dans certains cas, l’asymétrie peut être liée à un œdème post-opératoire plus important d’un côté : dans ce cas, le port d’une gaine et l’action des massages permettront de corriger le défaut. • une asymétrie de hauteur des aréoles et des mamelons: l’asymétrie est souvent présente avant l’intervention ; cependant, vous n’y portiez que peu attention voire même, vous ne l’aviez pas remarquée. Après l’intervention, même si le chirurgien a essayé de la corriger, l’asymétrie peut persister et parfois être« démasquée », c’est à dire rendue plus visible. Dans d’autres cas, l’asymétrie peut être liée à la cicatrisation des tissus sous la peau. Des massages quotidiens associés à une bonne hydratation aideront à corriger le problème. • un excédent cutané: après la correction chirurgicale d’une gynécomastie, un excès cutané n’est pas rare et peut mettre plusieurs mois à se rétracter. La rétraction cutanée est liée à la qualité de la peau. Une retouche peut s’avérer souhaitable. • des zones en creux ou des petits nodules sous la peau: ils sont liés à la lipoaspiration qui dans certains cas peut majorer l’aspect de « cellulite ». Ce phénomène est normal : des massages quotidiens associés à une bonne hydratation permettront de fractionner ces nodules fibreux et d’éviter les adhérences en profondeur. Complications envisageables: – En ce qui concerne l’anesthésie, lors de la consultation pré-opératoire obligatoire, le médecin anesthésiste informera lui-même le patient des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles et plus ou moins faciles à maîtriser : le fait d’avoir recours à un anesthésiste parfaitement compétent, exerçant dans un contexte réellement chirurgical fait que les risques encourus sont devenus statistiquement extrêmement faibles. Il faut en effet garder à l’esprit que les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en dehors de l’urgence chez une personne en bonne santé. – En ce qui concerne le geste chirurgical, en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. En pratique, la grande majorité des cures de gynécomasties réalisées dans les règles se passe sans aucun problème. Les suites opératoires sont simples et les patients sont pleinement satisfaits de leur résultat. Pourtant, parfois, des complications peuvent malgré tout survenir : • Saignement postopératoire et hématome : un saignement peut survenir dans les heures qui suivent l’intervention. S’il est important, il se traduira par un gonflement et une tension douloureuse (hématome) et nécessitera un geste d’évacuation. • Phlébite et embolie pulmonaire : la reprise d’une marche très précoce permet de minimiser ce risque. • Infection postopératoire : elle peut se déclarer dans les jours qui suivent l’opération et se traduit par une fièvre, parfois supérieure à 39°C. La zone opérée est alors gonflée et rouge, douloureuse. Un traitement antibiotique peut suffire, mais souvent un geste chirurgical de drainage est nécessaire. • Nécrose cutanée : la peau a besoin d’une bonne alimentation vasculaire (apport en oxygène) pour vivre. Si la vascularisation est insuffisante ou de mauvaise qualité (traction importante, hématome, infection, tabagisme…), peut survenir une nécrose cutanée. Elle sera traitée par des soins et des pansements adaptés. La cicatrisation sera obtenue mais avec un certain retard. • Pneumothorax : très rare, il bénéficiera d’un traitement spécifique. • Troubles de la sensibilité cutanée : une altération de la sensibilité cutanée est fréquente les premiers mois puis s’estompe avant un retour à la normale.', '<b> Before the procedure: </ b> - A pre-operative check-up is carried out in accordance with the regulations. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). The operation is performed under general anesthesia, and requires 1 to 2 days of hospitalization. The duration of intervention varies according to the surgeon and the technique used, ranging from a few minutes in the case of isolated liposuction to two hours for complex forms requiring major reduction. In the typical procedure, an incision is made at the lower edge of the areola. From this incision, the surgeon can remove the mammary gland (subcutaneous mastectomy) and excess fat. Often in addition to this gesture, the surgeon may practice liposuction on the periphery of the excess glandular to harmonize the whole and promote skin retraction. In the case of predominantly fatty gynecomastia, excision can sometimes be done by liposuction alone. The scars are then very short and can be located at a distance from the gynecomastia, as in the regions under mammary or axillary. When gynecomastia and excess skin are very important, the surgeon may have to make scars longer and therefore more visible. These scars can then be perimethal (around the areola), horizontal and extend on both sides of the areola. At the end of the procedure, a \"modeling\" dressing is performed, often with an elastic bandage. After the operation - Operative follow-ups can sometimes be painful the first days. An analgesic treatment, adapted to the intensity of the pains will be prescribed for a few days. - In the case of isolated liposuction, the patient may experience pains of the type of \"severe body aches\". Edema (swelling), bruising (blue) and discomfort to elevation of the arms are common early. - The first dressing is removed after a few days. It is then replaced by a lighter dressing. Often, the initial dressing is compressive, and then, soon, a lighter dressing is associated with a \"bolero\" or vest to wear day and night for a while. This restraint helps skin retraction and promotes uniform healing. - The total duration of work stoppage varies from five to twenty-one days. It is advisable to wait one to two months before resuming a sporting activity. - The improvement is often sharp and immediate. However, a period of two to three months is necessary to assess the final result. This is the time needed for the postoperative edema to disappear and the excess skin retracts.', '', '<b>Après l’opération:</b> – Les suites opératoires peuvent parfois être douloureuses les premiers jours. Un traitement antalgique, adapté à l’intensité des douleurs sera prescrit pendant quelques jours. – En cas de lipoaspiration isolée, le patient peut ressentir localement des douleurs à type de « fortes courbatures ». Œdème (gonflement), ecchymoses (bleus) et gêne à l’élévation des bras sont fréquents les premiers temps. – Le premier pansement est retiré après quelques jours. Il est alors remplacé par un pansement plus léger. Souvent, le pansement initial est compressif, puis, rapidement, un pansement plus léger est associé à un «boléro» ou un gilet de contention à porter jour et nuit pendant un certain temps. Cette contention aide à la rétraction cutanée et favorise une cicatrisation uniforme. – La durée totale d’arrêt de travail varie de cinq à vingt et un jour. Il est conseillé d’attendre un à deux mois avant de reprendre une activité sportive. – L’amélioration est souvent nette et immédiate. Cependant, un délai de deux à trois mois est nécessaire pour apprécier le résultat définitif. C’est le temps nécessaire pour que l’œdème post-opératoire disparaisse et que l’excédent cutané se rétracte. – La diminution du volume mammaire apporte un confort physique, notamment lors de l’habillement. Enfin le résultat est souvent très bénéfique sur le plan psychologique car une gynécomastie est souvent considérée comme une ombre à la virilité. Imperfections du résultat: • une asymétrie résiduelle de volume: elle peut être due à une exérèse moins importante d’un côté que de l’autre, notamment lorsqu’il existait déjà une asymétrie de volume avant l’intervention. Dans certains cas, l’asymétrie peut être liée à un œdème post-opératoire plus important d’un côté : dans ce cas, le port d’une gaine et l’action des massages permettront de corriger le défaut. • une asymétrie de hauteur des aréoles et des mamelons: l’asymétrie est souvent présente avant l’intervention ; cependant, vous n’y portiez que peu attention voire même, vous ne l’aviez pas remarquée. Après l’intervention, même si le chirurgien a essayé de la corriger, l’asymétrie peut persister et parfois être« démasquée », c’est à dire rendue plus visible. Dans d’autres cas, l’asymétrie peut être liée à la cicatrisation des tissus sous la peau. Des massages quotidiens associés à une bonne hydratation aideront à corriger le problème. • un excédent cutané: après la correction chirurgicale d’une gynécomastie, un excès cutané n’est pas rare et peut mettre plusieurs mois à se rétracter. La rétraction cutanée est liée à la qualité de la peau. Une retouche peut s’avérer souhaitable. • des zones en creux ou des petits nodules sous la peau: ils sont liés à la lipoaspiration qui dans certains cas peut majorer l’aspect de « cellulite ». Ce phénomène est normal : des massages quotidiens associés à une bonne hydratation permettront de fractionner ces nodules fibreux et d’éviter les adhérences en profondeur. Complications envisageables: – En ce qui concerne l’anesthésie, lors de la consultation pré-opératoire obligatoire, le médecin anesthésiste informera lui-même le patient des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles et plus ou moins faciles à maîtriser : le fait d’avoir recours à un anesthésiste parfaitement compétent, exerçant dans un contexte réellement chirurgical fait que les risques encourus sont devenus statistiquement extrêmement faibles. Il faut en effet garder à l’esprit que les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en dehors de l’urgence chez une personne en bonne santé. – En ce qui concerne le geste chirurgical, en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. En pratique, la grande majorité des cures de gynécomasties réalisées dans les règles se passe sans aucun problème. Les suites opératoires sont simples et les patients sont pleinement satisfaits de leur résultat. Pourtant, parfois, des complications peuvent malgré tout survenir : • Saignement postopératoire et hématome : un saignement peut survenir dans les heures qui suivent l’intervention. S’il est important, il se traduira par un gonflement et une tension douloureuse (hématome) et nécessitera un geste d’évacuation. • Phlébite et embolie pulmonaire : la reprise d’une marche très précoce permet de minimiser ce risque. • Infection postopératoire : elle peut se déclarer dans les jours qui suivent l’opération et se traduit par une fièvre, parfois supérieure à 39°C. La zone opérée est alors gonflée et rouge, douloureuse. Un traitement antibiotique peut suffire, mais souvent un geste chirurgical de drainage est nécessaire. • Nécrose cutanée : la peau a besoin d’une bonne alimentation vasculaire (apport en oxygène) pour vivre. Si la vascularisation est insuffisante ou de mauvaise qualité (traction importante, hématome, infection, tabagisme…), peut survenir une nécrose cutanée. Elle sera traitée par des soins et des pansements adaptés. La cicatrisation sera obtenue mais avec un certain retard. • Pneumothorax : très rare, il bénéficiera d’un traitement spécifique. • Troubles de la sensibilité cutanée : une altération de la sensibilité cutanée est fréquente les premiers mois puis s’estompe avant un retour à la normale.', '<b> After the operation: </ b> - The postoperative course can sometimes be painful the first days. An analgesic treatment, adapted to the intensity of the pains will be prescribed for a few days. - In the case of isolated liposuction, the patient may experience pains of the type of \"severe body aches\". Edema (swelling), bruising (blue) and discomfort to elevation of the arms are common early. - The first dressing is removed after a few days. It is then replaced by a lighter dressing. Often, the initial dressing is compressive, and then, soon, a lighter dressing is associated with a \"bolero\" or vest to wear day and night for a while. This restraint helps skin retraction and promotes uniform healing. - The total duration of work stoppage varies from five to twenty-one days. It is advisable to wait one to two months before resuming a sporting activity. - The improvement is often sharp and immediate. However, a period of two to three months is necessary to assess the final result. This is the time needed for the postoperative edema to disappear and the excess skin retracts. - The reduction of the breast volume brings a physical comfort, in particular during the clothing. Finally, the result is often very beneficial psychologically because a gynecomastia is often considered a shadow to virility. Imperfections of the result: • a residual asymmetry of volume: it may be due to less excision on one side than the other, especially when there was already a volume asymmetry before the intervention. In some cases, the asymmetry may be related to a larger postoperative edema on one side: in this case, the wearing of a sheath and the action of massage will correct the defect. • an asymmetry of the areola and nipple height: asymmetry is often present before the intervention; however, you paid little attention to it or even you did not notice it. After the intervention, even if the surgeon tried to correct it, the asymmetry can persist and sometimes be \"unmasked\", ie made more visible. In other cases, asymmetry may be related to scarring of the tissues under the skin. Daily massages combined with good hydration will help correct the problem. • excess skin: after surgical correction of gynecomastia, excess skin is not uncommon and may take several months to retract. Skin retraction is related to the quality of the skin. Retouching may be desirable. • hollow areas or small nodules under the skin: they are related to liposuction which in some cases may increase the appearance of \"cellulite\". This phenomenon is normal: daily massages associated with good hydration will break these fibrous nodules and avoid deep adhesions. Possible complications: - As regards anesthesia, during the obligatory preoperative consultation, the anesthesiologist doctor will inform the patient of the anesthetic risks himself. It should be known that anesthesia induces in the body reactions sometimes unpredictable and more or less easy to control: the fact of having recourse to a perfectly competent anesthetist, exercising in a truly surgical context makes that the risks incurred have become statistically extremely weak.', '', '', '', '', '', '', '', '', '', '', '', '', '<b>Tarifs</b>\r\nLa gynécomastie coûte 1800 euros', '2019-01-17 00:00:00'); INSERT INTO `category` (`id`, `chirurgie_id`, `name`, `nameen`, `coverimage`, `description`, `descriptionen`, `backimage`, `details`, `detailsen`, `baimage`, `detailsimage`, `details1`, `details1en`, `detailsimage2`, `details2`, `details2en`, `detailsimage3`, `before_operation`, `before_operationen`, `before_operation1`, `before_operation1en`, `deroulement_operation`, `deroulement_operationen`, `after_operation`, `after_operationen`, `after_operation1`, `after_operation1en`, `complications`, `complicationsen`, `complications1`, `complications1en`, `tarifs`, `updated_at`) VALUES (5, 2, 'Lifting Du Visage', 'Facial Lifting', 'lifting-visage.jpg', 'Les signes de fatigue et de vieillesse commencent à jaillir sur votre visage? Optez pour un lifting! C’est le remède idéal pour paraître plus jeune en une seule intervention…', 'Are signs of tiredness and old age starting to spurt out on your face? Opt for a facelift! It is the ideal remedy to look younger in one intervention ...', 'lifting.jpg', '<b>Le lifting cervico-facial:</b>\r\n\r\nC’est le lifting le plus fréquemment réalisé; c’est la correction chirurgicale du vieillissement au niveau du cou ainsi qu’au niveau du visage depuis la région des tempes jusqu’à la région des bajoues.\r\n\r\nL’opération a pour but de traiter l’affaissement et le relâchement de la peau et des muscles du visage (tempes et sourcils, joues, bajoues, ovale du visage) et du cou mais également l’insuffisance ou l’excès de tissu graisseux.\r\nL’objectif d’une telle intervention n’est pas de changer la forme ni l’aspect du visage. Au contraire, la simple restauration des différentes structures anatomiques de la face et du cou (peau, muscle, graisse) permet à l’opéré(e) de retrouver l’aspect qui était le sien quelques années auparavant.\r\n\r\nLes muscles sont remis en tension, de manière à corriger leur relâchement. La peau est ensuite redrapée à la demande sur les nouveaux galbes, sans traction excessive. Cette double action permet d’obtenir un résultat naturel (car la peau n’est pas trop tirée), durable (car le plan musculaire est solide), des suites opératoires en général assez simples (la peau « marque » moins parce qu’elle est peu traumatisée, du fait de la tension et du décollement limités).\r\n\r\nLe lifting cervico-facial peut être fait dès que les signes de vieillissement apparaissent ( relâchement des joues, du cou, dégradation des lignes du visage) et qu’une demande de correction motivée en est formulée, généralement à partir de 40 ou 45 ans.\r\nCette intervention peut être associée à un autre geste de chirurgie esthétique faciale : chirurgie esthétique des paupières (blépharoplastie), correction de l’affaissement de la partie latérale du sourcil et correction de la patte d’oie (lifting temporal), ou correction de l’affaissement et des rides du front (lifting frontal conventionnel ou endoscopique).\r\n\r\nLe lipofilling du visage\r\n\r\nLe principe du lipofilling est de réaliser une véritable auto-greffe de cellules graisseuses par réinjection de la graisse prélevée sur le patient lui-même.\r\n\r\nLes objectifs et les indications de cet intervention est:\r\n\r\n• Le comblement et l’atténuation de certaines rides ou sillons, notamment au niveau du visage, lors des premiers stades du vieillissement facial.\r\n\r\n• La restauration des volumes et des formes du visage : il peut s’agir notamment de la restauration d’un visage émacié par le vieillissement.\r\n• Un complément associé à certains liftings cervico-faciaux pour améliorer l’harmonie du visage.\r\n\r\n• Secondairement, après un premier lifting, pour améliorer le galbe du tiers moyen de la face sans avoir recours à un nouveau lifting.\r\n\r\nEn réinjectant dans le visage la graisse prélevée par liposuccion, le lipofilling permet de combler les creux et de créer des volumes pour un effet repulpant rajeunissant. Parce qu’il offre des résultats naturels, le lipofilling du visage rencontre un franc succès auprès des visages émaciés par le vieillissement et marqués par la fatigue.', '<b> The cervicofacial lift: </ b> This is the most frequently performed facelift; it is the surgical correction of aging at the neck as well as at the level of the face from the region of the temples to the region of the jowls. The operation aims to treat the sagging and sagging of the skin and the muscles of the face (temples and eyebrows, cheeks, jowls, oval of the face) and the neck but also the insufficiency or excess of fatty tissue . The purpose of such an intervention is not to change the shape or appearance of the face. On the contrary, the simple restoration of the various anatomical structures of the face and neck (skin, muscle, fat) allows the patient (e) to find the aspect that was hers a few years ago. The muscles are put back in tension, so as to correct their relaxation. The skin is then redraped on demand on the new curves, without excessive traction. This double action makes it possible to obtain a natural result (because the skin is not too drawn), durable (because the muscular plan is solid), operating sequences in general quite simple (skin \"mark\" less because it is little traumatized, due to the limited tension and delamination). Cervico-facial lifting can be done as soon as the signs of aging appear (relaxation of the cheeks, neck, degradation of facial lines) and a request for a reasoned correction is formulated, usually from 40 or 45 years. This procedure can be combined with another procedure of facial cosmetic surgery: cosmetic eyelid surgery (blepharoplasty), correction of the sagging of the lateral part of the eyebrow and correction of the crow\'s feet (temporal lifting), or correction of the sagging and forehead wrinkles (conventional or endoscopic face lift). Lipofilling of the face The principle of lipofilling is to perform a true auto-graft of fat cells by reinjection of the fat taken from the patient himself. The objectives and indications of this intervention is: • The filling and attenuation of certain wrinkles or furrows, particularly in the face, during the early stages of facial aging. • The restoration of volumes and facial shapes: this may include the restoration of a face emaciated by aging. • A complement associated with certain cervico-facial facelifts to improve the harmony of the face. • Secondarily, after a first facelift, to improve the curve of the middle third of the face without having recourse to a new facelift. By re-injecting liposuction-collected fat into the face, lipofilling can fill in the gaps and create volumes for a plumping rejuvenating effect. Because it offers natural results, facial lipofilling is a hit with faces emaciated by aging and marked by fatigue.', 'face_lift.jpg', 'lifting-methode.jpg', '<b>Avant l’opération:</b> – Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours (3 semaines dans le cas d’un lifting cervico-facial) précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention).', '<b> Before the operation: </ b> - A usual pre-operative check-up is carried out according to the prescriptions. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No drug containing aspirin should be taken within 10 days (3 weeks in the case of a cervicofacial lift) before the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention).', '', '<b>Déroulement de l’opération: </b>Lifting cervico-facial Le lifting cervico-facial peut être réalisé sous anesthésie générale ou sous anesthésie locale approfondie par des tranquillisants administrés par voie intra-veineuse. Le choix entre ces différentes techniques sera le fruit d’une discussion entre vous, l’anesthésiste et le chirurgien. Une hospitalisation de 24 à 48 heures est habituellement nécessaire. En fonction du chirurgien, de l’importance des corrections à apporter et des gestes éventuellement associés, l’intervention peut durer de deux à quatre heures. L’incision est en grande partie cachée dans les cheveux et au pourtour de l’oreille. A partir des incisions, un décollement est fait sous la peau; son étendue est fonction de chaque cas, notamment de l’importance du relâchement des tissus. On procède ensuite à une remise en tension extrêmement précise et dosée du plan musculo-aponévrotique, afin de corriger l’affaissement profond, tout en conservant au visage son expression naturelle. En cas de surcharge graisseuse localisée, une lipoaspiration ou lipectomie aux ciseaux est effectuée dans le même temps opératoire: elle peut agir sur le cou, le menton, les bajoues et les joues. A contrario, en cas de perte de volume, le lipofilling s’avérera souvent efficace pour hamoniser le résultat final. La peau redrapée naturellement vient épouser la forme créée par la mobilisation musculaire, la lipoaspiration. L’excédent cutané est supprimé, les sutures faites sans tension. En fin d’intervention, la plupart des chirurgiens réalisent un pansement qui fait le tour de la tête. Le lifting chez l’homme comporte quelques particularités (peau plus épaisse, déplacement des zones pileuses, chevelure plus clairsemée masquant moins discrètement les cicatrices) dont votre chirurgien vous entretiendra.', '<b> Procedure of the operation: </ b> Cervico-facial lifting The cervicofacial lifting can be performed under general anesthesia or under local anesthesia with intravenous tranquilizers administered. The choice between these different techniques will be the result of a discussion between you, the anesthesiologist and the surgeon. A hospital stay of 24 to 48 hours is usually required. Depending on the surgeon, the importance of the corrections to make and the actions possibly associated, the intervention can last from two to four hours. The incision is largely hidden in the hair and around the ear. From the incisions, a detachment is made under the skin; its extent depends on each case, especially the importance of loosening of tissue. This is followed by an extremely accurate and meticulous resetting of the musculo-aponeurotic plane, in order to correct the deep sagging, while preserving the face\'s natural expression. In case of localized fat overload, a lipoaspiration or scissor lipectomy is performed at the same time: it can act on the neck, chin, jowls and cheeks. On the other hand, in the event of a loss of volume, lipofilling will often be effective in harmonizing the final result. The skin redrapée naturally comes to marry the form created by the muscular mobilization, the lipoaspiration. The excess skin is removed, the sutures made without tension. At the end of the procedure, most surgeons make a bandage that goes around the head. The facelift in men has some peculiarities (thicker skin, moving hairy areas, more sparse hair masking less discreetly scars) that your surgeon will talk to you.', '', '<b>Le lipofilling du visage</b> l’opération est habituellement réalisée sous anesthésie locale approfondie par des tranquillisants administrés par voie intra-veineuse. Le choix entre ces différentes techniques sera le fruit d’une discussion entre vous, le chirurgien et l’anesthésiste. Cette chirurgie est le plus souvent réalisée en ambulatoire, l’entrée et la sortie se faisant le même jour. Il peut être indiqué de rester hospitalisé la nuit qui suit l’intervention. La durée de l’intervention est fonction de la quantité de graisse à réinjecter et du nombre de localisations à traiter. Elle peut varier de 30 minutes à 2 heures en cas de lipostructure isolée. On commence par procéder à un repérage précis des zones de prélèvement de la graisse, ainsi que des sites de réinjection. On procède ensuite à une remise en tension extrêmement précise et dosée du plan musculo-aponévrotique, afin de corriger l’affaissement profond, tout en conservant au visage son expression naturelle. Le prélèvement du tissu graisseux est effectué de façon atraumatique par une micro-incision cachée dans les plis naturels, à l’aide d’une très fine canule d’aspiration. On aura choisi une région discrète où il existait une réserve, voire un excès de tissu graisseux. On procède ensuite à une centrifugation, de manière à séparer les cellules graisseuses intactes, qui seront greffées, des éléments qui ne sont pas greffables. La réinjection du tissu graisseux se fait à partir d’incisions de 1 mm à l’aide de micro-canules. On procède ainsi à l’injection de micro-particules de graisse dans différents plans et selon des directions multiples et divergentes, afin d’augmenter la surface de contact entre les cellules implantées et les tissus receveurs, ce qui améliore la survie des cellules adipeuses greffées. Dans la mesure où il s’agit d’une véritable prise de greffes de cellules vivantes, et sous réserve que la technique soit bonne et la prise de greffe effective, les cellules ainsi greffées resteront vivantes au sein de l’organisme, ce qui fait de la technique de lipostructure une technique définitive puisque les cellules adipeuses ainsi greffées vivront aussi longtemps que les tissus qui se trouvent autour d’elles.', '<b> Lipofilling of the face </ b> The operation is usually performed under local anesthetic deepened by tranquillizers administered intravenously. The choice between these different techniques will be the result of a discussion between you, the surgeon and the anesthesiologist. This surgery is most often performed outpatient, the entry and exit being the same day. It may be appropriate to remain hospitalized the night following the procedure. The duration of the intervention depends on the amount of fat to be reinjected and the number of locations to be treated. It can vary from 30 minutes to 2 hours in case of isolated lipostructure. We begin by making a precise identification of the areas of fat sampling, as well as sites of reinjection. This is followed by an extremely accurate and meticulous resetting of the musculo-aponeurotic plane, in order to correct the deep sagging, while preserving the face\'s natural expression. The removal of fatty tissue is performed atraumatically by a micro-incision hidden in the natural folds, using a very fine suction cannula. We will have chosen a discrete region where there was a reserve, or even an excess of fatty tissue. The centrifugation is then carried out so as to separate the intact fat cells, which will be grafted, from elements that are not graftable. The reinjection of the fatty tissue is made from incisions of 1 mm using micro-cannulas. In this way, micro-grease particles are injected in different planes and in multiple and divergent directions in order to increase the contact surface between the implanted cells and the recipient tissues, which improves the survival of the grafted adipose cells. . As long as it is a true transplantation of living cells, and provided that the technique is good and effective engraftment, the cells thus transplanted will remain alive in the body, which makes of the technique of lipostructure a definitive technique since the adipose cells thus grafted will live as long as the tissues that are around them.', '<b>Après l’opération:</b> Lifting cervico-facial: – Les 10 premiers jours, il faut se reposer au maximum et éviter tout effort violent. Au cours de ces premiers jours, l’opéré(e) ne doit ni s’étonner ni s’inquiéter : – d’un œdème (gonflement) qui peut être plus accentué le deuxième jour que le premier, – d’ecchymoses (bleus) dans la région du cou et du menton, – d’une sensation de tension douloureuse ou désagréable, surtout en arrière des oreilles, et autour du cou. – Ces ecchymoses et ces oedèmes disparaissent en moyenne dans les 2 semaines post-opératoires. – Au bout du premier mois, le gonflement a en général presque disparu. Mais il persiste une légère induration des zones décollées, plus palpable que visible. – Les oreilles et les joues ne retrouvent leur sensibilité normale que quelques mois plus tard. – Parfois, on peut observer, pendant plusieurs semaines voire plusieurs mois après l’intervention, une sensation d’inconfort, de tension des tissus, de pesanteur un peu désagréable, qui finit par disparaître. – Les cicatrices sont cachées en avant et en arrière par les cheveux. La seule zone légèrement visible, en avant du lobe de l’oreille, peut être temporairement masquée par la coiffure ou le maquillage. – Au bout de un à trois mois, on peut avoir une bonne idée du résultat définitif. Mais les cicatrices sont encore un peu rosées et indurées et ne s’atténuent que vers le sixième mois. Lipofilling du visage: Elles concernent directement la (les) zone(s) injectée(s), mais peuvent aussi intéresser (les) zone(s) prélevée(s). – Dans les suites opératoires, les douleurs sont en règle générale peu importantes. – Un gonflement des tissus (œdème) apparaît pendant les 48 heures suivant l’intervention et mettra en général 5 à 15 jours à être totalement résorbé. – Des ecchymoses (bleus) apparaissent dans les premières heures au niveau des zones de réinjection graisseuses : elles se résorbent dans un délai de 10 à 20 jours après l’intervention. – Ainsi, si la récupération physique est habituellement rapide du fait du caractère léger et superficiel de l’intervention, il conviendra de bien tenir compte de l’importance de la gêne sociale entraînée par l’œdème et les ecchymoses, afin d’adapter sa vie familiale, professionnelle et sociale. – Il convient de ne pas exposer au soleil ou aux U.V. les régions opérées avant 4 semaines au moins, ce qui ferait courir le risque de pigmentation définitive. – Après résorption des phénomènes d’œdème et d’ecchymoses, le résultat commence à apparaître dans un délai de 2 à 3 semaines après l’intervention. – Le résultat est apprécié dans un délai de 3 à 6 mois après l’intervention. Complications envisageables: • Un hématome pouvant nécessiter une évacuation rapide. • Une souffrance voire une nécrose cutanée localisée, responsable d’un retard de cicatrisation (le risque en est très accru par l’intoxication tabagique). • L’infection est exceptionnelle. • Des lésions nerveuses: la lésion d’une branche du nerf facial, susceptible d’entraîner une parésie, voire une paralysie faciale est exceptionnelle et les séquelles disparaissent le plus sou- vent en quelques mois. Plus rarement encore, peut survenir une paralysie du nerf spinal (nerf de l’élévation de l’épaule). • Des altérations de la sensibilité peuvent parfois persister, notamment à proximité des cicatrices autour des oreilles, même si la sensibilité redevient le plus souvent normale dans un délai de 3 à 12 mois. • Des cicatrices anormales, hypertrophiques voire chéloïdes, d’apparition et d’évolution imprévisibles, peuvent compromettre l’aspect esthétique du résultat et requièrent des traitements locaux spécifiques parfois prolongés. Au total, il ne faut pas surévaluer les risques mais simple- ment prendre conscience qu’une intervention chirurgicale, même apparemment simple, comporte toujours une petite part d’aléas. Le recours à un Chirurgien Plasticien qualifié vous assure que celui-ci a la formation et la compétence requises pour savoir éviter ces complications, ou les traiter efficacement le cas échéant.', '<b> After the operation: </ b> Cervico-facial lifting: - The first 10 days, you must rest to the maximum and avoid any violent effort. During these first days, the patient should not be surprised or worried: - Edema (swelling) that may be more accentuated on the second day than the first, - Bruising (bruises ) in the region of the neck and chin, - painful or uncomfortable feeling of tension, especially behind the ears, and around the neck. - These bruises and edema disappear on average in 2 weeks postoperatively. At the end of the first month, the swelling has generally disappeared. But it persists a slight induration of the detached areas, more palpable than visible. - The ears and cheeks do not regain their normal sensitivity until a few months later. - Sometimes, we can observe, for several weeks or even months after the intervention, a feeling of discomfort, tissue tension, gravity a little unpleasant, which eventually disappear. - The scars are hidden in front and behind by the hair. The only slightly visible area, in front of the ear lobe, may be temporarily masked by the hairstyle or make-up. - After one to three months, we can have a good idea of ​​the final result. But the scars are still a little pink and indurated and only fade around the sixth month. Lipofilling of the face: They directly concern the zone (s) injected (s), but may also interest (the) area (s) taken (s). - In the postoperative period, the pains are generally not important. - Swelling of the tissues (edema) occurs during the 48 hours following the procedure and will generally take 5 to 15 days to be completely resorbed. - Bruising (blue) appear in the first hours in the areas of fat reinjection: they resorb within 10 to 20 days after the procedure. - Thus, if the physical recovery is usually rapid because of the light and superficial nature of the intervention, it will be necessary to take into account the importance of the social discomfort caused by the edema and the bruises, in order to adapt its family, professional and social life. - It should not be exposed to sun or U.V. regions operated before 4 weeks at least, which would run the risk of permanent pigmentation. - After resorption of edema and bruising, the result begins to appear within 2 to 3 weeks after the procedure. - The result is appreciated within 3 to 6 months after the intervention. Possible complications: • A hematoma that may require rapid evacuation. • Localized suffering or skin necrosis, which is responsible for delayed healing (the risk is greatly increased by smoking intoxication). • The infection is exceptional. • Nerve damage: the lesion of a branch of the facial nerve, which can lead to paresis or even facial paralysis, is exceptional and the sequelae disappear most often in a few months. Even more rarely, there may be paralysis of the spinal nerve (nerve of the elevation of the shoulder). • Changes in sensitivity can sometimes persist, especially near the scars around the ears, even if the sensitivity returns to normal most often within 3 to 12 months. • Abnormal, hypertrophic or even keloid scars, of unpredictable appearance and evolution, may compromise the aesthetic appearance of the result and require specific local treatments, sometimes prolonged. All in all, we should not overstate the risks, but simply realize that even a seemingly simple surgical procedure always involves a small amount of hazard. The use of a qualified plastic surgeon ensures that he has the training and skills required to know how to avoid these complications, or treat them effectively if necessary.', '', '', '', '', '', '', '', '', '', '', '<b>Tarifs:</b>\r\nLe lifting cervico-facial coûte <b>1900 euros</b> Le lifting complet coûte <b>2600 euros</b> Le lipofilling du visage coûte 1600 euros', '2019-01-17 00:00:00'), (6, 2, 'Rhinoplastie', 'Rhinoplasty', 'Rhinoplastie.jpg', 'Nez trop long, trop large, crochu ou bossu? Cette opération de chirurgie du nez permet de rectifier ces petites imperfections parfois sources de grands complexes…', 'Nose too long, too broad, crooked or hunched? This operation of surgery of the nose makes it possible to rectify these small imperfections sometimes sources of big complexes ...', 'Rhinoplastie-couverture.jpg', 'La rhinoplastie est l’opération de chirurgie esthétique du nez, il en existe deux types: – fonctionnelle, soit une opération de chirurgie réparatrice d’ordre ORL, qui consiste à redresser la cloison nasale des personnes souffrant de difficulté respiratoire. – correctrice, c’est-à-dire une opération de chirurgie plastique d’ordre esthétique, qui consiste à modifier la morphologie du nez au niveau des os supérieurs ou des cartilages. Bien qu’ayant différents objectifs, ces deux types de chirurgie du nez peuvent être réalisés en même temps. Cette intervention peut-être demandée dès l’âge de 16 ans, lorsque la croissance se finie.', 'Rhinoplasty is the operation of cosmetic surgery of the nose, there are two types: - functional, a surgical operation repair ENT order, which consists of straightening the nasal septum of people suffering from respiratory difficulty. - corrective, that is to say an aesthetic plastic surgery operation, which consists of changing the morphology of the nose at the level of the upper bones or cartilages. Although having different objectives, these two types of nose surgery can be performed at the same time. This intervention can be requested from the age of 16, when the growth is over.', 'rhinoplastieavantapres.jpg', '', '<b>Avant l’intervention:</b>\r\n– Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention. – Il est fondamental de rester à jeun (ne rien manger ni boire) 6 heures avant l’intervention.', '<b> Before the intervention: </ b> - A usual preoperative assessment is carried out according to the prescriptions. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention. - It is essential to remain fasting (do not eat or drink anything) 6 hours before the procedure.', 'Rhinoplastie-explication.jpg', '<b>Déroulement de l’opération:</b>\r\nSelon qu’il s’agisse d’une réduction de la partie osseuse, d’une bosse ou des cartilages, l’intervention se fait sous anesthésie générale ou locale. Elle dure entre 45min et 2h00. L’hospitalisation dure 1 ou 2 jours. Les incisions sont dissimulées, le plus souvent à l’intérieur des narines ou sous la lèvre supérieure, et il n’en résulte donc aucune cicatrice visible à l’extérieur. Pour corriger une bosse du nez trop visible, le chirurgien retirera l’excès osseux. L’espace crée par la suppression de la bosse est resserré de telle sorte que le nez devienne non seulement plus droit, voir creusé selon le souhait de la patiente, mais aussi plus fin de profil. Si votre souhait est de modifier l’aspect de votre nez sur sa pointe, plusieurs techniques seront envisagées pour que celle-ci soit plus fine : la réduction de cartilage alaire (qui forme la pointe du nez), la suture de cartilages entre eux ou bien encore l’ajout de greffons de cartilages pour remodeler le nez selon ses souhaits. Pansements et attelles: Les fosses nasales peuvent être méchées avec différents matériaux absorbants. Un pansement modelant est souvent réalisé à la surface du nez à l’aide de petites bandelettes adhésives. Enfin, une attelle de maintien et de protection, en plâtre ou en matière plastique ou métallique, est moulée et fixée sur le nez, pouvant parfois remonter sur le front.', '<b> Progress of the operation: </ b> Depending on whether it is a reduction of the bone, a lump or cartilage, the intervention is done under general or local anesthesia. It lasts between 45min and 2h00. The hospitalization lasts 1 or 2 days. The incisions are concealed, usually inside the nostrils or under the upper lip, and therefore no visible scar on the outside. To correct a lump of the nose that is too visible, the surgeon will remove the excess bone. The space created by the removal of the hump is tightened so that the nose becomes not only upright, see dug according to the wish of the patient, but also more end of profile. If your wish is to change the appearance of your nose on its tip, several techniques will be considered so that it is finer: the reduction of alar cartilage (which forms the tip of the nose), the suture of cartilage between them or even more the addition of cartilage grafts to reshape the nose according to his wishes. Dressings and splints: The nasal fossae can be wicked with different absorbent materials. A modeling dressing is often made on the surface of the nose using small adhesive strips. Finally, a splint of support and protection, in plaster or in plastic or metal material, is molded and fixed on the nose, sometimes able to go up on the forehead.', '', '<b>Après l’opération:</b>\r\n– Les suites sont rarement douloureuses et c’est plutôt l’impossibilité de respirer par le nez (du fait de la présence des mèches) qui constitue le principal désagrément des premiers jours. – On observe, surtout au niveau des paupières, l’apparition d’un œdème (gonflement) et parfois d’ecchymoses (bleus) dont l’importance et la durée sont très variables d’un individu à l’autre. – Il est recommandé de se reposer et de ne faire aucun effort les jours suivant l’intervention. – Les mèches sont ôtées entre le 1er et le 5ème jour post-opératoires. L’attelle est retirée entre le 5ème et le 8ème jour, où elle sera parfois remplacée par une nouvelle attelle plus petite pour encore quelques jours. – Le nez apparaîtra alors encore assez massif du fait de l’œdème et une gêne respiratoire sera encore présente, due au gonflement de la muqueuse et à la formation possible de croûtes dans les fosses nasales. – Les stigmates de l’intervention vont s’atténuer progressivement, permettant le retour à une vie socio-professionnelle normale après quelques jours (10 à 20 jours selon les cas). – Il conviendra de se protéger du soleil les premières semaines, notamment tant qu’il persistera des ecchymoses. – Les sports et activités violentes sont à éviter les 3 premiers mois – Un délai de deux à trois mois est nécessaire pour avoir un bon aperçu du résultat, en sachant que l’aspect définitif ne sera obtenu qu’après six mois à un an de lente et subtile évolution.', '<b> After the operation: </ b> - The consequences are rarely painful and it is rather the impossibility of breathing through the nose (because of the presence of wicks) which is the main inconvenience of the first days. - Especially at the level of the eyelids, the appearance of edema (swelling) and sometimes of bruising (bruises) whose importance and duration vary widely from one individual to another. - It is recommended to rest and make no effort the days following the procedure. - The locks are removed between the 1st and 5th postoperative day. The splint is removed between the 5th and 8th day, where it will sometimes be replaced by a new smaller splint for a few more days. - The nose will appear still quite massive because of edema and respiratory discomfort will still be present, due to swelling of the mucosa and the possible formation of crusts in the nasal cavity. - The stigma of the intervention will gradually diminish, allowing the return to a normal socio-professional life after a few days (10 to 20 days depending on the case). - It will be necessary to protect oneself from the sun during the first weeks, especially as long as there are still bruises. - Sports and violent activities to avoid the first 3 months - A period of two to three months is necessary to have a good overview of the result, knowing that the final aspect will be obtained after six months to a year of slow and subtle evolution.', '<b>Les imperfections et complications envisageables:</b>\r\n– Les imperfections de résultat peuvent résulter d’un malentendu concernant les buts à atteindre ou survenir du fait de phénomènes cicatriciels inhabituels ou de réactions tissulaires inattendues (mauvais redrapage spontané de la peau, fibrose rétractile). Ces petites imperfections, si elles sont mal supportées, pourront éventuellement être corrigées par une retouche chirurgicale, en général beaucoup plus simple que l’intervention initiale, tant du point de vue technique que des suites opératoires. Une telle retouche ne peut toutefois pas être réalisée avant plusieurs mois afin d’agir sur des tissus stabilisés et ayant atteint une bonne maturation cicatricielle. – En ce qui concerne l’anesthésie, lors de la consultation, le médecin anesthésiste informera lui-même le patient des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles, et plus ou moins faciles à maîtriser : le fait d’avoir recours à un Anesthésiste parfaitement compétent, exerçant dans un contexte réellement chirurgical, fait que les risques encourus sont devenus statistiquement très faibles. Il faut savoir, en effet, que les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en de- hors de l’urgence et chez une personne en bonne santé. – En ce qui concerne le geste chirurgical : en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. Heureusement, les vraies complications sont rares à la suite d’une rhinoplastie réalisée dans les règles. En pratique, l’immense majorité des interventions se passe sans aucun problème et les patient(e)s sont pleinement satisfait(e)s de leur résultat. Pour autant, et malgré leur rareté, vous devez être informé(e) des complications possibles : • Saignements : ils sont possibles les premières heures mais restent habituellement très modérés. Quand ils sont trop importants, cela peut justifier un nouveau méchage plus poussé, voire une reprise au bloc opératoire. • Hématomes : ils peuvent nécessiter une évacuation s’ils sont volumineux ou trop douloureux. • Infection : malgré la présence naturelle de microbes dans les fosses nasales, elle est très rare. Le cas échéant, elle justifie rapidement un traitement approprié. • Cicatrices inesthétiques : elles ne peuvent concerner que les cicatrices externes (quand elles existent) et ne sont que très rarement disgracieuses au point de nécessiter une retouche. • Atteintes cutanées : bien que rares, elles sont toujours possibles, souvent par le fait de l’attelle nasale ou du tabac. Les simples plaies ou érosions cicatrisent spontanément sans laisser de traces, contrairement aux nécroses cutanées, heureusement exceptionnelles, qui laissent souvent une petite zone de peau cicatricielle. • Atteintes muqueuses et cartilagineuses : quelques rares cas de perforation de la cloison nasale ont été rapportés quand celle-ci a dû être remaniée. Cette perforation septale passe souvent inaperçue mais peut parfois générer un sifflement gênant et justifier alors une réparation chirurgicale. Au total, il ne faut pas surévaluer les risques, mais simplement prendre conscience qu’une intervention chirurgicale, même apparemment simple, comporte toujours une petite part d’aléas. Le recours à un Chirurgien Plasticien qualifié vous assure que celui-ci a la formation et la compétence requise pour savoir éviter ces complications, ou les traiter efficacement le cas échéant.', '<b> Possible imperfections and complications: </ b> - Imperfections of result may result from a misunderstanding concerning the goals to be achieved or arise due to unusual scarring phenomena or unexpected tissue reactions (poor spontaneous skin lift, retractile fibrosis). These small imperfections, if they are poorly supported, may eventually be corrected by a surgical retouch, usually much simpler than the initial intervention, both from the technical point of view and afterwards. However, such a retouching can not be performed for several months in order to act on stabilized tissues that have achieved good cicatricial maturation. - With regard to anesthesia, during the consultation, the anesthesiologist doctor will inform the patient of the anesthetic risks. It should be known that anesthesia induces in the body reactions sometimes unpredictable, and more or less easy to control: the fact of having recourse to a perfectly competent anesthetist, exercising in a really surgical context, makes that the risks incurred are become statistically very weak. In fact, techniques, anesthetic products and surveillance methods have made tremendous progress over the last thirty years, providing optimum safety, especially when the intervention is performed outside the emergency department. and in a healthy person. - Regarding the surgical procedure: by choosing a qualified and competent Plastic surgeon, trained in this type of intervention, you minimize these risks, but do not completely eliminate them. Fortunately, true complications are rare as a result of rhinoplasty performed properly. In practice, the vast majority of the interventions go on without any problem and the patients are fully satisfied with their results. However, despite their rarity, you must be aware of possible complications: • Bleeding: they are possible the first hours but usually remain very moderate. When they are too important, this may justify a new more thorough wetting, or even recovery in the operating room. • Hematoma: they may require evacuation if they are bulky or too painful. • Infection: despite the natural presence of microbes in the nasal cavity, it is very rare. If necessary, it quickly justifies appropriate treatment. • Unsightly scars: they can only concern external scars (when they exist) and are very rarely unsightly to the point of requiring retouching. • Skin disorders: although rare, they are always possible, often because of the nasal splint or tobacco. The simple wounds or erosions heal spontaneously without leaving traces, unlike the cutaneous necroses, fortunately exceptional, which often leave a small area of ​​cicatricial skin. • Mucous and cartilaginous lesions: a few rare cases of perforation of the nasal septum have been reported when it had to be remodeled. This septal perforation often goes unnoticed but can sometimes generate an annoying whistling and then justify a surgical repair. In total, one should not overstate the risks, but simply be aware that a surgical procedure, even apparently simple, always has a small share of hazards. The use of a qualified plastic surgeon assures you that he has the training and competence required to know how to avoid these complications, or treat them effectively if necessary.', '', '', '', '', '', '', '', '', '', '', '<b>Tarifs:</b>\r\nLa rhinoplastie simple coûte 1600 euros La rhinoplastie ethnique coûte <b>1850 euros</b>', NULL); INSERT INTO `category` (`id`, `chirurgie_id`, `name`, `nameen`, `coverimage`, `description`, `descriptionen`, `backimage`, `details`, `detailsen`, `baimage`, `detailsimage`, `details1`, `details1en`, `detailsimage2`, `details2`, `details2en`, `detailsimage3`, `before_operation`, `before_operationen`, `before_operation1`, `before_operation1en`, `deroulement_operation`, `deroulement_operationen`, `after_operation`, `after_operationen`, `after_operation1`, `after_operation1en`, `complications`, `complicationsen`, `complications1`, `complications1en`, `tarifs`, `updated_at`) VALUES (7, 2, 'Blépharoplastie\r\n', 'Blepharoplasty', 'Blepharoplastie-1.jpg', 'Voici la solution pour diminuer les signes de vieillissement présents au niveau des paupières et de remplacer l’aspect « fatigué» du regard par une apparence plus reposée et détendue… ', 'Here is the solution to reduce the signs of aging present in the eyelids and replace the appearance \"tired\" look by a more relaxed and relaxed appearance ...', 'Blepharoplastie-couverture.jpg', 'Les <b>blépharoplasties</b> désignent les interventions de chirurgie esthétique des paupières qui visent à supprimer certaines disgrâces, qu’elles soient héréditaires ou dues à l’âge. Elles peuvent concerner uniquement les deux paupières supérieures ou inférieures, ou encore les quatre paupières à la fois. Les disgrâces les plus communément en cause sont les suivantes : – Paupières supérieures lourdes et tombantes, avec excès de peau formant un repli plus ou moins marqué – Paupières inférieures affaissées et flétries avec petites rides horizontales consécutives à la distension cutanée – Hernies de graisse, responsables de «poches sous les yeux» au niveau des paupières inférieures ou de paupières supérieures «bouffies ». L’intervention vise à corriger ces disgrâces de façon durable, en supprimant chirurgicalement les excès cutanés et musculaires ainsi que les protrusions graisseuses, et en préservant naturellement les fonctions essentielles des paupières.', '<B> blepharoplasty </ b> refers to cosmetic surgery of the eyelids that aim to remove certain disasters, whether hereditary or age-related. They may concern only the two upper or lower eyelids, or the four eyelids at a time. Disgrace most commonly involved are: - Heavy eyelids heavy and drooping, with excess skin forming a more or less pronounced fold - Lower eyelids sagging and wilted with small horizontal wrinkles following the skin distention - Fat hernias, responsible \"bags under the eyes\" in the lower eyelids or upper eyelids \"puffies\". The intervention aims to correct these disgrace in a sustainable way, by surgically removing excess skin and muscle and protrusions greasy, and naturally preserving the essential functions of the eyelids.', 'Blepharoplastie-avant-apres.jpg', '', '<b>Avant l’opération:</b> – Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). Le type d’anesthésie est différent selon le nombre de paupières à opérer, de l’ampleur des améliorations à apporter et de la nécessité éventuelle de gestes complémentaires, l’intervention dure entre 30min et 2h et nécessite 1 jour d’hospitalisation – Les incisions cutanées des paupières supérieures : elles sont dissimulées dans le sillon situé à mi-hauteur de la paupière, entre la partie mobile et la partie fixe de la paupière. – Les incisions cutanées des paupières inférieures : elles sont placées 1 à 2 mm sous les cils, et peuvent se prolonger un peu en dehors. Le tracé de ces incisions correspond bien sûr à l’emplacement des futures cicatrices, qui seront donc dissimulées dans des plis naturels. Corrections: à partir de ces incisions, les hernies graisseuses inesthétiques sont retirées et l’excédent de muscle et de peau relâchés est supprimé. Sutures: elles sont réalisées avec des fils très fins, habituellement non résorbables (à retirer après quelques jours).', '<b> Before the operation: </ b> - A usual pre-operative check-up is carried out according to the prescriptions. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). The type of anesthesia is different depending on the number of eyelids to be operated, the extent of the improvements to be made and the possible need for complementary procedures, the procedure lasts between 30min and 2h and requires 1 day of hospitalization - The incisions cutaneous upper eyelids: they are hidden in the furrow located halfway up the eyelid, between the mobile part and the fixed part of the eyelid. - The cutaneous incisions of the lower eyelids: they are placed 1 to 2 mm under the eyelashes, and can extend a little outside. The outline of these incisions corresponds, of course, to the location of future scars, which will therefore be hidden in natural folds. Corrections: from these incisions, the unsightly fat hernias are removed and the excess of relaxed muscle and skin is removed. Sutures: they are made with very fine threads, usually non-absorbable (to be removed after a few days).', '', '<b>Après l’opération:</b> – Il n’y a pas de véritables douleurs, mais éventuellement un certain inconfort avec une sensation de tension des paupières, une légère irritation des yeux ou quelques troubles visuels. – Les premiers jours, il faut se reposer au maximum et éviter tout effort violent. – Les suites opératoires sont essentiellement marquées par l’apparition d’un œdème (gonflement), d’ecchymoses (bleus) et de larmoiements dont l’importance et la durée sont très variables d’un individu à l’autre. – On observe parfois durant les premiers jours une impossibilité de fermer totalement les paupières ou un léger décollement de l’angle externe de l’œil qui ne s’applique plus parfaitement sur le globe. Il ne faudra pas s’inquiéter de ces signes qui sont en règle générale rapidement réversibles. – Les fils sont retirés entre le 3ème et le 6ème jour après l’intervention. – Les stigmates de l’intervention vont s’atténuer progressivement, permettant le retour à une vie socio-professionnelle normale après quelques jours (6 à 20 jours selon les cas). – Les cicatrices peuvent rester un peu rosées durant les premières semaines, mais leur maquillage est rapidement autorisé (habituellement dès le 7ème jour). – Un délai de 3 à 6 mois est nécessaire pour réellement apprécier le résultat. C’est le temps nécessaire pour que les tissus aient retrouvé toute leur souplesse et que les cicatrices se soient estompées au mieux. – L’intervention aura le plus souvent permis de corriger le relâchement cutané et de supprimer les hernies graisseuses, rectifiant ainsi l’aspect vieilli et fatigué du regard. – Les résultats d’une blépharoplastie sont en règle générale parmi les plus durables de la chirurgie esthétique. L’ablation des « poches» est pratiquement définitive, et ces dernières ne récidivent habituellement jamais. En revanche, la peau continue à vieillir et la laxité en résultant peut, à la longue, reproduire le plissement des paupières. Pour autant, il est rare qu’une nouvelle intervention soit envisagée avant une douzaine d’années. ', '<b> After the operation: </ b> - There is no real pain, but possibly some discomfort with a sensation of tension of the eyelids, a slight irritation of the eyes or some visual disturbances. - The first days, you must rest to the maximum and avoid any violent effort. - The operative sequences are mainly marked by the appearance of edema (swelling), bruising (blue) and tearing, the importance and duration of which vary greatly from one individual to another. - During the first days, we sometimes observe an impossibility of closing the eyelids completely or a slight detachment of the external angle of the eye which no longer applies perfectly on the globe. It will not be necessary to worry about these signs which are generally quickly reversible. - The wires are removed between the 3rd and 6th day after the procedure. - The stigma of the intervention will gradually diminish, allowing a return to a normal socio-professional life after a few days (6 to 20 days depending on the case). - The scars can remain a little pink during the first weeks, but their makeup is quickly authorized (usually from the 7th day). - A delay of 3 to 6 months is necessary to really appreciate the result. This is the time needed for the tissues to regain all their flexibility and that the scars have faded at best. - The intervention will most often help to correct sagging skin and remove fat hernias, thereby correcting the aged and tired look. - The results of a blepharoplasty are generally among the most durable of cosmetic surgery. The removal of the \"pockets\" is almost definitive, and the latter usually never recidivate. On the other hand, the skin continues to age and the resulting laxity can, in the long run, reproduce the folding of the eyelids. However, it is rare that a new intervention is envisaged before a dozen years.', 'blepharoplastie-explication.jpg', '', '', '', '', '', '', '', '', '<b> Complications envisageables: </b>• En ce qui concerne l’anesthésie, lors de la consultation, le médecin anesthésiste informera lui-même le (la) patient(e) des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles et plus ou moins faciles à maîtriser : le fait d’avoir recours à un Anes-thésiste parfaitement compétent, exerçant dans un contex-te réellement chirurgical fait que les risques encourus sont devenus statistiquement très faibles. En effet, les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en dehors de l’urgence et chez une personne en bonne santé. • En ce qui concerne le geste chirurgical : en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. Heureusement, les vraies complications sont rares à la suite d’une blépharoplastie réalisée dans les règles. En pratique, l’immense majorité des interventions se passe sans aucun problème et les patients sont pleinement satisfaits de leur résultat. Pour autant, et malgré leur rareté, vous devez être informé(e) des complications possibles : • Hématomes : la plupart du temps sans gravité, ils doivent êtres évacués s’ils sont trop importants. • Infection : exceptionnelle lors d’une blépharoplastie, à part quelques rares micro-abcès développés sur un point de suture et facilement traités par de petits soins locaux. Une simple conjonctivite sera prévenue par la prescription habituelle de collyres les premiers jours. • Anomalies de cicatrisation : très rares au niveau des paupières où la peau, très fine, cicatrise habituellement de façon quasiment invisible, il peut toutefois arriver que les cicatrices ne soient pas, à terme, aussi discrètes qu’escompté. • Kystes épidermiques : ils peuvent apparaître le long des cicatrices et s’éliminent souvent spontanément. • Troubles de la sécrétion des larmes : un larmoiement persistant est plus rare qu’un «syndrome d’œil sec» qui vient parfois décompenser un déficit en larmes préexistant. • Ptosis : (difficulté à ouvrir complètement la paupière supérieure) : très rare, sauf au-delà de 70 ans où un déficit préexistant peut parfois être majoré par l’intervention. • Lagophtalmie : (impossibilité de fermer complètement la paupière supérieure) : possible les tout premiers jours suivant l’intervention, sa persistance au-delà de quelques semaines ne devrait pas se rencontrer. • Ectropion (rétraction vers le bas de la paupière inférieure) : la forme majeure est rarissime au décours d’une blépharoplastie correctement réalisée. La forme mineure (« œil rond ») survient parfois sur des paupières peu toniques soumises à une rétraction cicatricielle intempestive ; elle finit la plupart du temps par s’estomper après quelques semaines de massages pluri-quotidiens destinés à assouplir la paupière. • Enfin, des cas tout à fait exceptionnels de diplopie (vision double), de glaucome (hypertension oculaire) et même de cécité (dont le mécanisme est complexe), ont été rapportés dans la littérature scientifique internationale après blépharoplasties. Au total, il ne faut pas surévaluer les risques, mais simplement prendre conscience qu’une intervention chirurgicale, même apparemment simple, comporte toujours une petite part d’aléas. Le recours à un Chirurgien Plasticien qualifié vous assure que celui-ci a la formation et la compétence requises pour savoir éviter ces complications, ou les traiter efficacement le cas échéant.', '<b> Possible complications: </ b> • With regard to anesthesia, during the consultation, the anesthesiologist doctor will inform the patient of the anesthetic risks. It should be known that anesthesia induces in the body reactions sometimes unpredictable and more or less easy to control: the fact of having recourse to an Aes-thésiste perfectly competent, exercising in a context-te really surgical makes that the risks incurred have become statistically very small. Indeed, techniques, anesthetic products and monitoring methods have made tremendous progress over the last thirty years, providing optimal safety, especially when the procedure is performed outside the emergency and in a healthy person. . • Regarding the surgical procedure: by choosing a qualified and competent Plastic surgeon, trained in this type of procedure, you limit these risks as much as possible, without however completely eliminating them. Fortunately, true complications are rare following a blepharoplasty performed in the rules. In practice, the vast majority of interventions go on without any problem and patients are fully satisfied with their outcome. However, despite their rarity, you must be aware of possible complications: • Hematoma: most of the time without gravity, they must be evacuated if they are too important. • Infection: exceptional during a blepharoplasty, except for a few rare micro-abscesses developed on a stitch and easily treated with small local care. A simple conjunctivitis will be prevented by the usual prescription of eye drops the first days. • Abnormalities of healing: very rare in the eyelids where the skin, very thin, usually heals in an almost invisible way, it can happen however that the scars are not, in the long term, as discreet as expected. • Epidermal cysts: they can appear along the scars and are often eliminated spontaneously. • Tear secretion disorders: persistent tearing is more rare than \"dry eye syndrome\" which sometimes decays a pre-existing tear deficit. • Ptosis: (difficulty to fully open the upper eyelid): very rare, except beyond 70 years where a pre-existing deficit can sometimes be increased by the intervention. • Lagophthalmitis: (impossibility of closing completely the upper eyelid): possible the very first days following the intervention, its persistence beyond a few weeks should not meet. • Ectropion (retraction down of the lower eyelid): the major form is extremely rare after a correctly performed blepharoplasty. The minor form (\"round eye\") sometimes occurs on less tonic eyelids subjected to an untimely cicatricial retraction; most of the time it fades after a few weeks of multi-daily massages to soften the eyelid. • Finally, quite exceptional cases of diplopia (double vision), glaucoma (ocular hypertension) and even blindness (whose mechanism is complex), have been reported in the international scientific literature after blepharoplasty. In total, one should not overstate the risks, but simply be aware that a surgical procedure, even apparently simple, always has a small share of hazards. The use of a qualified plastic surgeon ensures that he has the training and skills required to know how to avoid these complications, or treat them effectively if necessary.', '', '', '', '', '', NULL), (8, 2, 'Génioplastie', 'Genioplasty', 'Genioplastie-1.jpg', 'Qu’il soit fuyant ou en galoche, la génioplastie embellit l’apparence du menton…', 'Whether it is fleeing or galoche, genioplasty embellishes the appearance of the chin ...', 'Genioplastie-couverture.jpg', '<b>La génioplastie</b> permet d’améliorer la forme d’un menton disgracieux en rétablissant l’équilibre du visage de face et de profil. Les différentes techniques de chirurgie du menton corrigent efficacement les défauts esthétiques, tels qu’un menton en galoche (trop avancé) ou un menton fuyant (trop reculé).', '<b> Genioplasty </ b> improves the shape of an unsightly chin by restoring the balance of the face face and profile. The different techniques of chin surgery effectively correct aesthetic defects, such as a chin galoche (too advanced) or a chin fleeing (too far back).', 'genioplastie-avant-apres.jpg', '', '<b>Avant l’opération:</b>\r\n– Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). – On vous demandera de rester à jeun (ne rien manger ni boire) 6 heures avant l’intervention.', '<b> Before the operation: </ b> - A usual preoperative assessment is carried out according to the prescriptions. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). - You will be asked to stay fast (do not eat or drink anything) 6 hours before the procedure.', '', '<b>Déroulement de l’opération:</b>\r\nSelon la technique chirurgicale employée, l’opération du menton se fait sous anesthésie locale ou générale, en ambulatoire ou avec une nuit d’hospitalisation et dure entre une demi-heure à une heure trente. L’incision est dissimulée dans la bouche sur la gencive inférieure ou elle est faite très discrètement sous le menton. Reculer un menton en galoche: Deux techniques sont possibles: Le rabotage de l’os de la mâchoire : Le chirurgien lime le bord inférieur de l’os mandibulaire afin de diminuer la projection du menton. L’ostéotomie de recul du menton : Le chirurgien coupe l’os en excès puis il refixe la partie avant du menton à l’aide plaquettes et de vis métalliques. Avancer un menton fuyant: Trois techniques sont possibles : – La pose d’un implant menton : Il existe des prothèses soit en silicone, soit en Medpor (POREX). Ces deux types de d’implants donnent de bons résultats. Le choix dépend à la fois du défaut esthétique à corriger, des souhaits du patient et des habitudes du chirurgien. Les implants du menton ont également des formes diverses : prothèse centrale, prothèse avec des petites ailes latérales, etc. Le chirurgien insère ensuite l’implant mentonnier dans une loge sur mesure au niveau de l’os de la mâchoire inférieure. La prothèse est dissimulée par l’épaisseur de la graisse et des muscles du menton. – L’ostéotomie d’avancement du menton : Le chirurgien coupe l’os du menton dans le sens horizontal afin de créer un fragment osseux qui est ensuite avancé et fixé dans la position désirée à l’aide de plaquettes et de vis métalliques. – La greffe osseuse : Le chirurgien prélève la greffe dont il a besoin sur la bosse du nez lorsqu’il fait une profiloplastie ou bien sur le crâne, le bassin, etc. pour remodeler le menton.', '<b> Progress of the operation: </ b> According to the surgical technique used, the operation of the chin is done under local or general anesthesia, outpatient or with a night of hospitalization and lasts between half an hour to an hour and a half. The incision is hidden in the mouth on the lower gum or it is made very discreetly under the chin. To retreat a chin galoche: Two techniques are possible: Planing the bone of the jaw: The surgeon files the lower edge of the mandibular bone to reduce the projection of the chin. The recoil osteotomy of the chin: The surgeon cuts the bone in excess and then remixes the front part of the chin using pads and metal screws. Advancing a receding chin: Three techniques are possible: - Placement of a chin implant: There are prostheses either silicone or Medpor (POREX). These two types of implants give good results. The choice depends on both the aesthetic defect to be corrected, the wishes of the patient and the habits of the surgeon. The implants of the chin also have various forms: central prosthesis, prosthesis with small lateral wings, etc. The surgeon then inserts the chin implant into a custom box at the level of the lower jawbone. The prosthesis is concealed by the thickness of the fat and muscles of the chin. - Chin advancement osteotomy: The surgeon cuts the chin bone in the horizontal direction to create a bone fragment which is then advanced and fixed in the desired position using platelets and metal screws. - The bone graft: The surgeon removes the graft he needs on the hump of the nose when making a profileoplasty or on the skull, the pelvis, etc. to reshape the chin.', '', '<b>Après l’opération:</b>\r\n– Des saignements par la bouche sont fréquents juste après l’intervention et sont habituellement sans gravité. Un œdème des lèvres et du cou est assez fréquent et parfois important. La mobilité est presque toujours diminuée au début. La sensibilité peut être aussi diminuée dans les premiers jours au niveau de la lèvre inférieure, du menton, des dents et des gencives. Les douleurs seront soulagées par des antalgiques. – Une excellente hygiène buccale est essentielle et des bains de bouche vous seront prescrits à cet effet. Les dents et les gencives doivent être nettoyées avec une brosse ultra-souple après chaque repas ; un jet hydropulseur peut également être utilisé. Dans certains cas, des antibiotiques vous seront prescrits. – Pour obtenir une cicatrisation dans de bonnes conditions, il faut respecter certaines précautions : l’alimentation doit être tiède ou froide, plutôt molle en évitant une nourriture trop chaude, trop épicée ou trop acide. – Un délai de deux à trois mois est nécessaire pour avoir une bonne appréciation du résultat, en sachant que l’aspect définitif est généralement obtenu après environ six mois.', ' <b> After the operation: </ b> - Bleeding through the mouth is common right after surgery and is usually not serious. Edema of the lips and neck is quite frequent and sometimes important. Mobility is almost always diminished at first. Sensitivity can also be decreased in the first days at the lower lip, chin, teeth and gums. The pain will be relieved by analgesics. - Excellent oral hygiene is essential and mouthwashes will be prescribed for this purpose. Teeth and gums should be cleaned with an ultra-soft brush after each meal; a jet irrigator can also be used. In some cases, antibiotics will be prescribed. - To obtain healing in good conditions, you must follow certain precautions: the diet should be warm or cold, rather soft avoiding too hot food, too spicy or too acidic. - A period of two to three months is necessary to have a good appreciation of the result, knowing that the final appearance is usually obtained after about six months.', '<b>Complications envisageables:</b>\r\n– En ce qui concerne l’anesthésie, lors de la consultation, le médecin anesthésiste informera lui-même le patient des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles, et plus ou moins faciles à maîtriser : le fait d’avoir recours à un Anesthésiste parfaitement compétent, exerçant dans un contexte réellement chirurgical, fait que les risques encourus sont devenus statistiquement très faibles. Il faut savoir, en effet, que les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en dehors de l’urgence et chez une personne en bonne santé. – En ce qui concerne le geste chirurgical : en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. Heureusement, les vraies complications sont rares à la suite d’une génioplastie réalisée dans les règles. En pratique, l’immense majorité des interventions se passe sans aucun problème et les patient(e)s sont pleinement satisfait(e)s de leur résultat. Pour autant, et malgré leur rareté, vous devez être informé(e) des complications possibles : • Saignements: ils peuvent être abondants, ce qui est extrêmement rare à la suite de cette intervention. Ils peuvent nécessiter très exceptionnellement une transfusion sanguine ou de dérivés sanguins. En cas de saignements très importants, il peut être nécessaire d’ouvrir la plaie en urgence et de réaliser une hémostase chirurgicale. Un hématome important peut comprimer la langue et entraîner des troubles respiratoires. • Les troubles de la sensibilité de la lèvre inférieure, de la gencive ou des dents, sont habituels et s’estomperont progressivement mais la récupération peut être longue et parfois incomplète. • Retard ou absence de consolidation osseuse: Dans ce cas parfois, une autre intervention avec greffe osseuse peut être nécessaire. • Lésions dentaires: dans des cas exceptionnels, les racines dentaires peuvent être lésés et nécessiter un traitement • Fonte du fragment osseux : très rarement le fragment osseux découpé peut se résorber progressivement entraînant la disparition du relief créé par l’intervention. Une reconstruction secondaire nécessitera alors une greffe osseuse ou la mise en place d’un implant mentonnier. • Complications en cas de pose d’implant mentonnier : Les implants artificiels (silicone, corail etc…) peuvent être mal tolérés ou s’infecter nécessitant alors, en raison de leur dégradation et/ou de leur mobilité, une ablation et une reconstruction secondaire. Au total, il ne faut pas surévaluer les risques, mais simplement prendre conscience qu’une intervention chirurgicale, même apparemment simple, comporte toujours une petite part d’aléas. Le recours à une Chirurgien Plasticien qualifié vous assure que celui-ci a la formation et la compétence requises pour savoir éviter ces complications, ou les traiter efficacement le cas échéant.', '<b> Possible complications: </ b> - With regard to anesthesia, during the consultation, the anesthesiologist doctor will inform the patient of the anesthetic risks. It should be known that anesthesia induces in the body reactions sometimes unpredictable, and more or less easy to control: the fact of having recourse to a perfectly competent anesthetist, exercising in a really surgical context, makes that the risks incurred are become statistically very weak. In fact, techniques, anesthetic products and surveillance methods have made tremendous progress over the last thirty years, providing optimal safety, especially when the operation is performed outside the emergency department and at home. a person in good health. - Regarding the surgical procedure: by choosing a qualified and competent Plastic surgeon, trained in this type of intervention, you minimize these risks, but do not completely eliminate them. Fortunately, true complications are rare as a result of genioplasty performed in the rules. In practice, the vast majority of the interventions go on without any problem and the patients are fully satisfied with their results. However, despite their rarity, you must be aware of possible complications: • Bleeding: they can be plentiful, which is extremely rare as a result of this procedure. They may very rarely require a blood transfusion or blood derivatives. In case of very large bleeding, it may be necessary to open the wound urgently and perform surgical haemostasis. A large hematoma can compress the tongue and cause breathing problems. • Disturbances in the sensitivity of the lower lip, gums or teeth are common and will gradually fade, but recovery can be long and sometimes incomplete. • Delay or lack of bone healing: In this case sometimes, another bone graft surgery may be necessary. • Dental lesions: in exceptional cases, the dental roots can be damaged and require treatment • Melting of the bone fragment: very rarely the cut bone fragment can be gradually absorbed resulting in the disappearance of the relief created by the intervention. Secondary reconstruction will then require bone grafting or the placement of a mental implant. • Complications when implanting a mental implant: Artificial implants (silicone, coral, etc.) can be poorly tolerated or become infected, requiring, due to their degradation and / or mobility, ablation and secondary reconstruction. . In total, one should not overstate the risks, but simply be aware that a surgical procedure, even apparently simple, always has a small share of hazards. The use of a qualified Plastic Surgeon ensures that he has the training and skills required to know how to avoid these complications, or treat them effectively if necessary.', '', '', '', '', '', '', '', '', '', '', '<b>Tarifs:</b>\r\nLa génioplastie coûte <b>1550 euros</b> La génioplastie d’avancement coûte <b>1950 euros</b>', NULL), (9, 2, 'Otoplastie', 'Otoplasty', 'Otoplastie-2.jpeg', 'L’otoplastie est une intervention chirurgicale des oreilles décollées ou souffrant d’autres malformations qu’elle soit esthétique ou réparatrice…', 'Otoplasty is a surgical procedure of the ears detached or suffering from other malformations whether aesthetic or restorative ...', 'Otoplastie-couverture.jpg', '<b>L’otoplastie</b> est une intervention chirurgicale des oreilles décollées, qu’elle soit esthétique ou réparatrice, mais aussi des oreilles souffrant d’autres malformations. L’opération peut être réalisée à l’âge adulte mais elle peut être envisagée dès l’âge de 7 ans. Elle est habituellement réalisée sur les 2 oreilles mais peut parfois être unilatérale. L’otoplastie se propose de corriger les anomalies de cartilage présentes sur le pavillon de l’oreille et responsables de son aspect « décollé ». On distingue 3 types de malformation qui sont plus ou moins associées entre elles : – Une angulation trop importante entre le pavillon de l’oreille et le crâne (hypertrophie de conque) réalisant le vrai décollement ; – Une taille excessive de la conque projetant l’oreille vers l’avant ; – Un défaut de plicature des reliefs habituels du cartilage (défaut de plicature de l’anthélix) qui donne au pavillon un aspect trop lisse, déplissé. L’intervention corrige ces anomalies en remodelant le cartilage de façon à obtenir des oreilles décollées symétriques de taille et d’aspect naturels.', '<b> Otoplasty </ b> is a surgical procedure of the detached ears, whether aesthetic or restorative, but also ears with other malformations. The operation can be performed in adulthood but it can be considered from the age of 7 years. It is usually performed on both ears but can sometimes be unilateral. The otoplasty proposes to correct the abnormalities of cartilage present on the pavilion of the ear and responsible for its appearance \"taken off\". There are 3 types of malformation that are more or less associated with each other: - Too much angulation between the auricle and the skull (conch hypertrophy) realizing the real detachment; - An excessive size of the conch projecting the ear forward; - A lack of plication of the usual reliefs of the cartilage (lack of plication of the anthelix) which gives the pavilion an appearance too smooth, unfolded. The procedure corrects these abnormalities by reshaping the cartilage to obtain balanced symmetrical ears of natural size and appearance.', 'otoplastie-avant-apres.jpg', '', '<b>Avant l’opération: </b>\r\n– Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). L’intervention dure entre 1 heure et 1h30, elle est pratiquée sous anesthésie locale ou générale chez le jeune enfant. L’hospitalisation est ambulatoire. Incisions cutanées: elles sont situées uniquement dans le sillon rétro-auriculaire, c’est-à-dire dans le pli naturel situé derrière l’oreille, ou à la face postérieure de l’oreille. Dans certains cas, de petites incisions complémentaires seront pratiquées à la face antérieure du pavillon, mais elles seront alors dissimulées dans des replis naturels. Dissection: La peau est ensuite décollée en fonction des besoins afin d’accéder au cartilage. Remodelage cartilagineux: Le principe est de recréer ou d’améliorer les reliefs naturels par affinement et plicatures, éventuellement maintenus par de fines sutures profondes. Parfois, des sections ou des résections du cartilage sont nécessaires. Enfin, le pavillon est ramené en bonne position par rapport au crâne et fixé par des points profonds. Sutures: Classiquement, des fils résorbables sont utilisés ; sinon, ils devront être retirés vers le 10ème jour. Pansements: Il est réalisé grâce à des bandes élastiques autour de la tête afin de maintenir les oreilles en bonne position. En fonction du chirurgien et de l’importance des malformations à corriger, une otoplastie bilatérale peut durer d’une demi heure à une heure et demi.', '<b> Before the operation: </ b> - A usual preoperative assessment is carried out according to the prescriptions. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). The procedure lasts between 1 hour and 1:30, and is performed under local or general anesthesia in young children. Hospitalization is outpatient. Skin incisions: they are located only in the retro-auricular groove, that is to say in the natural fold located behind the ear, or in the posterior face of the ear. In some cases, small additional incisions will be made on the anterior surface of the flag, but they will then be concealed in natural folds. Dissection: The skin is then peeled off as needed to access the cartilage. Cartilage remodeling: The principle is to recreate or improve the natural reliefs by refinement and plication, possibly maintained by fine deep sutures. Sometimes sections or resections of the cartilage are needed. Finally, the flag is brought back in good position relative to the skull and fixed by deep points. Sutures: Classically, absorbable threads are used; otherwise, they will have to be removed by the 10th day. Bandages: It is made with elastic bands around the head to keep the ears in a good position. Depending on the surgeon and the importance of the malformations to correct, a bilateral otoplasty can last from half an hour to an hour and a half.', 'Otoplastie-explication-2.jpg', '', '', '', '', '', '', '', '', '', '<b>Après l’opération:</b> – Les douleurs peuvent être modérées. La prise d’antalgiques classiques et d’anti-inflammatoire permet de les estomper. – Après l’intervention, un gros pansement de type casque est porté durant 24h, puis est remplacé par un bandeau de contention qui sera porté d’abord jour et nuit les 2 premières semaines, puis seulement la nuit une semaine encore. – Un aspect trop collé des oreilles est fréquent les premiers jours suivant l’intervention, mais ce phénomène est normal et il ne s’agit en aucun cas d’une hyper correction. Les oreilles prennent leur positionnement définitif quelques semaines après. – L’apparition d’un oedème est normale et fait suite à l’intervention. Des ecchymoses (bleus) peuvent se présenter. La résorption s’effectue spontanément au bout de quelques semaines. – Il n’y a aucun fil à retirer puisqu’ils sont résorbables.', '<b> After the operation: </ b> - The pain can be moderate. Taking conventional analgesics and anti-inflammatory helps to reduce them. - After surgery, a large helmet-type bandage is worn for 24 hours, then is replaced by a bandage of contention that will be worn first day and night the first 2 weeks, then only the night a week. - An overly glued aspect of the ears is common in the first days following the procedure, but this phenomenon is normal and it is in no way a hyper correction. The ears take their final position a few weeks later. - The appearance of edema is normal and follows the intervention. Bruising (blue) may occur. Resorption occurs spontaneously after a few weeks. - There is no wire to remove since they are resorbable.', '', '', '', '', '', '', '<b>Tarifs:</b>\r\nL’otoplastie coûte <b>1500 euros</b>', NULL), (10, 2, 'Augmentation Des Lèvres\r\n', 'Lip Augmentation', 'augmentation-levres.jpg', 'Les lèvres pulpeuses sont aujourd’hui l’image même de la séduction, leur augmentation peut s’effectuer à travers deux méthodes d’interventions…', 'The luscious lips are today the image of seduction, their increase can be done through two methods of intervention ...', 'augmentation-levres-couverture.jpg', '<b>L’augmentation des lèvres</b> repose sur des techniques d’injections volumatrice d’acide hyaluronique qui permet de redessiner l’ourlet (contour), épaissir les lèvres si elles sont trop fines, ou les rendre plus pulpeuses. L’acide hyaluronique est aujourd’hui considéré comme le produit de référence grâce à:<ul>\r\n<li>Son ancienneté : utilisé depuis les années 1990.</li>\r\n<li>Sa durée variable de 8 à 24 mois</li>\r\n<li>Son absence de spécificité tissulaire, il est donc biocompatible et les tests de tolérance avant injection ne sont pas nécessaires (sauf terrains particuliers).</li>\r\n<li>Son caractère entièrement biodégradable.</li>\r\n<li>Sa faculté d’utilisation, il ne nécessite pas de préparation.</li>\r\n<li>Ses résultats immédiats Ses effets secondaires minimes et exceptionnels.</li>\r\n</ul>', '<b> Lip augmentation </ b> is based on hyaluronic acid volumizing injection techniques that redraw the hem (contour), thicken the lips if they are too thin, or make them more plump. Hyaluronic acid is now considered the reference product thanks to: <ul> <li> His seniority: used since the 1990s. </ li> <li> Its variable duration from 8 to 24 months </ li> <li> Its lack of tissue specificity, so it is biocompatible and tolerance tests before injection are not necessary (except special fields). </ li> <li> Its completely biodegradable character. </ li> <li> Its ability to use, it does not require preparation. </ li> <li> Its immediate results Its minimal and exceptional side effects. </ li> </ Ul>', 'augmentation-levres-avant-apres.jpg', '', '<b>Avant l’opération:</b><br> – Un interrogatoire précis sera réalisé visant à rechercher d’éventuelles contre-indications : Hypersensibilité connue à l’acide hyaluronique / Femme enceinte ou allaitant. – Les médicaments à base d’Aspirine ou d’anti-inflammatoire devront être évités dans les 3 jours précédant l’injection. – Il est préférable de ne pas boire d’alcool, ni s’exposer fortement au soleil la veille et le jour de la séance. La séance d’injection d’acide hyaluronique nécessite une anesthésie locale et dure 10 minutes environ. La zone à traiter est désinfectée avant l’injection. Les injections se font en utilisant des aiguilles ou des micro- canules mousses (non piquantes). C’est une intervention rapide qui donne des résultats naturels et harmonieux grâce à des produits fins et augmentant le volume.<br> <b>Après l’opération: </b><br>– Aucune douleur – Pendant quelques jours il sera préférable d’éviter l’alcool, l’Aspirine, les anti-inflammatoires et d’éviter l’exposition des zones traitées à des chaleurs fortes (soleil, UV, sauna, hammam).', '<b> Before the operation: </ b> <br> - A precise interrogation will be carried out aiming to search for possible contraindications: Known hypersensitivity to hyaluronic acid / Pregnant or lactating woman. - Aspirin or anti-inflammatory drugs should be avoided within 3 days of injection. - It is best not to drink alcohol, or be heavily exposed to the sun the day before and the day of the session. The hyaluronic acid injection session requires local anesthesia and lasts about 10 minutes. The area to be treated is disinfected before injection. Injections are made using foamed needles or microcannula (non-prickly). It is a fast intervention that gives natural and harmonious results thanks to thin products and increasing the volume. <br> <b> After the operation: </ b> <br> - No pain - For a few days it will be better to avoid alcohol, Aspirin, anti-inflammatories and avoid exposure of the treated areas to strong heat (sun, UV, sauna, steam room).', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL); INSERT INTO `category` (`id`, `chirurgie_id`, `name`, `nameen`, `coverimage`, `description`, `descriptionen`, `backimage`, `details`, `detailsen`, `baimage`, `detailsimage`, `details1`, `details1en`, `detailsimage2`, `details2`, `details2en`, `detailsimage3`, `before_operation`, `before_operationen`, `before_operation1`, `before_operation1en`, `deroulement_operation`, `deroulement_operationen`, `after_operation`, `after_operationen`, `after_operation1`, `after_operation1en`, `complications`, `complicationsen`, `complications1`, `complications1en`, `tarifs`, `updated_at`) VALUES (11, 3, 'Liposuccion', 'Liposuction', 'Liposuccion-1.jpg', 'La liposuccion est une intervention chirurgicale et esthétique destinée à supprimer définitivement la graisse accumulée dans certaines régions du corps…', 'Liposuction is a surgical and aesthetic procedure to permanently remove the fat accumulated in certain areas of the body ...', 'liposuccion-couverture.jpg', 'La <b>liposuccion</b>, aussi appelée <b>lipoaspiration</b>, est l’intervention de chirurgie esthétique la plus pratiquée en Tunisie et dans le monde. Elle est destinée à supprimer définitivement lagraisse accumulée dans certaines régions du corps en l’aspirant au moyen de canules en mousse. Cependant, la liposuccion n’est pas un remède à l’obésité. Il s’agit d’une alternative à l’amincissement et qui ne peut être pratiquée qu’à des endroits bien définis et pour lesquels l’exercice physique ou les régimes sont inopérants. La liposuccion se pratique sur une ou plusieurs parties du corps: le menton, les bras, le ventre, les poignées d’amour, le dos, les cuisses, les hanches, la culotte de cheval, les fesses, les mollets, les chevilles et les genoux.', '<B> liposuction </ b>, also known as <b> liposuction </ b>, is the most popular cosmetic surgery procedure in Tunisia and worldwide. It is intended to permanently remove accumulated fat in certain areas of the body by sucking it by means of foam cannulas. However, liposuction is not a cure for obesity. It is an alternative to thinning and can only be practiced in well-defined areas where exercise or dieting is ineffective. Liposuction is performed on one or more parts of the body: the chin, arms, belly, love handles, back, thighs, hips, breeches, buttocks, calves, ankles and knees.', 'liposuccion-avant-apres.jpg', 'liposuccion-couverture.jpg', '<b>Avant l’opération:</b> – Eviter la prise d’aspirine et d’anti-inflammatoires pendant les 10 jours qui précèdent l’intervention. – Pour les patientes prenant la pilule, l’arrêt de pilule le mois de l’opération est recommandé. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). La cigarette électronique doit être considérée de la même manière. Déroulement de l’opération: La durée de l’intervention est fonction de la quantité de graisse à extraire et du nombre de localisations à traiter. Elle peut varier de 20 minutes à 3 heures (en moyenne 1 à 2 heures). La durée de l’hospitalisation est fonction de la quantité de graisse extraite. Elle peut être courte, de l’ordre de quelques heures pour de petites lipoaspirations (lorsqu’on a eu recours à une anesthésie locale). Elle sera de 1 ou 2 jours en cas de lipoaspiration plus importante (réalisée sous anesthésie générale). Le chirurgien esthétique, grâce à de très fines canules (5 millimètres au maximum), procède à l’aspiration des excès de graisse afin de remodeler la silhouette. Les incisions sont minuscules et cachées dans les plis naturels, ce qui permet une bonne dissimulation des cicatrices. La quantité de graisse extraite devra bien sûr être adaptée à la qualité de la peau sus-jacente qui constitue l’un des facteurs déterminant pour la qualité du résultat. En fin d’intervention une compression modelante visant à limiter l’œdème post opératoire est réalisée le plus souvent à l’aide d’un panty adapté ou de bandes élastiques.<br>\r\n<b>Après l’opération:</b> – Le temps nécessaire pour récupérer et se remettre d’une lipoaspiration est proportionnel à la quantité de graisse extraite – Dans les suites opératoires, des ecchymoses (bleus) et un œdème (gonflement) apparaissent au niveau des régions traitées. – L’intervention nécessite un arrêt complet du tabac jusqu’à cicatrisation (en général 15 jours après l’intervention). La cigarette électronique doit être considérée de la même manière. – Les douleurs sont variables, mais elles sont en règle générale peu importantes, à type de courbatures, grâce à l’utilisation des canules très fines. Elles sont généralement très supportables avec des calmants simples. – Il n’y a pas de modification nette de l’aspect au cours des 2 à 3 premières semaines, dans la mesure où il existe au début un gonflement post-opératoire des tissus opérés (œdème). – C’est seulement au bout de 3 semaines, et après la résorption de cet œdème, que le résultat commencera à apparaître. La peau mettra environ 3 à 6 mois pour se rétracter complètement sur les nouveaux galbes et se réadapter à la nouvelle silhouette. – Une activité normale pourra être reprise 2 à 10 jours après l’intervention, là aussi en fonction de l’importance de la lipoaspiration et du type d’activité professionnelle. – Le port du panty doit se faire pendant le mois qui suit l’opération jour et nuit. Vous pouvez bien sur l’enlevez pour prendre une douche ou faire une toilette et le remettre aussitôt après. – Les douches sont permises la première semaine après l’opération après avis de votre chirurgien. – Les bains et la piscine sont à proscrire pendant 3 semaines (jusqu’à la cicatrisation complète). – Un arrêt de sport de un mois doit être observé. – Éviter l’exposition des zones opérées au soleil jusqu’à la disparition définitive des bleus (entre 2 et 3 semaines). – Un drainage lymphatique permet d’accélérer la disparition des gonflements. Il est pratiqué au plutôt le 5ème jour après l’opération par un kinésithérapeute qualifié. Le rythme est de 3 séances par semaine pendant 2 semaines – Le LPG (CELLU M6) est un bon complément à la liposuccion. Il permet d’affiner le résultat et de traiter la cellulite souvent associée. Il est conseillé à raison de 3 séances par semaine pendant 4 semaines à partir du 1er mois qui suit l’opération. – Des études scientifiques récentes ont mis en évidence le fait que le corps a tendance à restituer rapidement le volume de graisse enlevé par la liposuccion et ceci dans la première année qui suit l’opération (surtout les premiers 6 mois). Cette graisse a tendance à se localiser dans les parties du corps non touchées par la liposuccion et surtout à l’intérieur de l’abdomen. C’est pour cette raison qu’il est vivement conseillé de surveiller son alimentation et surtout faire de l’exercice régulièrement (40 minutes 3 fois par semaine) durant la première année qui suit l’opération. ', '<b> Before the operation: </ b> - Avoid taking aspirin and anti-inflammatory drugs during the 10 days preceding the procedure. - For patients taking the pill, stopping the pill the month of the operation is recommended. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). The electronic cigarette must be considered in the same way. Operation sequence: The duration of the operation depends on the amount of fat to be extracted and the number of locations to be treated. It can vary from 20 minutes to 3 hours (on average 1 to 2 hours). The duration of hospitalization depends on the amount of fat extracted. It can be short, of the order of a few hours for small lipoaspirations (when using a local anesthetic). It will be 1 or 2 days in case of greater liposuction (performed under general anesthesia). The cosmetic surgeon, thanks to very fine cannulas (5 millimeters maximum), sucks excess fat to reshape the figure. The incisions are tiny and hidden in the natural folds, which allows a good concealment of the scars. The quantity of fat extracted must of course be adapted to the quality of the overlying skin which is one of the factors determining the quality of the result. At the end of the procedure, a modeling compression aiming to limit postoperative edema is usually performed using a suitable panty or elastic bands. <br> <b> After the operation: </ b> - The time required to recover and recover from liposuction is proportional to the amount of fat extracted - In the aftermath, bruising (blue) and edema (swelling) appear at the level of the treated regions. - The intervention requires a complete stop of the tobacco until cicatrization (generally 15 days after the intervention). The electronic cigarette must be considered in the same way. - The pains are variable, but they are generally small, like aches, thanks to the use of very thin cannulas. They are usually very tolerable with simple sedatives. - There is no clear change in appearance during the first 2 to 3 weeks, since there is initially postoperative swelling of the operated tissue (edema). - It is only after 3 weeks, and after the resorption of this edema, that the result will begin to appear. The skin will take about 3 to 6 months to fully retract on the new curves and readjust to the new silhouette. - Normal activity can be resumed 2 to 10 days after the intervention, again depending on the importance of liposuction and the type of professional activity. - The panty must be worn during the month following the operation day and night. You can of course remove it to take a shower or make a toilet and put it back soon after. - The showers are allowed the first week after the operation after the advice of your surgeon. - The baths and the swimming pool are to be prohibited during 3 weeks (until the complete cicatrization). - A one-month sport stop must be observed. - Avoid exposure of sun-operated areas until the definitive disappearance of blues (between 2 and 3 weeks). - Lymphatic drainage helps to accelerate the disappearance of swelling. It is practiced on the 5th day after the operation by a qualified physiotherapist. The rhythm is 3 sessions a week for 2 weeks - LPG (CELLU M6) is a good complement to liposuction. It helps refine the result and treat the often associated cellulite. It is recommended for 3 sessions per week for 4 weeks from the first month following the operation. - Recent scientific studies have shown that the body tends to quickly restore the volume of fat removed by liposuction and this in the first year after the operation (especially the first 6 months). This fat tends to locate in the parts of the body not touched by the liposuction and especially inside the abdomen. It is for this reason that it is strongly advised to monitor your diet and especially to exercise regularly (40 minutes 3 times a week) during the first year after the operation.', '', '<b>Les complications envisageables:</b> – En ce qui concerne l’anesthésie: lors de la consultation, le médecin anesthésiste informera lui-même le patient des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles, et plus ou moins faciles à maîtriser: le fait d’avoir recours à un Anesthésiste parfaitement compétent, exerçant dans un contexte réellement chirurgical (salle de réveil, possibilité de réanimation) fait que les risques encourus sont devenus statistiquement très faibles. Il faut savoir, en effet, que les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en dehors de l’urgence et chez une personne en bonne santé. – En ce qui concerne le geste chirurgical: en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. Les vraies complications sont exceptionnelles après une lipoaspiration de qualité: une grande rigueur dans le choix de l’indication et la réalisation chirurgicale doit assurer en pratique une prévention efficace et réelle. – Pour être complet, il faut cependant citer, malgré leur grande rareté habituelle : • Les accidents thrombo-emboliques (phlébite,embolie pulmonaire) qui sont la complication la plus grave. Leur risque de survenue est augmenté si un tel accident figure dans les antécédents du patient. Le port de bas anti-thrombose, le lever précoce et un éventuel traitement anti-coagulant contribuent à réduire ce risque. • Les saignements sont rarement sérieux, sauf trouble de la coagulation associé ou prise de médicaments favorisant le saignement. • Hématome et épanchement lymphatique apparaissent exceptionnellement au décours d’une lipoaspiration correctement réalisée. • De même, les nécroses cutanées localisées, qui allongent le délai de cicatrisation et peuvent laisser des cicatrices, ne devraient plus être observées. • L’infection en fait rarissime dans ce type de chirurgie dite«fermée» peut être prévenue par la prescription d’un traite- ment antibiotique prophylactique. • Des altérations de la sensibilité peuvent parfois persister sur les zones traitées, même si la sensibilité redevient le plus souvent normale dans un délai de 3 à 12 mois. • La perforation accidentelle ou bien la lésion d’un organe digestif abdominal, voire la contusion d’un viscère thoracique ont pu être observées de manière tout à fait exceptionnelle. • Enfin des perturbations métaboliques ou des anémies ont pu être observées au décours de lipoaspirations importantes en quantité, pouvant rarement nécessiter une transfusion sanguine. Au total, il ne faut pas surévaluer les risques, mais simplement prendre conscience qu’une intervention chirurgicale, même apparemment simple, comporte toujours une petite part d’aléas. Le recours à un Chirurgien Plasticien qualifié vous assure que celui-ci a la formation et la compétence requises pour savoir éviter ces complications, où les traiter efficacement le cas échéant.', '<b> Possible complications: </ b> - With regard to anesthesia: during the consultation, the anesthesiologist doctor will inform the patient of the risks of anesthetics. It should be known that anesthesia induces in the body reactions sometimes unpredictable, and more or less easy to control: the fact of having recourse to a perfectly competent Anesthetist, exercising in a truly surgical context (recovery room, possibility of resuscitation) makes the risks incurred become statistically very small. In fact, techniques, anesthetic products and surveillance methods have made tremendous progress over the last thirty years, providing optimal safety, especially when the operation is performed outside the emergency department and at home. a person in good health. - Regarding the surgical procedure: by choosing a qualified and competent Plastic surgeon, trained in this type of intervention, you minimize these risks, but do not completely eliminate them. The real complications are exceptional after a liposuction of quality: a great rigor in the choice of the indication and the surgical realization must ensure in practice an effective and real prevention. - To be complete, however, we must mention, despite their great rarity: • Thromboembolic events (phlebitis, pulmonary embolism) which are the most serious complication. Their risk of occurrence is increased if such an accident is included in the patient\'s history. Wearing low anti-thrombosis, early sunrise and possible anti-coagulant treatment help to reduce this risk. • Bleeding is rarely serious, except with associated bleeding disorder or taking bleeding medications. • Hematoma and lymphatic effusion occur exceptionally after a correctly performed liposuction. • Similarly, localized skin necrosis, which prolongs the healing time and may leave scars, should no longer be observed. • Infection is extremely rare in this type of so-called \"closed\" surgery and can be prevented by prescribing a prophylactic antibiotic treatment. • Changes in sensitivity can sometimes persist in the treated areas, even though the sensitivity usually returns to normal within 3 to 12 months. • Accidental perforation or damage to an abdominal digestive organ, or even contusion of a thoracic viscus, has been observed quite exceptionally. • Lastly, metabolic disturbances or anemia have been observed in the course of large volume liposuction, which may rarely require blood transfusion. In total, one should not overstate the risks, but simply be aware that a surgical procedure, even apparently simple, always has a small share of hazards. The use of a qualified plastic surgeon ensures that he has the training and skills required to know how to avoid these complications, where to treat them effectively if necessary.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (12, 3, 'Abdominoplastie', 'Abdominoplasty', 'Abdominoplastie.jpg', 'Le terme d’abdominoplastie, appelé également plastie abdominale, est une intervention de chirurgie réparatrice ou esthétique de l’abdomen….', 'The term abdominoplasty, also called abdominoplasty, is a repair surgery or aesthetic surgery of the abdomen.', 'Abdominoplastie-couverture.jpg', 'La plastie abdominale nommée aussi abdominoplastie est une opération que sert à corriger un ventre abimé. Elle permet d’embellir un ventre endommagé par un surplusgraisseux, les muscles sont alors restructurés et renforcés. Dans ce cas, la plastie abdominale n’est pas seulement esthétique mais permet à une personne de retrouver une fonctionmusculaire perdue soit après des grossesses multiples, un fort amaigrissement, un dérèglement hormonal ou une sédentarité trop importante. L’abdominoplastie peut agir sur trois composantes: le retrait des surcharges graisseuses en excès par la lipoaspiration, un raffermissement de la paroi musculaire abdominale en cas de distension, une correction de la diastases des muscles grands droits, et une remise en tension cutanée par un lifting abdominal.', 'The abdominoplasty also called abdominoplasty is an operation that is used to correct a damaged stomach. It allows to beautify a damaged belly with a surplus greasy, the muscles are then restructured and strengthened. In this case, the abdominoplasty is not only aesthetic but allows a person to regain lost muscle function either after multiple pregnancies, a strong weight loss, hormonal imbalance or too sedentary. The abdominoplasty can act on three components: the removal of excessive fat overload by lipoaspiration, a strengthening of the abdominal muscle wall in case of distention, a correction of the diastases of the right muscles, and a skin resuscitation by a abdominal lift.', 'Abdominoplastie-avant-apres.jpg', '', '<b>Avant l’opération:</b> – Eviter la prise d’aspirine pendant les 10 jours qui précèdent l’intervention. – Pour les patientes prenant la pilule, l’arrêt de pilule le mois de l’opération est recommandé. Déroulement de l’opération: Une plastie abdominale se déroule sous anesthésie générale. L’intervention dure de 1h à 2h. La durée d’hospitalisation varie entre 1et 2 jours, selon l’importance de l’acte à réaliser. L’opération peut comporter jusqu’à 4 étapes: – Liposuccion ou lipoaspiration: elle permet de désépaissir la zone graisseuse en regard de l’estomac, le reste de l’abdomen et les flancs. – Décollement des tissus cutanés et graisseux de la partie haute de l’abdomen, afin de procéder, à la fin de l’intervention, à la remise en tension de la peau. – L’écart exagéré entre les muscles grands droits sur la ligne médiane est corrigé. – Dermolipectomie: c’est l’ablation des tissus cutanés en excès, situés entre l’ombilic et la zone pubienne. Il est parfois possible, si la morphologie du patient le permet, d’effectuer une « transposition ombilicale » où le nombril (initialement libéré de la peau) est repositionné en fin d’intervention sur la peau retendue. La finalité en est une meilleure correction : on retire d’avantage de peau abîmée et l’effet lifting (remise en tension cutanée) est meilleur.<br>\r\n<b>Après l’opération:</b> – Le port de la gaine abdominale doit se faire pendant le mois qui suit l’opération jour et nuit. Vous pouvez bien sur l’enlevez pour prendre une douche ou faire une toilette et le remettre aussitôt après. – Les douches sont permises la première semaine après l’opération après avis de votre chirurgien. – Les bains et la piscine sont à proscrire pendant 3 semaines (jusqu’à la cicatrisation complète). – Un arrêt de sport d’un mois doit être observé. – Eviter l’exposition des zones opérées au soleil jusqu’à la disparition définitive des bleus (entre 2 et 3 semaines). – Un drainage lymphatique permet d’accélérer la disparition des gonflements. Il est pratiqué au plutôt le 5ème jour après l’opération par un kinésithérapeute qualifié. Le rythme est de 3 séances par semaine pendant 2 semaines. – Le LPG (CELLU M6) est un bon complément à la liposuccion. Il permet d’affiner le résultat et de traiter la cellulite souvent associée. Il est conseillé à raison de 3 séances/ semaine pendant 4 semaines à partir du 1er mois qui suit l’opération. – Les résultats de l’intervention n’est définitif qu’au bout de plusieurs mois. Il faut effectivement attendre que l’œdème consécutif à l’intervention se résorbe et que les ecchymoses s’estompent.', '<b> Before the operation: </ b> - Avoid taking aspirin during the 10 days preceding the procedure. - For patients taking the pill, stopping the pill the month of the operation is recommended. Procedure of the operation: An abdominoplasty is performed under general anesthesia. The intervention lasts from 1h to 2h. The duration of hospitalization varies between 1 and 2 days, depending on the importance of the act to be performed. The operation can include up to 4 steps: - Liposuction or lipoaspiration: it allows to thin the fat zone next to the stomach, the rest of the abdomen and the flanks. - Detachment of the cutaneous and fatty tissues of the upper part of the abdomen, in order to proceed, at the end of the procedure, to the re-tensioning of the skin. - The exaggerated difference between the right muscles on the midline is corrected. - Dermolipectomy: this is the removal of excess skin tissue located between the umbilicus and the pubic area. It is sometimes possible, if the morphology of the patient allows, to perform an \"umbilical transposition\" where the navel (initially released from the skin) is repositioned at the end of the intervention on the skin retentate. The purpose is a better correction: more damaged skin is removed and the lifting effect (skin resurfacing) is better. <br> <b> After the operation: </ b> - Wearing the abdominal sheath should be done during the month following the operation day and night. You can of course remove it to take a shower or make a toilet and put it back soon after. - The showers are allowed the first week after the operation after the advice of your surgeon. - The baths and the swimming pool are to be prohibited during 3 weeks (until the complete cicatrization). - A one-month sport stop must be observed. - Avoid exposure of sun-operated areas until the definitive disappearance of blues (between 2 and 3 weeks). - Lymphatic drainage helps to accelerate the disappearance of swelling. It is practiced on the 5th day after the operation by a qualified physiotherapist. The rhythm is 3 sessions a week for 2 weeks. - LPG (CELLU M6) is a good complement to liposuction. It helps refine the result and treat the often associated cellulite. It is recommended for 3 sessions / week for 4 weeks from the first month following the operation. - The results of the intervention are definitive only after several months. It is indeed necessary to wait until the edema consecutive to the intervention is resorbed and the bruises fade away.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (13, 3, 'Augmentation Des Fesses\r\n', 'Buttocks augmentation', 'augmentation-fesses.jpg', 'L’augmentation des fesses est une intervention de chirurgie esthétique visant l’augmentation ou la réparation esthétique du fessier…', 'The augmentation of the buttocks is an intervention of cosmetic surgery aiming at the increase or the cosmetic repair of the buttocks ...', 'augmentation-fesses-couverture.jpg', '<b>L’augmentation des fesses</b> est une intervention de chirurgie esthétique visant l’augmentation ou la réparation esthétique du fessier. Beaucoup de femmes trouvent leurs fesses sous-développées, trop plates ou encore tombantes et désirent avoir des fesses plus pleines, plus bombées ou plus arrondies. Il existe deux interventions chirurgicales pour augmenter les fesses: – <b>Les prothèses ou implants fessiers</b>: les implants fessiers sont souples comme les prothèses mammaires, mais beaucoup plus résistants. Ils sont composés de gel de silicone solide ou cohésif qui empêche l’écoulement même en cas de fissure de la paroi. L’aspect des implants est très naturel. Les évolutions marquantes des nouveaux implants, leur conférant une meilleure fiabilité, concernent tant les enveloppes que le gel lui-même : les enveloppes, dont la paroi est aujourd’hui beaucoup plus solide, empêchent la «transpiration» du gel vers l’extérieur (qui était une source importante de coques) et ont une résistance à l’usure très supérieure ; les gels de silicone «cohésifs», dont la consistance est moins fluide, limitent beaucoup le risque de « se répandre » en cas de rupture de l’enveloppe. – <b>Le lipofilling ou injection de graisses</b>: consiste à la réinjection de la propre graisse du patient au niveau des fesses. C’est donc une technique naturelle qui ne fait appel à un corps étranger.', '<b> Buttock augmentation </ b> is an aesthetic surgery procedure aimed at increasing or repairing the buttocks. Many women find their buttocks underdeveloped, too flat or drooping and want to have a fuller, rounder or rounder buttocks. There are two surgical procedures to increase the buttocks: - <b> Prostheses or gluteal implants </ b>: gluteal implants are flexible like breast prostheses, but much more resistant. They are composed of solid or cohesive silicone gel that prevents flow even in the event of cracking of the wall. The appearance of the implants is very natural. The striking developments of the new implants, giving them greater reliability, concern both the envelopes and the gel itself: the envelopes, whose wall is much stronger today, prevent the \"transpiration\" of the gel towards the outside ( which was an important source of hulls) and have a very superior wear resistance; \"Cohesive\" silicone gels, whose consistency is less fluid, greatly limit the risk of \"spreading\" in the event of rupture of the envelope. - <b> Lipofilling or fat injection </ b>: the reinjection of the patient\'s own fat into the buttocks. It is therefore a natural technique that does not appeal to a foreign body.', 'Augmentation-des-fesses-avant-apres.png', '', '<b>Avant l’opération:</b> – Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). – Augmentation des fesses par prothèses fessiers: Le chirurgien détermine la taille et la forme de la prothèse de fesses qui convient le mieux au patient, il conseillera le volume d’implant adapté à la morphologie du patient, afin que le résultat soit le plus naturel possible. L’intervention se pratique sous anesthésie générale ou péridurale et une sédation douce et dure en moyenne 2h. La durée moyenne d’hospitalisation est de 2 à 3 jours. Voie d’abord : voie interfessière, avec incision placée dans le sillon situé entre les deux fesses Mise en place des prothèses : en passant par l’incision, les implants peuvent être introduits dans les loges réalisées. Le positionnement est intramusculaire, dans l’épaisseur même du muscle grand fessier. Drains et pansement : un drain peut être mis en place en fonction des habitudes du chirurgien. C’est un dispositif destiné à évacuer le sang qui pourrait s’accumuler autour des prothèses. En fin d’intervention, un pansement « modelant » est réalisé avec un bandage élastique ou bien un vêtement compressif est mis en place avant le réveil. – Augmentation des fesses par lipofilling: L’intervention se pratique sous anesthésie générale ou locale et dure en moyenne 2 à 3h. La durée moyenne d’hospitalisation est de 2 à 3 jours. Le chirurgien pratique une liposuccion, pour aspirer uniquement la graisse de meilleure qualité sans l’endommager, il utilise une capsule spéciale, très fine. Ensuite, par de minuscules incisions, il injecte des faibles quantités de votre graisse dans des centaines de différents niveaux de la partie désirée des fesses.<br> <b>Après l’opération</b> – Douleurs peu importantes, des antalgiques réduiront la douleur. – Il faut attendre 24h avant de s’asseoir, et 48h avant de marcher. – Il faudra attendre 3 mois minimums pour reprendre une pratique sportive où vos muscles fessiers sont sollicités, et 3 semaines pour une activité journalière normale. – Des ecchymoses (bleus) et un œdème (gonflement) apparaissent au niveau des régions traitées. – La cicatrice demeure très discrète, presque invisible. – En cas d’augmentation par prothèses, un délai de deux à trois mois est nécessaire pour apprécier le résultat définitif. C’est le temps nécessaire pour que les fesses aient retrouvé toute leur souplesse et que les prothèses se soient stabilisées. – La durée de vie des prothèses est d’environ 10 ans. Complication envisageables: – En ce qui concerne l’anesthésie, lors de la consultation, le médecin anesthésiste informera lui-même le patient des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles, et plus ou moins faciles à maîtriser : le fait d’avoir recours à un Anesthésiste parfaitement compétent, exerçant dans un contexte réellement chirurgical, fait que les risques encourus plus ou moins faciles à maîtriser Il faut en effet garder à l’esprit que les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en dehors de l’urgence et chez une personne en bonne santé. – En ce qui concerne le geste chirurgical : en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. En pratique, la grande majorité des augmentations fessières réalisées dans les règles se passe sans aucun problème, les suites opératoires sont simples et les patient(e)s sont pleinement satisfait(e)s de leur résultat. Pourtant, parfois, des complications peuvent survenir au décours de l’intervention, certaines inhérentes au geste chirurgical et d’autre spécifiquement liées aux implants: – Hématome : l’accumulation de sang autour de la prothèse est une complication pouvant survenir au cours des premières heures après l’intervention. S’il est important, une reprise au bloc opératoire est alors préférable afin d’évacuer le sang et de stopper le saignement à son origine ; – Epanchement séreux : une accumulation de liquide lymphatique autour de la prothèse est un phénomène assez fréquent, souvent associé à un œdème important. Il se traduit par une augmentation transitoire du volume fessier. Il disparaît spontanément et progressivement. – Infection : elle est rare après ce type de chirurgie. Elle peut ne pas être résolue par le seul traitement antibiotique et impose alors une reprise chirurgicale pour drainage et ablation de l’implant pendant quelques mois (temps nécessaire avant de pouvoir remettre en place une nouvelle prothèse sans risque). – Anomalies de cicatrisation : Le processus de cicatrisation mettant en jeu des phénomènes assez aléatoires, il arrive parfois que les cicatrices ne soient pas, à terme, aussi discrètes qu’escompté, pouvant alors prendre des aspects très variables. – Altération de la sensibilité: Elles sont fréquentes les premiers mois mais finissent la plupart du temps par régresser. Risques spécifiquement liés aux implants – Formation de « plis » ou aspect de «vagues»: Les implants étant souples, il est possible que leur enveloppe se plisse et que ces plis soient perceptibles au toucher. – «Coques »: La réaction physiologique, normale et constante de l’organisme humain en présence d’un corps étranger, est de l’isoler des tissus environnants en constituant une membrane hermétique qui va entourer l’implant et qu’on appelle «capsule périprothétique». Normalement, cette membrane est fine, souple et imperceptible, mais il arrive parfois que la réaction s’amplifie et que la capsule s’épaississe, devienne fibreuse et se rétracte en comprimant l’implant, prenant alors le nom de «coque». Selon l’intensité du phénomène, il peut en résulter : un simple raffermissement de la fesse, une constriction parfois gênante, voire une déformation visible avec globulisation de la prothèse aboutissant à l’extrême à une sphère dure, douloureuse, plus ou moins excentrée. De gros progrès ont été réalisés ces dernières années en matière de techniques chirurgicales, mais surtout de conception et de constitution des implants, aboutissant à une diminution très sensible du taux de coques et de leur intensité. – Rupture : On a vu que les implants ne peuvent être considérés comme définitifs. Une perte d’étanchéité de l’enveloppe peut donc survenir à terme. Cela peut être, très rarement, la conséquence d’un traumatisme violent ou d’une piqûre accidentelle et, beaucoup plus souvent, le résultat d’une usure progressive de la paroi due à l’ancienneté. La rupture prothétique impose, le plus souvent, une intervention visant à changer les implants. – Malposition, déplacement : Un mauvais positionnement, ou le déplacement secondaire de l’implant, affectant alors la forme de la fesse, peuvent parfois justifier une correction chirurgicale. – Rotation : Bien que relativement rare en pratique, le pivotement d’une prothèse «anatomique» reste théoriquement possible et peut affecter le résultat esthétique. – Sérum tardif péri-prothétique : Dans de très rares cas peut survenir, autour de la prothèse, un épanchement tardif qui peut nécessiter une ponction guidée par échographie avec réalisation d’une culture et d’une étude cytologique appropriée.', '<b> Before the operation: </ b> - A usual pre-operative check-up is carried out according to the prescriptions. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). - Augmentation of buttocks by gluteal prostheses: The surgeon determines the size and shape of the buttocks that best suits the patient, he will advise the implant volume adapted to the morphology of the patient, so that the result is the most natural possible. The procedure is performed under general or epidural anesthesia and soft sedation lasts an average of 2 hours. The average duration of hospitalization is 2 to 3 days. Pathway first: intergluteal pathway, with incision placed in the groove between the two buttocks Implementation of prostheses: through the incision, the implants can be introduced into the boxes made. The positioning is intramuscular, in the thickness of the gluteus maximus muscle. Drains and dressings: a drain can be put in place according to the habits of the surgeon. It is a device intended to evacuate the blood which could accumulate around the prostheses. At the end of the procedure, a \"modeling\" dressing is made with an elastic bandage or a compression garment is put in place before waking. - Increase of the buttocks by lipofilling: The intervention is practiced under general or local anesthesia and lasts on average 2 to 3 hours. The average duration of hospitalization is 2 to 3 days. The surgeon practices liposuction, to suck only the best quality fat without damaging it, he uses a special capsule, very fine. Then, through tiny incisions, it injects small amounts of your fat into hundreds of different levels of the desired part of the buttocks. <br> <b> After the operation </ b> - Unimportant pain, analgesics will reduce pain. - It is necessary to wait 24 hours before sitting down, and 48 hours before walking. - It will take 3 months minimum to resume a sport where your gluteal muscles are solicited, and 3 weeks for a normal daily activity. - Bruising (blue) and edema (swelling) appear in the treated areas. - The scar remains very discreet, almost invisible. - In case of augmentation by prostheses, a period of two to three months is necessary to assess the final result. This is the time needed for the buttocks to regain all their flexibility and that the prostheses have stabilized. - The lifespan of the prostheses is about 10 years. Possible complication: - Regarding anesthesia, during the consultation, the anesthetist doctor will inform the patient of the anesthetic risks. It should be known that anesthesia induces in the body reactions sometimes unpredictable, and more or less easy to control: the fact of having recourse to a perfectly competent Anesthetist, exercising in a truly surgical context.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL); INSERT INTO `category` (`id`, `chirurgie_id`, `name`, `nameen`, `coverimage`, `description`, `descriptionen`, `backimage`, `details`, `detailsen`, `baimage`, `detailsimage`, `details1`, `details1en`, `detailsimage2`, `details2`, `details2en`, `detailsimage3`, `before_operation`, `before_operationen`, `before_operation1`, `before_operation1en`, `deroulement_operation`, `deroulement_operationen`, `after_operation`, `after_operationen`, `after_operation1`, `after_operation1en`, `complications`, `complicationsen`, `complications1`, `complications1en`, `tarifs`, `updated_at`) VALUES (14, 3, 'Lifting Des Cuisses\r\n', 'Thigh Lift', 'lifting-cuisses.jpg', 'Le lifting des cuisses est une chirurgie esthétique et réparatrice des cuisse qui consiste à retirer l’excès de peau sur la face interne des cuisses…', 'The lifting of the thighs is an aesthetic and restorative surgery of the thighs which consists of removing excess skin on the inner thighs ...', 'lifting-cuisses-couverture.jpg', 'La peau de l’intérieur des cuisses est fine et ses fibres élastiques fragiles. Elle est donc rapidement dégradée par le vieillissement naturel ou par les variations pondérales. Cette dégradation est souvent mal vécue et la demande de réparation est donc forte. Au problème de l’excès de peau s’associe souvent le problème d’un excès de graisse localisé à ce niveau. L’augmentation de son volume peut devenir gênant à la marche à cause du frottement. Lorsqu’il existe un relâchement de la peau au niveau de la face interne des cuisses, une liposuccion isolée ne peut suffire et seule une remise en tension de cette peau est susceptible de corriger ce défaut: c’est le lifting de la face interne de la cuisse. Le lifting des cuisses a alors pour but de réduire l’infiltration graisseuse par une liposuccion, mais aussi de supprimer l’excédent cutané et de suspendre solidement la peau restante afin de la retendre efficacement.', 'The skin on the inside of the thighs is thin and its elastic fibers fragile. It is therefore rapidly degraded by natural aging or by weight variations. This degradation is often badly experienced and the demand for repair is therefore strong. The problem of excess skin is often associated with the problem of excess fat located at this level. The increase of its volume can become annoying to the march because of the friction. When there is a loosening of the skin at the inner thighs, isolated liposuction can not suffice and only a re-tension of this skin is likely to correct this defect: it is the facelift of the inner face of thigh. The lifting of the thighs is then intended to reduce the fat infiltration by liposuction, but also to remove excess skin and to suspend the remaining skin solidly in order to resell it effectively.', 'lifting-cuisses-avant-apres.jpg', '', '<b>Avant l’opération:</b> – Un bilan pré-opératoire habituel est réalisé conformément aux prescriptions. – Le médecin anesthésiste sera vu en consultation au plus tard 24 heures avant l’intervention. – Aucun médicament contenant de l’aspirine ne devra être pris dans les 10 jours précédant l’intervention. – L’intervention nécessite un arrêt complet du tabac au moins un mois avant l’intervention puis jusqu’à cicatrisation (en général 15 jours après l’intervention). Le lifting de la face interne des cuisses peut être réalisé sous anesthésie générale ou sous anesthésie locale approfondie par des tranquillisants administrés par voie intra-veineuse. Le choix entre ces différentes techniques sera le fruit d’une discussion entre vous, le chirurgien et l’anesthésiste. La durée d’hospitalisation sera en moyenne de 1 à 3 jours selon les cas et la durée de l’intervention est en moyenne de 2 heures. L’intervention débute le plus souvent par une liposuccion (ou lipoaspiration) de la face interne des cuisses de façon à corriger tout excédent graisseux. Les amas graisseux (stéatoméries) sont aspirés par de très fines canules (4mm) de façon à préserver la qualité cutanée délicate de cette région pour un résultat égal et sans aspérités. Suite à la liposuccion, le chirurgien procède aux incisions qui permettront d’ôter les excédents de peau, et de lifter ainsi la cuisse. En fin d’intervention, on réalise un pansement à l’aide de bandes élastiques collantes ou bien on met en place un panty de liposuccion.', '<b> Before the operation: </ b> - A usual pre-operative check-up is carried out according to the prescriptions. - The anesthesiologist doctor will be seen in consultation at the latest 24 hours before the intervention. - No medication containing aspirin should be taken within 10 days of the procedure. - The intervention requires a complete stop of the tobacco at least one month before the intervention then until cicatrization (in general 15 days after the intervention). The facelift of the inner thighs can be performed under general anesthesia or under local anesthesia thorough tranquilizers administered intravenously. The choice between these different techniques will be the result of a discussion between you, the surgeon and the anesthesiologist. The duration of hospitalization will be on average from 1 to 3 days according to the cases and the duration of the intervention is on average of 2 hours. The procedure usually begins with liposuction (or liposuction) of the inner thighs to correct any excess fat. The fat deposits (steatomeries) are sucked by very fine cannulas (4mm) so as to preserve the delicate cutaneous quality of this region for an equal result and without asperities. Following liposuction, the surgeon makes the incisions that will remove excess skin, and lifter the thigh. At the end of the procedure, a bandage is made using sticky elastic bands or a liposuction panty is put in place.', 'lifting-cuisses-explication.jpg', '', '', '', '', '', '', '', '', '', '<b>Après l’opération</b> – Des ecchymoses (bleus) et un œdème (gonflement) peuvent apparaître. Ils régresseront pour l’essentiel dans les 10 à 20 jours suivant l’intervention. – Les douleurs sont en règle générale, supportables, avec un traitement adapté, à type de courbatures, de tiraillements ou d’élancements. – Dans tous les cas, il s’agit d’une chirurgie un peu invalidante car il y a gêne à la marche simplement à cause de la topographie des zones opérées. – La cicatrice est située au fond d’un profond sillon dans lequel il y a de l’humidité. La cicatrisation est donc toujours un peu plus longue qu’ailleurs en zone sèche. Durant cette période, il conviendra d’éviter tout mouvement d’étirement brutal comme par exemple en s’asseyant. – ll y a lieu de prévoir un arrêt de travail de 1 à 3 semaines, en fonction de la nature de l’activité professionnelle. – La pratique d’une activité sportive pourra être reprise progressivement à partir de la 6ème semaine post-opératoire. – La cicatrice est souvent rosée pendant les 3 premiers mois puis elle s’estompe en règle générale après le 3ème mois, et ce, progressivement pendant 1 à 3 ans. – Elle ne doit pas être exposée au soleil ni aux UV avant 3 mois. – Le résultat n’est apprécié qu’à partir d’un délai de 6 à 12 mois après l’intervention. Il convient en effet, d’avoir la patience d’attendre le temps nécessaire à l’atténuation de la cicatrice. Complications envisageables: – En ce qui concerne l’anesthésie, lors de la consultation, le médecin anesthésiste informera lui-même le patient des risques anesthésiques. Il faut savoir que l’anesthésie induit dans l’organisme des réactions parfois imprévisibles, et plus ou moins faciles à maîtriser : le fait d’avoir recours à un Anesthésiste parfaitement compétent, exerçant dans un contexte réellement chirurgical fait que les risques encourus sont devenus statistiquement très faibles. Il faut savoir, en effet, que les techniques, les produits anesthésiques et les méthodes de surveillance ont fait d’immenses progrès ces trente dernières années, offrant une sécurité optimale, surtout quand l’intervention est réalisée en dehors de l’urgence et chez une personne en bonne santé. – En ce qui concerne le geste chirurgical : en choisissant un Chirurgien Plasticien qualifié et compétent, formé à ce type d’intervention, vous limitez au maximum ces risques, sans toutefois les supprimer complètement. En effet, des complications peuvent survenir au décours d’un lifting de la face interne des cuisses qui constitue une des interventions les plus délicates de la chirurgie plastique et esthétique. Parmi ces complications envisageables, il faut citer : • Les accidents thrombo-emboliques (phlébite, embolie pulmonaire), bien que globalement assez rares après ce type d’intervention, sont parmi les plus redoutables. Des mesures préventives rigoureuses doivent en minimiser l’incidence : port de bas anti-thrombose, lever précoce, éventuellement traitement anti-coagulant. • La survenue d’un hématome, en fait assez rare, peut justifier une évacuation afin de ne pas risquer d’altérer secondairement la qualité esthétique du résultat. • La survenue d’une infection est favorisée par la proximité des orifices naturels (gîte microbien) et est prévenue par une hygiène pré et post-opératoire rigoureuse jusqu’à la cicatrisation complète. Son traitement peut faire appel à une prescription d’antibiotiques, et selon les cas, à une reprise chirurgicale, éventuellement un drainage. • On observe parfois à partir du 8ème jour post-opératoire, la survenue d’un épanchement lié à un écoulement de lymphe et à un suintement de la graisse. La compression et le repos en constituent les meilleures préventions. Un tel épanchement doit parfois être ponctionné et il s’assèche en général sans séquelle particulière. • Unretard de cicatrisation est possible • Une nécrose cutanée est parfois observée, en règle limitée et localisée. Les nécroses importantes sont, en fait, rares. Elles sont beaucoup plus fréquentes chez les fumeur(se)s, surtout si l’arrêt du tabac n’a pas été strictement respecté. • Des altérations de la sensibilité, notamment la diminution de la sensibilité de la partie haute de la face interne de la cuisse peuvent persister même si la sensibilité normale réapparaît le plus souvent dans un délai de 6 à 12 mois au décours de l’intervention. Au total, il ne faut pas surévaluer les risques, mais simplement prendre conscience qu’une intervention chirurgicale, même apparemment simple, comporte toujours une petite part d’aléas. Le recours à un Chirurgien Plasticien qualifié vous assure que celui-ci a la formation et la compétence requises pour savoir éviter ces complications, ou les traiter efficacement le cas échéant.', '<b> After the operation </ b> - Bruising (blue) and edema (swelling) may appear. They will regress for the most part within 10 to 20 days following the intervention. - Pains are generally bearable, with a suitable treatment, such as aches, tugging or throbbing. - In all cases, this is a somewhat disabling surgery because it hinders walking simply because of the topography of the operated areas. - The scar is located at the bottom of a deep groove in which there is moisture. The healing is always a little longer than elsewhere in the dry zone. During this period, it will be advisable to avoid any sudden stretching movement as for example by sitting down. - It is necessary to provide for a work stoppage of 1 to 3 weeks, depending on the nature of the professional activity. - The practice of a sports activity can be resumed gradually from the 6th week postoperative. - The scar is often pink during the first 3 months then it fades as a rule after the 3rd month, and gradually for 1 to 3 years. - It must not be exposed to the sun or UV before 3 months. - The result is appreciated only after a delay of 6 to 12 months after the intervention. It is indeed necessary to have the patience to wait for the necessary time to attenuate the scar. Possible complications: - With regard to anesthesia, during the consultation, the anesthesiologist doctor will inform the patient of the anesthetic risks. It should be known that anesthesia induces in the body reactions sometimes unpredictable, and more or less easy to control: the fact of having recourse to a perfectly competent Anesthetist, exercising in a really surgical context makes that the risks incurred have become statistically very weak. In fact, techniques, anesthetic products and surveillance methods have made tremendous progress over the last thirty years, providing optimal safety, especially when the operation is performed outside the emergency department and at home. a person in good health. - Regarding the surgical procedure: by choosing a qualified and competent Plastic surgeon, trained in this type of intervention, you minimize these risks, but do not completely eliminate them. Indeed, complications can occur during a lifting of the inner thighs which is one of the most delicate interventions of plastic surgery and aesthetics. Among these possible complications, we must mention: • Thromboembolic events (phlebitis, pulmonary embolism), although generally rare after this type of intervention, are among the most formidable. Rigorous preventive measures must minimize the incidence: low anti-thrombosis, early lifting, possibly anti-coagulant treatment. • The occurrence of a hematoma, in fact quite rare, may justify evacuation so as not to risk secondarily altering the aesthetic quality of the result. • The occurrence of an infection is favored by the proximity of natural orifices (microbial deposit) and is prevented by thorough pre- and postoperative hygiene until complete healing. Its treatment may involve a prescription of antibiotics, and depending on the case, a surgical revision, possibly a drainage. • From the 8th day postoperative, the occurrence of an effusion related to lymph flow and oozing of fat is sometimes observed. Compression and rest are the best preventions. Such an effusion must sometimes be punctured and it dries in general without any particular sequelae. • A healing delay is possible • Cutaneous necrosis is sometimes observed, in limited and localized rule. Important necroses are, in fact, rare. They are much more common among smokers, especially if smoking cessation has not been strictly observed. • Changes in sensitivity, including decreased sensitivity of the upper thigh may persist even if normal sensitivity is most commonly seen within 6 to 12 months of the procedure. In total, one should not overstate the risks, but simply be aware that a surgical procedure, even apparently simple, always has a small share of hazards. The use of a qualified plastic surgeon ensures that he has the training and skills required to know how to avoid these complications, or treat them effectively if necessary.', '', '', '', '', '', '', '<b>Tarifs:</b>\r\nLe lifting des cuisses coûte <b>1500 euros</b>', NULL), (15, 4, 'Nymphoplastie', 'Nymphoplasty', 'Nymphoplastie-2.jpg', 'Responsable d’une gêne sexuelle et psychologique chez les femmes, les lèvres ayant une taille excessive peuvent être traitées grâce à une intervention chirurgicale…', 'Responsible for sexual and psychological embarrassment in women, the lips having an excessive size can be treated thanks to a surgical intervention ...', 'Nymphoplastie-couverture.jpg', 'La <b>labioplastie</b> est une opération du chirurgie intime visant le traitement du vieillissement des grandes lèvres génitales. Les patientes concernées par ce type de chirurgie ont, en plus d’une gêne fonctionnelle, une morphologie qui entraîne un complexe, et un obstacle à une vie sexuelle épanouie dans certains cas.', '<B> Labioplasty </ b> is an intimate surgery operation aimed at treating the aging of the genital labia. Patients involved in this type of surgery have, in addition to functional discomfort, a morphology that leads to a complex, and an obstacle to a sex life fulfilled in some cases.', 'Nymphoplastie-avant-apres.png', '', '<b>Le déroulement de l’opération</b>: L’intervention se déroule sous courte anesthésie générale et dure environ 1 heure. L’hospitalisation est le plus souvent en ambulatoire. Le chirurgien pratique l’exérèse de l’excès de muqueuse des petites lèvres génitales après avoir réalisé un dessin pré-opératoire. Selon la localisation et l’importance de l’excès la technique diffère: cicatrice longitudinale (le plus souvent) ou transversale. Par la suite, s’agissant d’une muqueuse la cicatrice ne se verra généralement plus.\r\n<br> <b>Après l’opération</b>: – Les suites opératoires sont généralement peu douloureuses, il peut exister une gêne à la marche ou la station assise prolongée pendant quelques jours. – Une toilette intime soigneuse devra être faite, plusieurs fois par jour, après les mictions. – Il est préférable de porter des vêtements amples (idéalement des jupes plutôt que des pantalons) et des dessous en coton pendant 8 à 15 jours. – Les sutures sont faites avec des fils résorbables. Il n’y a donc aucun point à retirer. – Le sport et les rapports sexuels sont déconseillés pendant 1 mois. – Il faut prévoir d’arrêter de travailler 1 à 5 jours en fonction de son activité professionnel.', '<b> The progress of the operation </ b>: The procedure takes place under short general anesthesia and lasts about 1 hour. Hospitalization is most often outpatient. The surgeon practices excision of excess mucosa from the small genital lips after performing a pre-operative design. Depending on the location and extent of the excess, the technique differs: longitudinal (most often) or transverse scar. Subsequently, in the case of a mucosa, the scar will usually not be seen anymore. <br> <b> After the operation </ b>: - The postoperative course is generally not painful, there may be discomfort when walking or sitting for a few days. - A careful personal hygiene should be done, several times a day, after the urination. - It is best to wear loose clothing (ideally skirts rather than pants) and cotton bottoms for 8 to 15 days. - The sutures are made with absorbable threads. There is therefore no point to withdraw. - Sports and sex are not recommended for 1 month. - You must plan to stop working 1 to 5 days depending on your professional activity.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (16, 4, 'Pénoplastie', 'Penoplasty', 'Penoplastie.jpg', 'Cette intervention concerne les hommes dont le pénis leur cause des préoccupations physiques et psychologiques…\r\n\r\n', 'This intervention concerns men whose penis causes them physical and psychological concerns ...', 'Penoplastie-couverture.jpg', 'La <b>pénoplastie</b> esthétique permet un allongement et/ou un élargissement et s’adresse à des hommes dont le pénis a le plus souvent une taille dans les limites de la normale, mais qui leur cause des préoccupations physiques et psychologiques. La <b>pénoplastie d’élargissement</b> permet d’obtenir un gain sur la circonférence de la verge, tant au repos qu’en érection. C’est l’intervention la plus fréquente. La pénoplastie d’élargissement se fait par l’intermédiaire d’une lipostructure ou lipofiling. Elle consiste à augmenter le calibre de la verge en y injectant de la graisse. Il s’agit d’une auto-greffe de cellules graisseuses par réinjection de la graisse prélevée sur le patient lui-même. Ce qui aboutit à une augmentation du volume de la verge tant au repos qu’en érection. La <b>pénoplastie d’allongement</b> qui n’est effective que sur la verge au repos, s’adresse souvent à des sportifs car elle ne saurait améliorer les hommes qui ont une ambition pour leur vie sexuelle. L’allongement s’effectue par la libération du ligament suspenseur de la verge qui relie les corps caverneux à l’os du pubis afin de désenfouir le sexe. Ainsi, la verge se trouve extériorisée et les corps caverneux sont libérés. On obtient ainsi un allongement de 2 à 5 cm, mais le gain ne concerne que la verge flaccide.', 'The aesthetic <b> penoplasty </ b> allows an elongation and / or enlargement and is intended for men whose penis is often of a size within the limits of normal, but which causes them physical and psychological concerns . The <b> enlargement penoplasty </ b> provides a gain on the circumference of the penis, both at rest and in erection. This is the most common intervention. The enlargement penoplasty is done through a lipostructure or lipofiling. It consists of increasing the caliber of the penis by injecting fat. It is a self-graft of fat cells by reinjection of the fat taken from the patient himself. This results in an increase in the volume of the penis both at rest and erection. The <b> lengthening penoplasty </ b> which is effective only on the penis at rest, is often addressed to athletes because it can not improve men who have an ambition for their sex life. Elongation is achieved by releasing the suspensory ligament of the penis that connects the corpora cavernosa to the pubic bone to disengage the sex. Thus, the rod is exteriorized and the corpora cavernosa are released. An elongation of 2 to 5 cm is thus obtained, but the gain only concerns the flaccid penis.', 'La-penoplastie-dallongement.png', 'La-penoplastie-delargissement.png', '', '', '', '', '', '', '', '', '', '', '', '', '<b>Déroulement de l’opération: Pénoplastie d’élargissement</b>: la graisse est prélevée à l’aide d’une fine canule d’aspiration par des incisions bien dissimulées sur le ventre, les cuisses ou une autre région en fonction des cas. Le choix des sites de prélèvements est fonction de la quantité de graisse jugée nécessaire et des possibilités. La quantité de graisse prélevée dépend des réserves du patient et aussi de la morphologie de la verge. La graisse est ensuite traitée par lavage et centrifugation (technique de Coleman). Puis elle est réinjectée à partir de petites incisions à l’aide de fines canules sous forme de micro particules entre la peau du fourreau de la verge et les corps caverneux, en réalisant de nombreux trajets indépendants afin d’obtenir un résultat harmonieux. La lipostructure est une méthode définitive, mais les cellules graisseuses greffées sont sensibles aux variations de poids du patient, aussi est-il conseillé d’avoir une stabilité pondérale. En fin d’intervention, un pansement léger est placé sur la verge ainsi que sur les points de prélèvement de graisse. L’opération peut durer de 1h à 1h30. Pénoplastie d’allongement: le tracé de l’incision aboutit à une cicatrice de forme variable, soit en Y inversé situé sur le pubis et descendant sur le scrotum, soit en forme de Z. Parfois, selon la morphologie du scrotum une petite incision complémentaire est nécessaire à la racine de la verge sur les bourses. Un pansement hermétique non compressif est confectionné en fin d’intervention. L’opération peut durer de 1h à 1h30. Le gain obtenu (2 à 5 cm) dépend des conditions anatomiques rencontrées et est donc impossible à prévoir en pré-opératoire. La verge est bien allongée à l’état flaccide le gain est le plus souvent minime en érection. <br><b> Après l’opération: Pénoplastie d’élargissement:</b> – La verge apparaît très gonflée durant les jours suivant l’intervention. – Les douches sont autorisées dès le lendemain. Aucun pansement n’est nécessaire. – Le port d’un caleçon ample est conseillé pendant les premières semaines, et non celui du slip qui pourrait provoquer une compression inadéquate. – Un arrêt de travail n’est généralement pas nécessaire. – Les fils de suture se résorbent en principe en dix à quinze jours, date à laquelle la cicatrisation est obtenue. – On conseille d’attendre deux à trois semaines pour la reprise progressive d’une activité sexuelle qui reste néanmoins possible dès la fin du traitement anti-érection. Le port d’un préservatif lubrifié sera apprécié afin d’éviter toute irritation. <br><b>Pénoplastie d’allongement</b>: – Un œdème et des ecchymoses sont habituels après un allongement. – Des soins locaux attentifs et très précautionneux seront effectués quotidiennement pendant une dizaine de jours jusqu’à cicatrisation complète. – Le port d’un slip de maintien par-dessus les pansements est obligatoire pendant quinze jours afin d’éviter toute traction sur la cicatrice. – Les fils de suture se résorberont en principe en dix à quinze jours, date à laquelle la cicatrisation est obtenue. – Les douches seront réautorisées après cicatrisation complète. – On conseille d’attendre trois semaines pour la reprise progressive d’une activité sexuelle. – Il y a lieu de prévoir un arrêt de travail de 5 à 10 jours en fonction de la nature de l’activité professionnelle.', '<b> Procedure: Enlargement Penoplasty </ b>: The fat is removed using a fine suction cannula with well-concealed incisions on the abdomen, thighs or other region of the body. case function. The choice of sampling sites depends on the amount of grease deemed necessary and the possibilities. The amount of fat removed depends on the patient\'s reserves and also the morphology of the penis. The fat is then treated by washing and centrifugation (Coleman technique). Then it is reinjected from small incisions using fine cannulas in the form of microparticles between the skin of the shaft of the penis and the corpora cavernosa, performing many independent paths to obtain a harmonious result. Lipostructure is a definitive method, but grafted fat cells are sensitive to variations in patient weight, so it is advisable to have weight stability. At the end of the procedure, a light dressing is placed on the penis as well as on the fat sampling points. The operation can last from 1h to 1h30. Penetration lengthening: the incision leads to a scar of variable shape, either inverted Y on the pubis and descending on the scrotum, or Z-shaped. Sometimes, depending on the morphology of the scrotum, a small incision complementary is needed at the root of the penis on the purses. A non-compressive hermetic dressing is made at the end of the procedure. The operation can last from 1h to 1h30. The gain obtained (2 to 5 cm) depends on the anatomical conditions encountered and is therefore impossible to predict preoperatively. The penis is well elongated flaccid gain is usually minimal erection. <br> <b> After the operation: Enlargement Penoplasty: </ b> - The penis appears very swollen during the days following the procedure. - Showers are allowed the next day. No dressing is needed. - It is advisable to wear loose-fitting underpants during the first weeks, and not wearing a pair of underpants, which could lead to inadequate compression. - A work stoppage is not usually necessary. The sutures resorb in principle in ten to fifteen days, at which time scarring is obtained. - It is advisable to wait two to three weeks for the gradual resumption of sexual activity that remains possible after the end of anti-erection treatment. Wearing a lubricated condom will be appreciated to avoid irritation. <br> <b> Lengthening Penoplasty </ b>: - Edema and bruising are common after lengthening. - Local attentive and very cautious care will be carried out daily for ten days until complete healing. - Wearing a pair of underpants over the bandages is mandatory for a fortnight to prevent traction on the scar. - The suture son will resorb in principle in ten to fifteen days, date at which healing is obtained. - The showers will be reauthorized after complete healing. - It is advisable to wait three weeks for the gradual resumption of sexual activity. - There should be a work stoppage of 5 to 10 days depending on the nature of the professional activity.', '', '', '', '', '', '', '', NULL), (17, 5, 'Prothèse Du Genou\r\n', 'Knee Prosthesis', 'prothese-genoux.jpg', 'La prothèse du genou est la solution la plus adéquate pour les patients souffrant d’une arthrose du genou…', 'The knee prosthesis is the most suitable solution for patients suffering from osteoarthritis of the knee ...', 'prothese-genou-couverrture.jpg', 'Le traitement de <b>l’arthrose du genou</b> répond actuellement quand la marche est <b>douloureuse et l’articulation enraidie</b> à la mise en place d’une prothèse totale. Cette intervention permet de restaurer une <b>mobilité articulaire</b> et un appui non douloureux assurant la reprise des activités physiques dans les meilleures conditions. L’arthrose est l’usure du cartilage présent au niveau des <b>surfaces de glissement</b>. Elle débute en général sur une petite partie de l’articulation puis s’étend avec une vitesse variable à l’ensemble de l’articulation. Avec la disparition du cartilage, les zones osseuses se retrouvent directement en contact, le glissement articulaire devient alors difficile et douloureux. Progressivement l’os se déforme ainsi que l’articulation. Des becs osseux (appelés ostéophytes) apparaissent et contribuent à l’enraidissement douloureux du genou rendant de par ce fait la marche de <b>plus en plus difficile</b>. Les causes de l’arthrose sont souvent multiples et liées : âge, excès pondéral, traumatismes, déformation articulaire congénitale, maladies inflammatoires. Le but de la prothèse du genou est d’enlever les zones d’os et de cartilage qui sont usés, et de les remplacer par des pièces artificielles ayant les mêmes formes. Ces pièces sont en céramique et sont articulées entre elles.', 'The treatment of <b> osteoarthritis of the knee </ b> currently responds when walking is <b> painful and the joint stiffness </ b> to the establishment of a total prosthesis. This procedure makes it possible to restore <b> articular mobility </ b> and a painless support ensuring the resumption of physical activities in the best conditions. Osteoarthritis is the cartilage wear present at <b> sliding surfaces </ b>. It usually starts on a small part of the joint and then extends with variable speed to the entire joint. With the disappearance of the cartilage, the bone areas are found directly in contact, the joint slip then becomes difficult and painful. Gradually the bone is deformed as well as the joint. Bony beaks (called osteophytes) appear and contribute to the painful stiffness of the knee thereby making <b> progress more and more difficult </ b>. The causes of osteoarthritis are often multiple and related: age, overweight, trauma, congenital joint deformity, inflammatory diseases. The purpose of the knee prosthesis is to remove the areas of bone and cartilage that are worn, and replace them with artificial parts having the same shapes. These pieces are ceramic and are articulated together.', 'prothese-de-genoux-explication.jpg', '', '<b>Déroulement de l’opération</b>: C’est une intervention qui dure en moyenne 75 minutes sous anesthésie générale ou rachi-anesthésie. Elle nécessite une hospitalisation d’environ 5 jours. Une incision est réalisée au niveau de la partie antérieure du genou, elle est de 15 cm environ. L’abord du genou se fait à la partie interne de la rotule qui est poussée sur le coté pour accéder à l’articulation. Le cartilage usé est enlevé ainsi que les tissus inflammatoires et les excroissances osseuses. Le fémur, le tibia et la rotule sont alors préparés pour recevoir la prothèse. Les coupes osseuses sont très précisément définies afin de s’adapter parfaitement à la prothèse choisie. Cette prothèse est implantée de manière à assurer une stabilité parfaite du genou avec la mobilité la plus complète possible. La meilleure option est une prothèse en céramiqueafin de maximiser sa durée de vie (entre 25-30 ans). La fermeture cutanée se fait avec des fils résorbables ou des agrafes. Des redons (petits tuyaux) seront mis en place durant l’intervention pour éviter les hématomes, ils seront laissés en place durant 3 jours en moyenne.\r\n <br><b>Après l’opération</b>: – Un pansement stérile est mis en place pendant 3 semaines – Une attelle sert à immobiliser et à protéger votre genou pendant les premiers jours et surtout très utile pour effectuer les premiers pas. – Le lendemain de l’intervention, le kinésithérapeute vous lève et vous aide à marcher. L’appui complet sur le membre inférieur opéré est tout de suite autorisé. Des cannes sont utiles les premiers jours et peuvent être rapidement abandonnées en fonction de vos possibilités. – La récupération de la flexion du genou est très importante. Les 90° de flexion doivent impérativement être atteint à la fin de la première semaine . – La montée et la descente des escaliers se travaillent à partir du 3ème jour. A la sortie de la clinique, la rééducation peut être réalisée à domicile, chez un kinésithérapeute ou en centre de rééducation. – La reprise du volant est envisageable après le 1er mois. Celle du travail survient en général après le 2ème mois et cela en fonction de votre profession, une activité de bureau pouvant être plus précoce. Les activités sportives débutent progressivement après le 3ème mois.', '<b> Procedure of the operation </ b>: It is an intervention that lasts an average of 75 minutes under general anesthesia or rachi-anesthesia. It requires hospitalization for about 5 days. An incision is made at the anterior part of the knee, it is about 15 cm. The approach of the knee is made to the inner part of the kneecap which is pushed on the side to access the joint. Used cartilage is removed as well as inflammatory tissues and bone growths. The femur, tibia and patella are then prepared to receive the prosthesis. The bone sections are very precisely defined to fit perfectly to the chosen prosthesis. This prosthesis is implanted to ensure perfect knee stability with the most complete mobility possible. The best option is a ceramic prosthesis to maximize its lifespan (between 25-30 years). Closing is done with resorbable threads or staples. Redons (small tubes) will be put in place during the procedure to avoid bruising, they will be left in place for 3 days on average.  <br> <b> After the operation </ b>: - A sterile bandage is put in place for 3 weeks - A splint is used to immobilize and protect your knee during the first days and especially very useful to take the first steps . - The day after the procedure, the physiotherapist gets up and helps you to walk. Full support on the operated lower limb is immediately allowed. Canes are useful the first days and can be quickly abandoned according to your possibilities. - Recovery of knee flexion is very important. The 90 ° flexion must imperatively be reached at the end of the first week. - The ascent and descent of the stairs are working from the 3rd day. At the end of the clinic, rehabilitation can be performed at home, at a physiotherapist or rehabilitation center. - The recovery of the steering wheel is possible after the first month. That of work usually occurs after the 2nd month and that according to your profession, an office activity can be earlier. Sports activities begin gradually after the 3rd month.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (18, 5, 'Prothèse De La Hanche\r\n', 'Hip Prosthesis', 'prothese.jpg', 'La mise en place d’une prothèse de hanche est devenue une des interventions chirurgicales les plus gratifiantes, pour le patient souffrant d’arthrose de hanche…', 'The establishment of a hip prosthesis has become one of the most rewarding surgical procedures for patients with hip osteoarthritis ...', 'Prothese-de-la-hanche-couverture.jpg', 'Une prothèse de la hanche est surtout proposée aux personnes qui souffrent d’arthrose ou de polyarthrite rhumatoïde et qui ont généralement plus de 50 ans. Elle peut aussi être mise en place suite à une nécrose de la tête fémorale ou à une fracture du col du fémur. L’intervention est envisagée lorsque les douleurs deviennent importantes, lorsque les douleurs s’accompagnent d’une impossibilité à se déplacer normalement ou lorsque le traitement médicamenteux devient insuffisant. Les objectifs de la prothèse totale de la hanche sont d’apaiser les douleurs, de redonner de la mobilité à l’articulation et de corriger les éventuelles déformations.', 'A hip prosthesis is especially available to people who have osteoarthritis or rheumatoid arthritis and are usually over 50 years old. It can also be put in place following necrosis of the femoral head or fracture of the neck of the femur. The intervention is considered when the pains become important, when the pains are accompanied by an impossibility to move normally or when the medical treatment becomes insufficient. The objectives of the total hip prosthesis are to soothe the pain, to restore mobility to the joint and correct any deformities.', 'Prothese-hanche-explication.jpg', '', '<b>Déroulement de l’opération: Prothèse totale de la hanche</b>: Cette opération nécessite une anesthésie générale ou péridurale, dure 1h30 en moyenne et nécessite 5 jours d’hospitalisation. Pendant l’opération, le chirurgien va remplacer la tête du fémur par une demi-sphère (en métal ou en céramique) montée sur une tige et la cavité dans laquelle s’articule la tête du fémur (le cotyle) par une surface lisse (en plastique ou en métal recouvert de polyéthylène). La prothèse se fixe dans le fémur soit par du ciment (il s’agit d’une résine acrylique qui va se solidifier en une dizaine de minutes), soit par compression si la qualité de l’os est bonne (chez les patients les plus jeunes). Dans les fixations sans ciment on fait en sorte que l’os repousse directement sur et dans la prothèse, de façon à l’intégrer parfaitement à l’organisme. <br>\r\n<b>Après l’opération</b>: – Dès le deuxième jour après l’opération, le patient peut s’asseoir sur une chaise. – Les drains de redon (petits tuyaux positionnés sous la cicatrice pour aspirer le sang et éviter un hématome), sont retirés le troisième jour. – La marche est débutée avec des béquilles le plus rapidement possible dans les jours qui suivent l’intervention pour éviter la survenue d’une phlébite (caillot de sang dans une veine de la jambe). – Une rééducation est nécessaire, elle débute en hospitalisation et se poursuit dans un centre ou à domicile avec l’aide d’un masseur-kinésithérapeute pendant 2 à 4 semaines environ. – Certaines règles de vie et de positionnement de la jambe sont à respecter surtout pendant les premiers mois pour éviter une luxation de la prothèse c’est-à-dire un déboîtement.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (19, 5, '<NAME>\r\n', '<NAME>', 'Valigus.jpg', 'Une intervention chirurgicale peut remédier à cette déformation de l’avant-pied, qui touche davantage les femmes que les hommes et peut apparaître à tout âge…', 'Surgery can cure this distortion of the forefoot, which affects more women than men and can occur at any age ...', 'Valigus.jpg', '<b>L’hall<NAME></b>, qu’on appelle aussi <b>« oignon«</b> , correspond à une déviation anormale du gros orteil vers le deuxième orteil qui entraîne une déformation de l’avant-pied, au niveau du premier métatarsien et du gros orteil. Le défaut d’alignement du gros orteil entraîne la formation d’un « oignon », qui correspond à une saillie osseuse située en regard de la déformation, et qui est aggravée par la marche. <b>Les femmes</b> sont principalement atteintes par l’hallux valgus (dans 95% des cas). Parmi les autres causes et facteurs de risques on trouve l’hérédité, le port de chaussures inadaptées (ex : trop étroites ou pointues), talons hauts, le pied égyptien (excès de longueur du gros orteil), le pied plat (valgus), l’âge : l’hallux valgus débute généralement entre 40 et 50 ans et la ménopause chez la femme. L’objectif de la chirurgie de l’hallux valgus est de <b>corriger la désaxation</b> du gros orteil vers l’extérieur. Elle supprime la douleur, et rend au gros orteil son rôle propulseur.', '<b> The hallux valgus </ b>, also known as <b> \"onion\" </ b>, is an abnormal deviation from the big toe to the second toe resulting in deformation of the forefoot at the level of the first metatarsal and big toe. The misalignment of the big toe causes the formation of an \"onion\", which corresponds to a bone projection located opposite the deformation, and which is aggravated by walking. <b> Women </ b> are mainly affected by hallux valgus (in 95% of cases). Other causes and risk factors include heredity, wearing unsuitable shoes (eg too narrow or pointed), high heels, Egyptian foot (excess length of big toe), flat foot (valgus), Age: The hallux valgus usually begins between 40 and 50 years and menopause in women. The goal of hallux valgus surgery is to <b> correct the misalignment </ b> of the big toe outwards. It removes the pain, and makes the big toe its propulsive role.', 'Hallux-Valgus.png', '', '<b>Déroulement de l’opération</b>: L’intervention qui nécessite 1 nuit d’hospitalisation, est effectuée sous anesthésie locorégionale et garrot de cheville et dure généralement de 20 à 40 minutes. La technique opératoire la plus couramment employée est la double section de l’os (ostéotomie) du 1er métatarsien et de la 1ère phalange. Elle est associée à un geste chirurgical permettant de libérer les tissus rétractés. Les fragments osseux déplacés sont fixés à l’aide de vis, d’agrafes, voire de broches. \r\n<br><b>Après l’opération</b>: – La marche est possible le jour suivant l’intervention. Elle nécessite le port de chaussures spéciales, en appui sur le talon, pendant une durée allant de trois à quatre semaines. – Les exercices d’auto-rééducation, qui débutent environ 15 jours après l’opération, occupent une place importante dans la récupération de l’amplitude articulaire. – Des séances de kinésithérapie sont prescrites à partir de la 3ème semaine suivant l’intervention. – La marche sportive, peut être reprise environ deux mois après l’intervention, sous contrôle médical.', '<b> Conduct of the operation </ b>: The procedure, which requires 1 night of hospitalization, is performed under locoregional anesthesia and tourniquet and generally lasts 20 to 40 minutes. The most commonly used surgical technique is the double section of the bone (osteotomy) of the 1st metatarsal and the 1st phalanx. It is associated with a surgical procedure to release the retracted tissues. The displaced bone fragments are fixed using screws, staples or even pins. <br> <b> After the operation </ b>: - Walking is possible the day after surgery. It requires the wearing of special shoes, supported on the heel, for a period of three to four weeks. - The self-rehabilitation exercises, which begin about 15 days after the operation, occupy an important place in the recovery of the range of motion. - Physiotherapy sessions are prescribed from the 3rd week following the intervention. - The sports walk, can be resumed approximately two months after the intervention, under medical supervision.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (20, 5, 'Hernie Discale\r\n', 'Herniated disc', 'Hernie-Discale-1.jpg', 'La hernie discale est une affection des disques intervertébraux, qui se caractérise le plus souvent par une lombalgie ou une sciatique…', 'The herniated disc is an affection of the intervertebral discs, which is characterized most often by lumbago or sciatica ...', 'hernie-discale-couverture.jpg', 'Parfois appelée fissure ou rupture du disque, la <b>hernie discale lombaire</b> apparaît le plus souvent dans le <b>bas du dos</b>. Elle est une des causes les plus fréquentes de <b>mal de dos</b> ou de sciatique. L’hernie discale est une saillie anormale d’une portion d’un disque intervertébral situé dans le <b>canal rachidien</b> se produisant généralement entre la quatrième et la cinquième vertèbre lombaire ou entre la cinquième vertèbre lombaire et le sacrum.', 'Sometimes referred to as a crack or rupture of the disc, <b> lumbar disc herniation </ b> occurs most often in the <b> lower back </ b>. It is one of the most common causes of <b> back pain </ b> or sciatica. The herniated disc is an abnormal projection of a portion of an intervertebral disk located in the <b> spinal canal </ b> occurring generally between the fourth and fifth lumbar vertebrae or between the fifth lumbar vertebra and the sacrum.', 'hernie-discale.jpg', '', '<b>Déroulement de l’opération</b>: Le patient est placé en position génupectorale (en génuflexion), grâce à une table chirurgicale spéciale en forme de Z. Une incision de 4 à 5 cm est pratiquée au milieu du dos avant de décoller les muscles situés du côté douloureux pour atteindre l’espace localisé entre les deux vertèbres. Cet espace ouvert, la hernie discale et la racine nerveuse comprimée sont visibles. La libération de la racine nerveuse est vérifiée, puis la hernie discale est enlevée, ainsi qu’une grande partie du disque, pour réduire au minimum le risque de récidive postopératoire.', '<b> Procedure of the operation </ b>: The patient is placed in genupectoral position (in genuflection), thanks to a special Z-shaped surgical table. A 4 to 5 cm incision is made in the middle of the front back to take off the muscles located on the painful side to reach the space between the two vertebrae. This open space, disc herniation and compressed nerve root are visible. The release of the nerve root is verified, then the disc herniation is removed, as well as a large part of the disc, to minimize the risk of postoperative recurrence.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (21, 6, 'Gastroplastie (Anneau Gastrique)', 'Gastroplasty (Gastric Ring)', 'anneau-gastrique-gastroplastie.jpg', 'Cette technique permet une perte de poids d’environ 20 à 30 kg. Le principe est simple : grâce à l’anneau placé autour de l’estomac, le patient est rassasié avec de faibles quantités de nourriture..', 'This technique allows a weight loss of about 20 to 30 kg. The principle is simple: thanks to the ring placed around the stomach, the patient is satiated with small amounts of food.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL); INSERT INTO `category` (`id`, `chirurgie_id`, `name`, `nameen`, `coverimage`, `description`, `descriptionen`, `backimage`, `details`, `detailsen`, `baimage`, `detailsimage`, `details1`, `details1en`, `detailsimage2`, `details2`, `details2en`, `detailsimage3`, `before_operation`, `before_operationen`, `before_operation1`, `before_operation1en`, `deroulement_operation`, `deroulement_operationen`, `after_operation`, `after_operationen`, `after_operation1`, `after_operation1en`, `complications`, `complicationsen`, `complications1`, `complications1en`, `tarifs`, `updated_at`) VALUES (22, 6, '<NAME>', 'Gastric Sleeve', 'sleeve-gastrectomie.jpg', 'Cette technique, qui est la plus fréquemment pratiquée, permet une perte de poids entre 50kg et 70kg. Elle consiste à retirer environ les 2/3 de l’estomac afin de former un tube..', 'This technique, which is the most frequently practiced, allows weight loss between 50kg and 70kg. It consists of removing about 2/3 of the stomach to form a tube.', 'Sleeve-Couverture.jpg', 'Également appelée gastroplastie verticale calibrée avec résection gastrique, la sleeve gastrectomie correspond à une procédure chirurgicale pratiquée au niveau de l’appareil digestif sur des patients atteints d’obésité morbide. Cette opération consiste en une ablation d’une partie de l’estomac afin que celui-ci forme un tube. La sleeve gastrectomie permet aux patients de perdre un poids considérable en provoquant une sensation de satiété rapide engendrée par la réduction du taux de gréline, l’hormone de l’appétit.', 'Also referred to as vertical gastroplasty calibrated with gastric resection, sleeve gastrectomy is a surgical procedure performed in the digestive system in patients with morbid obesity. This operation involves removing a portion of the stomach so that it forms a tube. Sleeve gastrectomy allows patients to lose considerable weight by causing a sensation of rapid satiety caused by the reduction of the appetite hormone, grelin.', 'sleeve-gastrectomie.png', '', '<b>Déroulement de l’opération</b>: L’opération dure entre 1h30 et 2h, sous anesthésie générale et nécessite 5 jours d’hospitalisation. La sleeve consiste à retirer environ les <b>2/3 de l’estomac</b>, afin de former un tube. Cette technique restrictive consiste à retirer la partie contenant les cellules qui secrètent l’hormone stimulant l’appetit (ghréline). L’estomac est réduit à un tube vertical et les aliments passent rapidement dans l’intestin. Le patient peut perdre entre <b>45 à 60 kg</b>. Cette technique diminue la capacité de l’estomac et ralentit le passage des aliments dans l’estomac. La sleeve ne perturbe pas la digestion des aliments, ils sont d’abord ralentis pendant leur passage dans le tube, puis évacués très rapidement dans l’intestin.<br>\r\n<b>Après l’opération</b>: – Les patients sont autorisés à prendre des aliments liquides dès le lendemain de l’intervention et la mobilisation est très précoce, au mieux le soir même. – L’intervention est peu douloureuse en post-opératoire, la prise d’antalgiques simples suffit. – Reprise d’une activité légère après l’opération – Reprise des activités professionnels après 3 ou 4 semaines et reprise de l’activité sportive au bout de 1 mois après l’intervention – La 1ère semaine suivant la pose de l’anneau l’alimentation sera mixée (soupe, compotes, yaourt, purée etc.). La 2ème et 3ème semaine l’alimentation devra être de texture “tendre” (ratatouille, œufs brouillés etc.). A partir de la 4ème semaine l’alimentation redevient normale mais en gardant à l’esprit que la tolérance à chaque aliment est très variable d’une personne à l’autre.', '<b> Procedure of the operation </ b>: The operation lasts between 1h30 and 2h, under general anesthesia and requires 5 days of hospitalization. The sleeve consists of removing about 2/3 of the stomach to form a tube. This restrictive technique involves removing the portion containing the cells that secrete the appetite stimulating hormone (ghrelin). The stomach is reduced to a vertical tube and food passes quickly through the intestine. The patient may lose between <b> 45 to 60 kg </ b>. This technique decreases the capacity of the stomach and slows the passage of food in the stomach. The sleeve does not disturb the digestion of food, they are first slowed during their passage in the tube, then evacuated very quickly in the intestine. <br> <b> After the operation </ b>: - Patients are allowed to take liquid foods the day after the procedure and mobilization is very early, at best the same evening. - The procedure is not painful postoperatively, taking simple analgesics is enough. - Resumption of a light activity after the operation - Resumption of professional activities after 3 or 4 weeks and resumption of the sporting activity after 1 month after the intervention - The 1st week following the installation of the ring the food will be mixed (soup, compotes, yogurt, puree etc.). The 2nd and 3rd week feeding should be of \"tender\" texture (ratatouille, scrambled eggs etc.). From the 4th week the food becomes normal but keeping in mind that the tolerance to each food is very variable from one person to another.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (23, 6, 'Bypass Gastrique\r\n', 'Gastric Bypass', 'bypass-gastrique.jpg', 'Cette technique permet une perte de poids entre 35kg et 80kg. Elle consiste à court-circuiter une grande partie de l’estomac en le réduisant à une petite poche…\r\n\r\n', 'This technique allows weight loss between 35kg and 80kg. It consists in shorting a large part of the stomach by reducing it to a small pocket ...', 'Bypass-couverture.jpg', 'Le <b>bypass gastrique</b> est une technique chirurgicale qui consiste à <b>court-circuiter</b> une grande partie de <b>l’estomac</b> en le réduisant à une petite poche, permettant ainsi de diminuer la quantité d’aliments ingérés mais également leur assimilation par l’organisme. Le mini bypass est une technique proche du bypass dont la réalisation technique est plus facile et dont la durée est moins longue, d’une durée de moins de 1 heure. La perte de poids obtenue est d’environ l’ordre <b>70 à 75%</b> de l’excès de poids, ce qui correspond à environ une perte de poids d’environ <b>35 à 40 kg</b>.', 'Gastric bypass <b> is a surgical technique that involves <b> shortening </ b> a large part of <b> the stomach </ b> by reducing it to a small pocket, allowing to reduce the amount of food ingested but also their assimilation by the body. The mini bypass is a near bypass technique that is easier to implement and has a shorter duration of less than 1 hour. The resulting weight loss is about 70% to 75% </ b> of the excess weight, which corresponds to about a weight loss of about <35> 40 kg < / b>.', 'bypass-shema-1.jpg', '', '<b>Déroulement de l’opération</b>: L’intervention dure 2 à 3h et nécessite 5 jours d’hospitalisation. L’intervention est réalisée sous anesthésie générale par chirurgie cœlioscopique, à l’aide de 5 cicatrices de 5 à 15 mm pratiquées dans la partie supérieure de l’abdomen, permettant l’introduction d’une caméra, de différents instruments, et de la pince permettant la section gastrique. L’opération consiste à sectionner la <b>partie haute de l’estomac</b>, réalisant ainsi une petite poche gastrique, d’une capacité de 25 ml environ. A la différence de l’anneau, il s’agit d’une intervention <b>irréversible</b>. Sur la petite poche correspondant au nouvel estomac de petite taille sera anastomosé (« cousu ») l’intestin grêle réalisant ainsi un by-pass (« un court circuit »). En fonction du choix retenu entre un By-pass ou un « mini By-pass » une deuxième anastomose sera éventuellement réalisée entre 2 segments d’intestin grêle. \r\n<br><b>Après l’opération</b>: – Les patients sont autorisés à prendre des aliments liquides quelques heures après l’intervention et la mobilisation est très précoce, au mieux le soir même. – Les patients peuvent boire dès le lendemain matin de l’intervention, et manger légèrement à midi. – Le plus généralement, cette intervention est peu douloureuse, la prise d’antalgiques simples suffit. – Les patients sont encouragés à reprendre une activité légère dès leur sortie, la durée d’arrêt des activités professionnelles de 3 à 4 semaines et l’activité sportive peut être reprise progressivement au bout de 1 mois après l’intervention. – Le premier mois, l’alimentation doit être exclusivement liquide. Durant les 15 premiers jours du deuxième mois, l’alimentation sera pâteuse, prise à intervalles réguliers. Les 15 jours suivants : L’alimentation sera hachée, fractionnée (6 fois par jour), à intervalles réguliers et par petites quantités. A partir du troisième mois, l’alimentation peut être solide, variée mais doit toujours être bien mastiquée.', '<b> Conduct of the operation </ b>: The procedure lasts 2 to 3 hours and requires 5 days of hospitalization. The procedure is carried out under general anesthesia by laparoscopic surgery, using 5 to 15 mm scars performed in the upper abdomen, allowing the introduction of a camera, various instruments, and the forceps allowing gastric section. The operation consists in cutting the <b> upper part of the stomach </ b>, thus realizing a small gastric pouch, with a capacity of 25 ml approximately. Unlike the ring, this is an <b> irreversible </ b> intervention. On the small pocket corresponding to the new small stomach will be anastomosed (\"sewn\") the small intestine thus achieving a bypass (\"a short circuit\"). Depending on the choice between a By-pass or a \"mini By-pass\" a second anastomosis will be performed between 2 segments of small intestine. <br> <b> After the operation </ b>: - Patients are allowed to take liquid food a few hours after the operation and the mobilization is very early, at best the same evening. - Patients can drink the next morning of the procedure, and eat lightly at noon. - Most generally, this procedure is not very painful, taking simple analgesics is enough. - Patients are encouraged to return to a light activity as soon as they are discharged, the duration of professional activities is reduced from 3 to 4 weeks and the sporting activity can be resumed progressively after 1 month after the intervention. - The first month, the diet must be exclusively liquid. During the first 15 days of the second month, the diet will be pasty, taken at regular intervals. The following 15 days: The diet will be chopped, divided (6 times a day), at regular intervals and in small quantities. From the third month, the diet can be solid, varied but must always be well masticated.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (24, 7, '<NAME>\r\n', 'Capillary transplant', 'shockloss.jpg', 'L’implant capillaire est présenté comme la solution à la perte de cheveux à long terme pour celles et ceux désirants lutter contre la calvitie de manière durable…', 'The hair implant is presented as the solution to long-term hair loss for those desiring to fight against baldness in a sustainable way ...', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (25, 7, 'Epilation Laser\r\n', 'Laser hair removal', 'Epilation-laser-1.jpg', 'Il permet de se débarrasser largement des poils disgracieux d’une manière rapide, quasi indolore et performante…', 'It allows to get rid of unsightly hair in a fast, almost painless and efficient way ...', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (26, 8, 'L\'insémination Artificielle\r\n', 'Artificial insemination', 'Linsemination-artificielle.jpg', 'L’insémination artificielle est une technique d’aide médicale à la procréation. Elle est indiquée lorsque les spermatozoïdes n’arrivent pas à atteindre l’ovocyte et à le féconder…', 'Artificial insemination is a technique of medical aid to procreation. It is indicated when spermatozoa fail to reach the oocyte and fertilize it ...', 'insemination-artificielle-couverture.jpg', '', '', 'isenmination-artificielle.jpg', '', '<b>L’insémination artificielle</b> est une technique d’aide médicale à la procréation. Elle est indiquée lorsque les spermatozoïdes n’arrivent pas à atteindre l’ovocyte et à le féconder. Elle est réalisée en introduisant du sperme dans l’utérus d’une femme à l’aide d’un petit tube. Après différents examens réalisés à la recherche de la cause de cette infertilité, la technique de l’insémination artificielle peut être décidée. Cette technique est principalement préconisée dans les <b>troubles</b> modérés des <b>spermatozoïdes</b> chez l’homme, de problèmes au niveau de la glaire cervicale de la femme empêchant la migration des spermatozoïdes. Elle s’effectue environ 36 heures après le déclenchement de l’ovulation. Les chances de tomber enceinte après une insémination artificielle atteignent au maximum 15% par cycle. L’insémination multiplie par deux les chances de succès chez les couples hypofertiles. Le taux de réussite de l’insémination artificielle diminue avec l’âge : il est de moins de 15% à 38 ans et d’à peine 5% à 42 ans.', '<b> Artificial insemination </ b> is a technique of medical aid to procreation. It is indicated when the spermatozoa fail to reach the oocyte and fertilize it. It is performed by introducing sperm into a woman\'s uterus using a small tube. After various examinations carried out in search of the cause of this infertility, the technique of artificial insemination can be decided. This technique is mainly advocated in <b> moderate <b> sperm </ b> disorders in men, with problems in the cervical mucus of the woman preventing the migration of spermatozoa. It is done about 36 hours after ovulation has started. The chances of getting pregnant after artificial insemination are up to 15% per cycle. Insemination doubles the chances of success for subfertile couples. The success rate of artificial insemination decreases with age: it is less than 15% at 38 years and only 5% at 42 years.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (27, 8, 'La Fécondation In Vitro (FIV)\r\n', 'In Vitro Fertilization (IVF)', 'Ce-que-vous-devez-savoir-sur-linsemination-artificielle.jpg', 'La fécondation in vitro consiste à reproduire en laboratoire ce qui se passe naturellement dans les trompes: la fécondation d’un ovule par un spermatozoïde afin de former un embryon…', 'In vitro fertilization consists of reproducing in the laboratory what happens naturally in the tubes: the fertilization of an egg by a spermatozoon to form an embryo ...', 'Fiv-couverture.jpg', 'La <b>fécondation in vitro</b> consiste à reproduire en laboratoire ce qui se passe naturellement dans les trompes: la fécondation d’un ovule par un spermatozoïde afin de former un embryon.', '', 'fiv.jpg', '', 'Elle se pratique <b>hors du corps</b> de la femme, in vitro, à l’aide d’une éprouvette en matière synthétique à usage unique et dans des milieux de culture dont la composition est proche de l’environnement naturel des trompes. La fécondation in vitro est généralement indiquée en <b>cas d’échec d’insémination artificielle</b>, d’altération des trompes (trompes bouchées, altérées ou absentes) ou d’infertilité masculine. <b>Stimulation ovarienne</b>: Les traitements de stimulation ovarienne permettent de stimuler l’ovulation pour obtenir une maturation suffisante de plusieurs follicules dans les ovaires puis de prélever plusieurs ovocytes murs afin de permettre leur fécondation. Des dosages sanguins hormonaux sont effectués tous les jours, dans un même laboratoire, pour évaluer la qualité de la sécrétion hormonale des follicules. Une échographie permet de surveiller la réponse au traitement et de contrôler la croissance folliculaire. <b>Déclenchement de la stimulation</b>: elle s’effectue quand le nombre et la taille des follicules sont satisfaisants et les dosages hormonaux suffisants. Une injection d’hormone HCG est alors effectuée 34 à 36 heures avant la ponction d’ovocytes. Le médecin repère les follicules murs lors de l’échographie et en aspire leur contenu, à l’aide d’une aiguille dirigé dans le vagin en direction des ovaires. <b>Ponction des follicules</b>: elle s’effectue au cours d’une hospitalisation de quelques heures. Les follicules sont par la suite conservés dans un milieu de culture: 5 à 10 ovocytes sont généralement recueillis et conservés dans un incubateur à 37 degrés. Le sperme du conjoint est recueilli le jour même de la ponction des follicules : l’utilisation du sperme du conjoint préalablement congelé est également possible. Les chances de réussites sont variables et sont en moyenne autour de 22% par cycle. Ils varient notamment en fonction de l’âge et ne sont plus que de 12% à 38 ans, 9% à 40 ans et 6% à 42 ans. Concrètement, un taux de réussite de 20% signifie qu’une femme a 20% de probabilité de mettre au monde un enfant après une FIV classique.', 'It is practiced <b> out of the body </ b> of the woman, in vitro, using a test tube made of synthetic material for single use and in culture media whose composition is close to the natural environment horns. In vitro fertilization is usually indicated in <b> cases of artificial insemination failure </ b>, tubal alteration (blocked, altered or absent tubes) or male infertility. <b> Ovarian stimulation </ b>: Ovarian stimulation treatments stimulate ovulation to obtain a sufficient maturation of several follicles in the ovaries and then to collect several oocytes walls to allow their fertilization. Hormonal blood tests are performed daily, in the same laboratory, to evaluate the quality of the hormonal secretion of the follicles. An ultrasound can monitor the response to treatment and control follicular growth. <b> Triggering Stimulation </ b>: This occurs when the number and size of the follicles are satisfactory and the hormonal assays are sufficient. An injection of HCG hormone is then performed 34 to 36 hours before the oocyte puncture. The doctor spots the wall follicles during ultrasound and draws their contents, using a needle directed in the vagina towards the ovaries. <b> Follicle puncture </ b>: this is done during a hospital stay of a few hours. The follicles are subsequently kept in a culture medium: 5 to 10 oocytes are usually collected and stored in a 37-degree incubator. The sperm of the spouse is collected the day of the puncture of the follicles: the use of sperm of the previously frozen spouse is also possible. The chances of success are variable and average around 22% per cycle. They vary in particular according to the age and are only 12% to 38 years, 9% to 40 years and 6% to 42 years. Specifically, a success rate of 20% means that a woman has a 20% chance of delivering a child after a classic IVF.', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (28, 8, 'La Biopsie Testiculaire\r\n', 'Testicular Biopsy', 'La-biopsie-testiculaire.jpg', 'Chez les hommes qui souffrent de stérilité avec un faible nombre de spermatozoïdes, la biopsie testiculaire peut permettre de prélever des spermatozoïdes pour la réalisation d’une fécondation in vitro…', 'In men who suffer from infertility with a low sperm count, testicular biopsy can be used to collect spermatozoa for in vitro fertilization ...', 'Absence-de-spermatozoides.jpg', 'Chez les hommes qui souffrent de <b>stérilité</b> avec un faible nombre de spermatozoïdes, la <b>biopsie testiculaire</b> permet de prélever des spermatozoïdes pour la réalisation d’une <b>fécondation in vitro</b>. Le prélèvement biopsique est réalisé à travers la peau grâce à une aiguille et peut être réalisé sur les deux testicules. La biopsie est analysée par l’anatomopathologiste et, parfois, par le laboratoire de la reproduction. Il étudie surtout la maturation des différentes cellules de la lignée des spermatozoïdes (spermatogenèse). Des spermatozoïdes peuvent éventuellement être prélevés et utilisés pour une fécondation in vitro.', 'In men with <b> infertility </ b> with low sperm counts, <b> testicular biopsy </ b> can be used to collect sperm for <b> in vitro fertilization </ b>. The biopsy sample is made through the skin using a needle and can be performed on both testicles. The biopsy is analyzed by the pathologist and sometimes by the reproductive laboratory. He mainly studies the maturation of the different cells of the spermatozoal lineage (spermatogenesis). Spermatozoa can be collected and used for in vitro fertilization.', 'Biopsie-Testiculaire.jpg', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (29, 9, 'Implant Dentaire\r\n', 'Dental implant', 'Implant-dentaire.jpg', 'Posé dans la mâchoire par le chirurgien-dentiste, l’implant dentaire est une racine artificielle de titane pur qui permet de remplacer une dent perdue ou arrachée et qui sert après à soutenir une couronne ou un bridge…', 'Dental ImplantIn the jawbone of the dental surgeon, the dental implant is an artificial root of pure titanium that can be used to replace a lost or torn tooth, which is then used to support a crown or a bridge....', 'type-implant-endosteal.jpg', 'Posé dans la mâchoire par le chirurgien-dentiste, <b>l’implant dentaire</b> est une <b>racine artificielle de titane pur</b> qui permet de remplacer une dent perdue ou arrachée et qui sert après à soutenir une <b>couronne</b> ou un bridge. Il comprend trois parties: l’implant, la vis et le pilier. Il existe des tailles et des formes différentes pour les adapter à chaque cas particulier. Après la période de guérison avec une dent ou une prothèse provisoire (pendant 1 à 3 mois), une prothèse dentaire fixée sur implants a les mêmes <b>caractéristiques</b> que les dents naturelles tout en retrouvant les fonctions essentielles de votre dentition. Remplacer ses dents manquantes par des implants dentaires permet donc de retrouver ses capacités <b>d’occlusion</b> et de <b>mastication</b> correctes répondant aux critères de fonctionnalité et esthétiques. Les dents (couronnes) sur implants ressemblent tellement aux dents <b>naturelles</b> que personne ne les remarquera. Choisissez des couronnes 100% céramique, que l’on appelle des couronnes en Zircone, pour obtenir un résultat esthétique impeccable. Cette technique vous permet de regagner vos réflexes de mastication et de retrouver vos aptitudes de communication optimale.', 'Placed in the jawbone by the dentist, <b> the dental implant </ b> is an <b> artificial root of pure titanium </ b> that replaces a lost or torn tooth that is used afterwards to support a <b> crown </ b> or a bridge. It consists of three parts: the implant, the screw and the abutment. There are different sizes and shapes to adapt to each particular case. After the healing period with a tooth or temporary prosthesis (for 1-3 months), an implant-fixed denture has the same <b> characteristics </ b> as the natural teeth while finding the essential functions of your dentition . Replacing missing teeth with dental implants can restore the correct <b> occlusion </ b> and <b> chewing </ b> capabilities that meet functional and aesthetic criteria. Implant teeth (crowns) look so much like <b> natural teeth </ b> that no one will notice them. Choose 100% ceramic crowns, known as zirconium crowns, for a flawless aesthetic result. This technique allows you to regain your chewing reflexes and find your optimal communication skills.', 'Implant-Dentaire.png', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (30, 9, 'Pose De Facette Dentaire\r\n', 'Dental Facial Pose', 'Pose-de-facette-dentaire.jpg', 'La pose de facettes dentaires est généralement recommandée pour corriger la teinte, la taille, la forme ou l’alignement des dents…', 'Dental veneers are generally recommended for correcting the hue, size, shape or alignment of teeth ...', 'deroulement-pose-facette.jpg', 'La <b>pose de facettes dentaires</b> est généralement recommandée pour corriger la <b>teinte</b>, <b>la taille</b>, <b>la forme</b> ou <b>l’alignement</b> des dents. On peut aussi conseiller les facettes pour <b>renforcer</b> les dents fragiles ou même corriger un bruxisme (grincement de dents). Les indications sont donc nombreuses puisque les facettes ne présentent aucun inconvénient pour les dents naturelles. La pose se pratique sur 2 séances chez un chirurgien dentiste. Lors de la <b>1ère séance</b>, le chirurgien dentiste vous conseille sur le choix des futures facettes dentaires <b>céramiques</b> (notamment la teinte et forme), puis procède à <b>l’empreinte</b> de votre dentition pour la conception en laboratoire. Lors de la <b>seconde séance</b>, le chirurgien esthétique procède à la pose des facettes. La procédure est simple et rapide et dure entre 1h et 2h30 en fonction du nombre à poser. L’acte consiste dans un premier temps à silaniser l’intérieur des facettes, puis, à préparer la surface des dents en y fixant un colorant et en y appliquant des couches adhésives. Dans un second temps, la teinte du composite de collage à l’aide de pâtes d’essai est définie, puis le chirurgien dentiste procède à la pose des facettes sur les dents naturelles. Enfin, les dents avec leurs facettes vont être exposées sous une lampe qui permet de durcir le composite et ainsi fixer durablement les facettes sur les dents naturelles.', '<B> Dental facets </ b> is generally recommended to correct <b> hue </ b>, <b> size </ b>, <b> shape </ b> or <b> the alignment </ b> of the teeth. Facets can also be recommended to <b> strengthen </ b> fragile teeth or even correct bruxism (grinding of teeth). The indications are therefore numerous since the facets do not present any inconvenience for the natural teeth. The pose is performed on 2 sessions at a dental surgeon. During the <b> 1st session </ b>, the dental surgeon advises you on the choice of the future ceramic facets <b> ceramics </ b> (in particular the hue and shape), then proceeds to <b> the impression </ b> of your dentition for laboratory design. During the <b> second session </ b>, the cosmetic surgeon proceeds to the installation of facets. The procedure is simple and fast and lasts between 1 and 2:30 depending on the number to ask. The act consists in first silanizing the inside of the facets, then preparing the surface of the teeth by fixing a dye and applying adhesive layers. In a second step, the color of the bonding composite using test pastes is defined, then the dental surgeon installs the facets on the natural teeth. Finally, the teeth with their facets will be exposed under a lamp that hardens the composite and thus permanently fix the facets on natural teeth.', 'Pose-de-facette-dentaire.jpg', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (31, 9, 'Blanchiment', 'Whitening', 'Blanchiment-dentaire.jpg', 'Le blanchiment, ou plus précisément éclaircissement des dents, est une pratique de médecine esthétique qui vise à éclaircir la couleur de l’émail…', 'Bleaching, or more precisely lightening of teeth, is a practice of aesthetic medicine that aims to lighten the color of enamel ...', 'perfect-teeth-smile.jpg', 'Le <b>blanchiment</b>, ou plus précisément <b>éclaircissement des dents</b>, est une pratique de médecine esthétique qui vise à éclaircir la couleur de <b>l’émail</b>. Celui-ci se réalise en 3 étapes, le praticien doit avant tout <b>protéger</b> les gencives (avec une barrière gingivale), il applique ensuite le gel qui va <b>éclaircir</b> les dents et enfin il utilise une lampe <b>Zoom</b> afin de faire pénétrer le gel. Parfois chez certains patients, une sensibilité peut apparaître, un simple dentifrice anti sensibilité permet de faire disparaître cette sensibilité au bout de quelques jours. Les résultats sont visibles <b>immédiatement</b> après la séance de blanchiment des dents, cependant le dentiste peut envisager d’autres séances pour approfondir le blanchiment et atteindre le résultat adéquat. Il convient néanmoins d’avoir une bonne hygiène buccale, afin que les résultats soient encore meilleurs (éviter tabac, café et autres produits contenant des colorants).', '<B> bleaching </ b>, or more precisely <b> brightening teeth </ b>, is a cosmetic medicine practice that aims to lighten the color of <b> enamel </ b>. This is done in 3 steps, the practitioner must first <b> protect </ b> the gums (with a gingival barrier), then apply the gel that will <b> brighten </ b> the teeth and finally he uses a <b> Zoom </ b> lamp to penetrate the gel. Sometimes in some patients, a sensitivity may appear, a simple anti-sensitivity toothpaste allows to remove this sensitivity after a few days. The results are visible <b> immediately </ b> after the teeth whitening session, however the dentist may consider other sessions to deepen the whitening and achieve the proper result. However, it is important to have good oral hygiene, so that the results are even better (avoid tobacco, coffee and other products containing dyes).', 'blanchiment_des_dents_400.jpg', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (32, 10, 'Lasik', 'Lasik', 'LASIK-Advertising-1200-1024x683.jpg', 'Cette technique de chirurgie au laser est la plus fréquemment employée pour corriger la myopie…\r\n\r\n', 'This laser surgery technique is the most frequently used to correct myopia ...', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL), (33, 10, 'Chirurgie De La Cataracte\r\n', 'Cataract Surgery', 'Chirurgie-de-la-cataracte.jpg', 'Baisse de la vue, brouillard, éblouissement à la lumière vive… le seul traitement est la chirurgie…\r\n\r\n', 'Drop in vision, fog, dazzling bright light ... the only treatment is surgery ...', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL); -- -------------------------------------------------------- -- -- Structure de la table `chirurgie` -- DROP TABLE IF EXISTS `chirurgie`; CREATE TABLE IF NOT EXISTS `chirurgie` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` longtext COLLATE utf8_unicode_ci NOT NULL, `image1` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `image2` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `updated_at` datetime DEFAULT NULL, `nameen` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `descriptionen` longtext COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Déchargement des données de la table `chirurgie` -- INSERT INTO `chirurgie` (`id`, `name`, `description`, `image1`, `image2`, `updated_at`, `nameen`, `descriptionen`) VALUES (1, 'CHIRURGIE DES SEINS', 'Que ce soit pour agrandir ou réduire la taille de votre poitrine ainsi que la corriger et la redresser, la chirurgie esthétique des seins s’effectue à travers différentes techniques chirurgicales et répond à plusieurs objectifs selon la demande du patient.', 'seins-boost.jpg', 'breast-6.png', '2019-02-25 00:00:00', 'BREAST SURGERY', 'Whether to enlarge or reduce the size of your breast and correct and straighten it, breast cosmetic surgery is performed through various surgical techniques and meets several objectives according to the patient\'s request.'), (2, 'CHIRURGIE DU VISAGE', 'Le lifting du visage retend la peau relâchée du visage et du cou. Ce lifting qui permet de rajeunir visiblement d’une dizaine d’années est une intervention extrêmement bienfaisante sur le plan psychologique. Elle concerne aussi les interventions pour des raisons esthétiques ou autres sur le nez, les paupières, le menton ou les oreilles.', 'anti_ride_naturel_cl-2-boost.jpg', 'spa-2.png', '2019-02-25 00:00:00', 'FACE SURGERY', 'The face lift tightens the loose skin of the face and neck. This facelift, which visibly rejuvenates a dozen years is an extremely beneficial intervention on the psychological level. It also concerns interventions for aesthetic or other reasons on the nose, eyelids, chin or ears.'), (3, 'CHIRURGIE DE LA SILHOUETTE', 'La chirurgie esthétique de la silhouette consiste à effectuer plusieurs actes de chirurgie sur différentes parties du corps, selon les souhaits du patient. Les objectifs sont divers: réduction de la graisse du ventre, de la cuisse ou des hanches ou encore l’affinement des bras, des cuisses ou des fesses.', 'silhouette-2-boost.jpg', 'hips.png', '2019-02-25 00:00:00', 'SURGERY OF THE SILHOUETTE', 'The cosmetic surgery of the silhouette consists of performing several surgical acts on different parts of the body, according to the wishes of the patient. The objectives are various: reduction of belly fat, thigh or hips or the refinement of arms, thighs or buttocks.'), (4, 'CHIRURGIE INTIME', 'ESTHER ESTHETICA propose différentes opérations de chirurgie intime telles que la nymphoplastie pour les femmes ou la pénoplastie pour les hommes.', 'intime-boost-1.jpg', 'slim-1.png', '2019-02-25 00:00:00', 'INTIMATE SURGERY', 'ESTHER ESTHETICA offers various intimate surgery operations such as nymphoplasty for women or penoplasty for men.'), (5, 'CHIRURGIE ORTHOPÉDIQUE', 'La chirurgie orthopédique traite les maladies, les traumatismes (fracture, rupture, hématome) et les déformations de l’appareil locomoteur : os, articulations, ligaments, tendons et muscles.', 'orthopedie-boost.jpg', 'foot.png', '2019-02-25 00:00:00', 'ORTHOPEDIC SURGERY', 'Orthopedic surgery treats diseases, trauma (fracture, rupture, hematoma) and deformities of the musculoskeletal system: bones, joints, ligaments, tendons and muscles.'), (6, 'CHIRURGIE DE L’OBÉSITÉ', 'La chirurgie de l’obésité concerne les personnes présentant une forte surcharge pondérale et s’adresse aux personnes adultes présentant une obésité importante (c’est-à-dire une IMC supérieur ou égal à 35 kg/m²) ou une obésité sévère (soit un IMC supérieur ou égal à 45 kg/m²) La chirurgie de l’obésité est le moyen le plus efficace pour perdre beaucoup de poids. Différentes techniques et interventions sont recommandées pour répondre aux besoins du patient: la gastroplastie (l’anneau gastrique), le sleeve gastrectomie ou le bypass gastrique.', 'obesite-boost.jpg', 'stomach-3.png', '2019-02-25 00:00:00', 'SURGERY OF OBESITY', 'Obesity surgery is for people who are overweight and is for adults with significant obesity (ie BMI greater than or equal to 35 kg / m 2) or severe obesity (either BMI greater than or equal to 45 kg / m²) Obesity surgery is the most effective way to lose a lot of weight. Different techniques and interventions are recommended to meet the needs of the patient: gastroplasty (the gastric band), sleeve gastrectomy or gastric bypass.'), (7, 'GREFFE CAPILLAIRE', 'La greffe capillaire permet aux patients de retrouver une capillarité perdu à cause de l’âge ou des raisons génétiques, et l’épilation Laser qui est une solution efficace pour se débarrasser des poils.', 'Greffe-et-laser-boost.jpg', 'hair.png', '2019-02-25 00:00:00', 'CAPILLARY GRAFT', 'Hair transplantation allows patients to regain lost capillarity because of age or genetic reasons, and laser hair removal is an effective solution to get rid of hair.'), (8, 'TRAITEMENT DE L’INFERTILITÉ', 'Des milliers de couples Européens et Africains ont choisi la Tunisie pour les aider à concevoir un enfant. ESHTAR CHIRURGIE a fait une sélection des meilleurs gynécologues obstétriciens au pays pour vous aider pendant la procréation. 3 types de traitement sont généralement demandés: l’insémination artificielle avec sperme du partenaire, la fécondation In-Vitro et la biopsie testiculaire.', 'FIV-boost.jpg', 'pregnancy-5.png', '2019-02-25 00:00:00', 'TREATMENT OF INFERTILITY', 'Thousands of European and African couples have chosen Tunisia to help them conceive a child. ESHTAR SURGERY has made a selection of the best gynecologists obstetricians in the country to help you during the procreation. 3 types of treatment are usually required: artificial insemination with sperm of the partner, In-Vitro fertilization and testicular biopsy.'), (9, 'CHIRURGIE DENTAIRE', 'Un sourire éclatant rime souvent avec confiance, beauté et santé. Les soins esthétiques dentaires sont désormais à la portée de tous. ESTHER ESTHETICA propose différentes techniques pour avoir des dents parfaits: l’implant dentaire, la pose de facette dentaire et le blanchiment dentaire.', 'Chirurgie-Dentaire-1-frozen-1.jpg', 'teeth.png', '2019-02-25 00:00:00', 'DENTAL SURGERY', 'A bright smile often rhymes with confidence, beauty and health. Dental esthetic care is now available to everyone. ESTHER ESTHETICA offers different techniques for perfect teeth: dental implant, dental facetting and tooth whitening.'), (10, 'YEUX ET OPHTALMOLOGIE', 'Myopie, hypermétropie, astigmatisme… la chirurgie réfractive permet de corriger la plupart des troubles visuels. ESTHER ESTHETICA propose plusieurs techniques selon la pathologie du patient…', 'infection-care-frozen.jpg', 'eye-2.png', '2019-02-25 00:00:00', 'EYES AND OPHTHALMOLOGY', 'Myopia, hyperopia, astigmatism ... refractive surgery can correct most visual disorders. ESTHER ESTHETICA offers several techniques depending on the pathology of the patient ...'); -- -------------------------------------------------------- -- -- Structure de la table `devis` -- DROP TABLE IF EXISTS `devis`; CREATE TABLE IF NOT EXISTS `devis` ( `id` int(11) NOT NULL AUTO_INCREMENT, `prenom` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `nom` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `telephone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `sexe` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `pays` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `type_chirurgie` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `autre_details` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `chirurgie` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `rappel` datetime NOT NULL, `moyen_rappel` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `commentaires` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `age` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `anticidMedicaux` longtext COLLATE utf8_unicode_ci, `anticidMedicauxExist` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Déchargement des données de la table `devis` -- INSERT INTO `devis` (`id`, `prenom`, `nom`, `email`, `telephone`, `sexe`, `pays`, `type_chirurgie`, `autre_details`, `chirurgie`, `rappel`, `moyen_rappel`, `commentaires`, `age`, `anticidMedicaux`, `anticidMedicauxExist`) VALUES (1, 'test', 'test', '<EMAIL>', '55547547', 'Madame', 'Tunisie', 'chirurgie des seins', '', 'Augmentation mammaire par prothèse mammaires rondes', '1970-01-01 12:54:00', 'Telephone', 'mlkjh', '55', '', NULL), (2, 'test', 'test', '<EMAIL>', '55547547', 'Mademoiselle', 'Tunisie', 'chirurgie des seins', '', 'Augmentation mammaire par prothèse mammaires rondes', '1970-01-01 12:12:00', 'Telephone', 'qqq sqds aa', '25', '', NULL), (3, 'test', 'test', '<EMAIL>', '55547547', 'Monsieur', 'Tunisie', 'chirurgie de l\'obésité', '', 'Sleeve gastrectomie', '1970-01-01 03:24:00', 'What\'s App', 'dcxcwcwcx', '65', '', NULL), (4, 'test', 'test', '<EMAIL>', '55547547', 'Madame', 'Tunisie', 'Autre', 'autre details test', 'Lasik (les 2 yeux)', '1970-01-01 12:12:00', 'Telephone', 'ygf dsfsd sdfs qss', '12', '', NULL), (5, 'test', 'test', '<EMAIL>', '55547547', 'Mademoiselle', 'Tunisie', 'chirurgie orthopédique', NULL, 'H<NAME>', '1970-01-01 11:45:00', 'Viber', '545h gdf\r\nhgjgf', '22', '', NULL), (6, 'test', 'test', '<EMAIL>', '55547547', 'Mademoiselle', 'Tunisie', 'chirurgie orthopédique', NULL, '<NAME>', '1970-01-01 11:45:00', 'Viber', '545h gdf\r\nhgjgf', '22', '', NULL), (7, 'd', 'ft', '<EMAIL>', '55547547', 'Mademoiselle', 'Tunisie', 'chirurgie dentaire', NULL, 'Pose de facette dentaire', '1970-01-01 04:52:00', 'Viber', '1444', '44', '', NULL), (8, 'd', 'ft', '<EMAIL>', '55547547', 'Mademoiselle', 'Tunisie', 'chirurgie dentaire', NULL, 'Pose de facette dentaire', '1970-01-01 03:44:00', 'What\'s App', 'fgfgfdg r', '12', '', NULL), (9, 'tes', 'test', '<EMAIL>', '566', 'Madame', 'qsdqsd', 'chirurgie ophtalmologie', NULL, 'Lasik (les 2 yeux)', '1970-01-01 12:44:00', 'What\'s App', 'sdfsdf', '11', '', NULL), (10, 'test', 'ft', '<EMAIL>', '55547547', 'Madame', 'Tunisie', 'chirurgie de la silhouette', NULL, 'Liposuccion une seule zone (ventre...)', '1970-01-01 22:12:00', 'What\'s App', '2111', '2', '', NULL), (11, 'test', 'test', '<EMAIL>', '55547547', 'Mademoiselle', 'Tunisie', 'chirurgie de l\'infertilité', NULL, 'Insémination artificielle', '1970-01-01 21:12:00', 'What\'s App', '112', '22', '', NULL), (12, 'test', 'test', '<EMAIL>', '55547547', 'Mademoiselle', 'Tunisie', 'Autre', 'hjkhgjhhgigo', 'Pose de facette dentaire', '1970-01-01 15:48:00', 'What\'s App', 'ihjhggiugi', '25', '', NULL), (13, 'test', 'test', '<EMAIL>', '55547547', 'Mademoiselle', 'Tunisie', 'Autre', '11111', 'Insémination artificielle', '1970-01-01 11:11:00', 'Viber', '1111', '11', '', NULL), (14, 'ghassen', 'fath', '<EMAIL>', '54600646', 'Monsieur', 'tunisie', 'chirurgie du visage', NULL, 'Lifting malaire', '1970-01-01 22:20:00', 'Telephone', 'aze', '32', '', NULL), (15, 'ghassen', 'fath', '<EMAIL>', '54600646', 'Monsieur', 'tunisie', 'chirurgie du visage', NULL, 'Lifting complet', '1970-01-01 12:12:00', 'Viber', 'salut', '20', '', NULL), (16, 'ghassen', 'fathallah', '<EMAIL>', '54600646', 'Monsieur', 'tunisie', 'chirurgie du visage', NULL, 'Lifting cervico-facial', '1970-01-01 20:20:00', 'Telephone', 'salut Raoudha, pouvez vous m\'envoyer un devis pour la chirurgie du visage svp. \r\nbonne journée.', '22', '', NULL), (17, 'ghassen', 'fathallah', '<EMAIL>', '54600646', 'Monsieur', 'tunisie', 'chirurgie de la silhouette', NULL, 'Liposuccion double menton + mini lifting', '1970-01-01 20:20:00', 'Telephone', 'salut cv', '22', '', NULL), (18, 'ghassen', 'fathallah', '<EMAIL>', '+33144397500', 'Madame', 'tunisie', 'chirurgie intime', NULL, 'Pénoplastie d\'allongement (allongement du pénis)', '1970-01-01 20:20:00', 'Telephone', 'aze', '22', '', NULL), (19, 'ghassen', 'fathallah', '<EMAIL>', '+33144397500', 'Monsieur', 'tunisie', 'chirurgie du visage', NULL, 'Lifting malaire', '1970-01-01 20:20:00', 'What\'s App', 'ghaz', '22', '', NULL), (20, 'ghassen', 'fathallah', '<EMAIL>', '+33144397500', 'Monsieur', 'tunisie', 'chirurgie du visage', NULL, 'Lifting malaire', '1970-01-01 20:20:00', 'What\'s App', 'ghaz', '22', '', NULL), (21, 'ghassen', 'fathallah', '<EMAIL>', '+33144397500', 'Monsieur', 'tunisie', 'chirurgie de la silhouette', NULL, 'Liposuccion double menton + mini lifting', '1970-01-01 23:20:00', 'Telephone', 'aze', '22', '', NULL), (22, 'ghassen', 'fathallah', '<EMAIL>', '+33144397500', 'Mademoiselle', 'tunisie', 'chirurgie du visage', NULL, 'Lifting malaire', '1970-01-01 20:20:00', 'Telephone', 'aze', '22', '', NULL), (23, 'ghassen', 'fathallah', '<EMAIL>', '+33144397500', 'Mademoiselle', 'tunisie', 'chirurgie de la silhouette', NULL, 'Liposuccion sur une petite zone (double menton...)', '1970-01-01 22:59:00', 'Telephone', '45', '26', '', NULL), (24, 'ghassen', 'fathallah', '<EMAIL>', '+33144397500', 'Monsieur', 'tunisie', 'chirurgie du visage', NULL, 'L\'implant capillaire par FUE', '1970-01-01 03:00:00', 'Telephone', '12', '2', 'gh', NULL), (25, 'ghassenazaz', 'fathallah', '<EMAIL>', '+33144397500', 'Monsieur', 'tunisie', 'chirurgie de la silhouette', NULL, 'Liposuccion moyenne + Lipofilling des seins', '1970-01-01 01:01:00', 'What\'s App', NULL, '-6', 'gg', NULL), (26, 'ghassen', 'fathallah', '<EMAIL>', '+33144397500', 'Mademoiselle', 'tunisie', 'chirurgie ophtalmologie', NULL, 'Lasik (les 2 yeux)', '1970-01-01 22:22:00', 'What\'s App', NULL, '45', 'gh', NULL); -- -------------------------------------------------------- -- -- Structure de la table `mailing_list` -- DROP TABLE IF EXISTS `mailing_list`; CREATE TABLE IF NOT EXISTS `mailing_list` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Déchargement des données de la table `mailing_list` -- INSERT INTO `mailing_list` (`id`, `email`) VALUES (1, '<EMAIL>'); -- -------------------------------------------------------- -- -- Structure de la table `message` -- DROP TABLE IF EXISTS `message`; CREATE TABLE IF NOT EXISTS `message` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `telephone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `message` longtext COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Déchargement des données de la table `message` -- INSERT INTO `message` (`id`, `name`, `email`, `subject`, `telephone`, `message`) VALUES (1, 'test', '<EMAIL>', 'test', 'test', 'test'); -- -- Contraintes pour les tables déchargées -- -- -- Contraintes pour la table `category` -- ALTER TABLE `category` ADD CONSTRAINT `FK_64C19C1B6C5A438` FOREIGN KEY (`chirurgie_id`) REFERENCES `chirurgie` (`id`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64) -- -- Host: localhost Database: socialtruek_db3 -- ------------------------------------------------------ -- Server version 5.5.5-10.4.8-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Dumping data for table `administrators` -- LOCK TABLES `administrators` WRITE; /*!40000 ALTER TABLE `administrators` DISABLE KEYS */; INSERT INTO `administrators` VALUES (1,'<NAME>','EricM','<EMAIL>',NULL,'$2y$10$FfL4xmEoe9I9rUNWqWT6aO8BbSPAgKU07UxLQS4jVy5t0Ee1Be85G','1976-03-03',NULL,'2019-12-26 04:33:05','2019-12-28 13:31:20'),(2,'<NAME>','Lukas','<EMAIL>',NULL,'$2y$10$tnKjkYlMs8XbC5d4fce/YuGhxNMA3D2lJK4xJ4daomYuZAcQ1mqti','2004-10-13',NULL,'2019-12-26 06:21:17','2019-12-28 13:32:11'),(3,'<NAME>','Jorge','<EMAIL>',NULL,'$2y$10$70Ex/HdNcYa/CCxYBHyqIOtd5DatCMp5LD7LFa4hyqesfBN5CwnYe','1986-06-23',NULL,'2019-12-26 06:33:50','2019-12-26 06:33:50'),(4,'<NAME>','aleveiga','<EMAIL>',NULL,'$2y$10$8ePTDZct/Odol3ZeKZ9TNOCC8jy/zn4ET0esGGhZHoqvPbGaK9BRS','1994-04-28',NULL,'2020-01-07 23:03:02','2020-01-07 23:03:02'); /*!40000 ALTER TABLE `administrators` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping data for table `categories` -- LOCK TABLES `categories` WRITE; /*!40000 ALTER TABLE `categories` DISABLE KEYS */; INSERT INTO `categories` VALUES (1,NULL,NULL,'autos','autos.png'),(2,NULL,NULL,'inmuebles','inmuebles.png'),(3,NULL,NULL,'muebles','muebles.png'),(4,NULL,NULL,'herramientas','herramientas.png'),(5,NULL,NULL,'electrodomesticos','electrodomesticos.png'),(6,NULL,NULL,'gamers','gamers.png'),(7,NULL,NULL,'juguetes','juguetes.png'),(8,NULL,NULL,'libros','libros.png'),(9,NULL,NULL,'rodados','bicicletas.png'),(10,NULL,NULL,'celulares','celulares.png'); /*!40000 ALTER TABLE `categories` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping data for table `codes` -- LOCK TABLES `codes` WRITE; /*!40000 ALTER TABLE `codes` DISABLE KEYS */; /*!40000 ALTER TABLE `codes` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping data for table `failed_jobs` -- LOCK TABLES `failed_jobs` WRITE; /*!40000 ALTER TABLE `failed_jobs` DISABLE KEYS */; /*!40000 ALTER TABLE `failed_jobs` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping data for table `messages` -- LOCK TABLES `messages` WRITE; /*!40000 ALTER TABLE `messages` DISABLE KEYS */; INSERT INTO `messages` VALUES (9,1,7,62,87,'Hola, soy Eric. Te propongo TRUEKEAR tu Peugeot Partner 1.4 Furgon Confort por mi Toyota 2014. Si estás interesado confirma el truekeo','2020-01-14 20:35:41','2020-01-14 20:35:41'),(10,7,9,87,89,'Hola, soy Mauricio. Te propongo TRUEKEAR tu Kia Sportage 2.0 por mi Peugeot Partner 1.4 Furgon Confort. Si estás interesado confirma el truekeo','2020-01-14 20:41:22','2020-01-14 20:41:22'),(11,7,1,87,62,'Hola, soy Mauricio. Te propongo TRUEKEAR tu Toyota 2014 por mi Peugeot Partner 1.4 Furgon Confort. Si estás interesado confirma el truekeo','2020-01-14 20:49:11','2020-01-14 20:49:11'),(12,2,1,2,62,'Hola, soy Adriana. Te propongo TRUEKEAR tu Toyota 2014 por mi Peugeot 208 1.6 5P ALLURE. Si estás interesado confirma el truekeo','2020-01-15 00:03:35','2020-01-15 00:03:35'),(13,1,7,1,86,'Hola, soy Eric. Te propongo TRUEKEAR tu Renault Duster 2012 por mi Fiat Palio Essence 1.6 MT 16v. Si estás interesado confirma el truekeo','2020-01-15 01:01:47','2020-01-15 01:01:47'),(14,4,1,22,71,'Hola, soy Alberto. Te propongo TRUEKEAR tu Antiguo Ropero Provenzal Patinado por mi Sierra electrica BOSH. Si estás interesado confirma el truekeo','2020-01-15 04:52:05','2020-01-15 04:52:05'),(15,1,5,10,18,'Hola, soy Eric. Te propongo TRUEKEAR tu Propiedad Horizontal por mi Vivienda multifamiliar. Si estás interesado confirma el truekeo','2020-01-15 04:53:12','2020-01-15 04:53:12'); /*!40000 ALTER TABLE `messages` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping data for table `migrations` -- LOCK TABLES `migrations` WRITE; /*!40000 ALTER TABLE `migrations` DISABLE KEYS */; INSERT INTO `migrations` VALUES (61,'2014_10_12_000000_create_users_table',1),(62,'2014_10_12_100000_create_password_resets_table',1),(63,'2019_08_19_000000_create_failed_jobs_table',1),(64,'2019_11_25_205130_create_categories_table',1),(65,'2019_11_25_205502_create_products_table',1),(66,'2019_12_09_133054_create_administrators_table',2),(67,'2019_12_10_151654_add_rol_to_users',3),(71,'2019_12_26_004400_create_codes_table',4),(73,'2020_01_09_102640_create_messages_table',5); /*!40000 ALTER TABLE `migrations` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping data for table `password_resets` -- LOCK TABLES `password_resets` WRITE; /*!40000 ALTER TABLE `password_resets` DISABLE KEYS */; INSERT INTO `password_resets` VALUES ('<EMAIL>','$<PASSWORD>','2019-12-28 12:26:51'); /*!40000 ALTER TABLE `password_resets` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping data for table `products` -- LOCK TABLES `products` WRITE; /*!40000 ALTER TABLE `products` DISABLE KEYS */; INSERT INTO `products` VALUES (1,'2019-11-26 05:28:08','2020-01-01 19:06:59','2019-11-26','Fiat Palio Essence 1.6 MT 16v','Un vehículo totalmente renovado, con una linea exterior más atractiva, mayor espacio interior tanto para pasajeros como equipaje.',2901,'fwVgyeZx2Q6IrGDYToQ8xbBUegA4WZ1DZOzdMwWg.jpeg','ExD4wY7ysppMEGubHYMcHGIOG61zFVncCL5vIjT7.jpeg','1RP1xRY15PJg7yT1AvdvVBJECNyRj7G1ERocUIFZ.jpeg',1,1,'autos'),(2,'2019-11-26 13:15:14','2019-11-26 13:15:14','2019-11-26','Peugeot 208 1.6 5P ALLURE','Impecable de mecánica. Todos los service al día. Kilometraje 100% real y comprobable. Nunca tuvo un choque. Todo original. Muy buen estado interior y exterior',6590,'DgxI5PIhgmluHhSZb1nz9N6oJDWyjHmGVBO2k2kB.jpeg','pj1mbjqcfettMgNcKZf93jnnwWxZgEN33qbfgnEo.jpeg','rtop0Mfdu7vNZcABCTLeF5TCJ1MtuHdg03EFHxRY.jpeg',1,2,'autos'),(3,'2019-11-26 13:17:19','2019-11-26 13:17:19','2019-11-26','Honda HR-V 1.8 Lx 2wd Cvt','Vehículo listo para transferir. Papeles al día. Cuero original Honda. Primera mano. Todos los service oficiales hechos',8750,'gCYfv1KaC1PLA43tC0cFTu1anXuafbqnoBZloTca.jpeg','6zKm0hJGV7MjC1C5GKAaNWZArRmBowsOVEOkMWk2.jpeg','6fam7jrWAofp7B4PdZvgMhuP48DjXfjfWLrkVXEh.jpeg',1,3,'autos'),(4,'2019-11-26 13:19:17','2019-11-26 13:19:17','2019-11-26','Toyota Corolla 1.8 Xli Mt 136cv','Vehículo inmaculado. 50.000 km. Cubiertas nuevas. Asientos de cuero. Levanta vidrios eléctricos en las 4 puertas. Cierre centralizado. Alarma. Vtv y verificación policial recién hecha. Todo al día. Listo para transferir. Excelente estado general y del motor. Vale cada centavo.',4300,'IdkNRXsuSIh4gWSQCc8efsKOKXDfLKQLaicPwYE1.jpeg','ADrnQrtrKNnrabekXyhiY7Ew93GSZNecuf9oI7xI.jpeg','8XMSZHsMVFmeHedvQ3TAS3oSdqAKt08jDcY0CVz4.jpeg',1,4,'autos'),(5,'2019-11-26 16:21:31','2019-12-31 23:04:20','2019-11-26','Peugeot Partner 1.4 Furgon Confort','Peugeot Partner 1.4 Furgon Confort',4300,'7QnG89WhXBitqFRzANVsrrEmEqY6ntGsc4zjO7Qh.jpeg','PylQG338MK7jeSiNpC4WbDagoEoDpQdQzciwJ8Rw.jpeg','4pwMSdE4teFNoHHHxTjDyEtl654R1J4eyT3mhpVf.jpeg',2,5,'autos'),(6,'2019-11-26 16:22:51','2019-11-26 16:22:51','2019-11-26','Kia Sportage 2.0 Ex At 154cv 4x2','Kia Sportage 2.0 Ex At 154cv 4x2',9860,'rUPYbjfNlke0CrGK9ilOHYCyB28GqQetrVMulKMP.jpeg','PwPRDDq6o759Wcz7gpobe0CeOdBq2Zgberl8btcI.jpeg','PVOQLv9fLzOzmnyv3qntK4AACFOYOT9ZXw0f5cT2.jpeg',1,6,'autos'),(8,'2019-11-26 19:06:55','2019-11-26 19:06:55','2019-11-26','Chevrolet Onix 1.4LS JOY+ 98cv','Impecable de mecánica. Todos los service al día. Kilometraje 100% real y comprobable Nunca tuvo un choque. Todo original. Muy buen estado interior y exterior',4150,'p43sSazws5TO4NI0G56fG1rAGSEo8xesa8ldO4Hn.jpeg','2sWORZqD74dklhJPnFK8vMblFf7wFGhaxyC3qlqg.jpeg','CUas1cV4U1Qz4JaGZrH3mEhvR7DdzhtOt1Wpq51r.jpeg',1,8,'autos'),(9,'2019-11-29 17:17:13','2019-11-29 17:17:13','2019-11-29','Balanza Digital','balanza digital de precisión de hasta 1 gramo',2,'I996gnomvFtX6nNq8Sgd41vYkeG3N1xsEUIZNkcP.jpeg','dRW9xuzInGFMDqbRbPSYd0CT71wnsHAFSvzpKZt7.jpeg','KIl8Iwgsb9YDN6j03BLHFZRU1jfoemO7S9hTq1ui.jpeg',5,2,'electrodomesticos'),(10,'2019-11-29 17:30:06','2019-11-29 17:30:06','2019-11-29','Vivienda multifamiliar','vivienda espaciosa para varias familias',2800,'dqNfcB2Uwhp2YJlJ3WbYMg1f3WZmhmCFSyEb3fu3.jpeg','i5S5dVGtjXt2ilqcpAfm8Ny96Fge8ffinoDSpmMR.jpeg','pCPLamNeRqzOVcE2gVfgAGcCRud8LlOvA1KExH8e.jpeg',2,1,'inmuebles'),(11,'2019-11-29 17:34:46','2019-11-29 17:34:46','2019-11-29','TEG Independencia','juego de estrategia de guerra mas famoso del mundo',10,'1W47LF25h00OeQ6R1D1r8aoesLmC7GBvjNG8ao1e.jpeg','s7lZFmAFu0UWp8xLJaEYyI4y83NAzYWdxDwKFB13.jpeg','RGOMA6xILdZJZvBt9tpO5GhSQ7D1ABBlF3XjHXvg.jpeg',7,1,'juguetes'),(12,'2019-11-29 17:36:41','2019-11-29 17:36:41','2019-11-29','Uno','juego de cartas mas divertido del mundo',3,'XsSyuVQkwkKrqtbUfPk8H6XVRfML1JhbuWJoZFQx.jpeg','wMYchVgZHktXN5w5Ii4c8TAAwf7kdyBfIADLPVNa.jpeg','osn7d5rzl8IPTkoVKz84uaPZyJ5Q3Vd0LwcnE2z3.jpeg',7,2,'juguetes'),(13,'2019-11-29 17:40:11','2019-11-29 17:40:11','2019-11-29','Amoladora angular','amoladora angular marca DeWalt',120,'0lHhT2Z7Qk4473rdZvHi7MgOX5Jg9nYLLIecByqu.jpeg','XH96NpGp3boGeBXFKMdt4OdhuRc3l1wsRJuEb5O0.jpeg','048eiTVw5MQSpfsV0u8gyazYEb0tvpw9WXoCaIOr.jpeg',4,1,'herramientas'),(14,'2019-11-29 17:42:39','2019-11-29 17:42:39','2019-11-29','POP movie Marty Mcfly','muñero de coleccion del personaje Marty Mcfly de la saga Back To te Future.',5,'o8f2oVnF7L0mUnWOf2sfzLI23BslFpbTS4MerTB9.jpeg','MJGI9Iqy8ddQQkpOqUsowFdmUHpV3UfzbfN1XnWs.jpeg','eO32DHmSFd6ROPOpzuRMyf9nI9vCiok8I44PTHki.jpeg',7,3,'juguetes'),(15,'2019-12-06 03:57:04','2019-12-06 03:57:04','2019-12-06','casa de lujo','Mansión de estilo academicista frances de principios de siglo XVIII',7000,'2xUEvQzMpiExLfXrhXRATMVsHu3QnhFpJjUIFc2A.jpeg','T8g6xt6jp3S0qeTpWm11p7ZnY0s4ksqytl2U6wO2.jpeg','855guesJvsRao4Glhf5VH3lUyhc69SZWbO3VFGU6.jpeg',2,2,'inmuebles'),(16,'2019-12-06 04:00:49','2019-12-06 04:00:49','2019-12-06','PH a estrenar','\'PH a estrenar\', \'Espectacular PH a estrenar ideal para pajeras. cocina, habitación baño, comedor y lavadero.\',',3600,'CBzVaIfIeZbKnhHdJRGnTsU7Ybtx0UAxGU3mMlmZ.jpeg','xvUgLbarJirAboaaQ40UC3zjNbBiPJGLktLo7xri.jpeg','jQ5Dv8a2zCd54kCxSxTCpjU6ZaVTkV3pjXYsoK61.jpeg',2,3,'inmuebles'),(17,'2019-12-06 04:02:20','2019-12-06 04:02:20','2019-12-06','Departamento 2 ambientes','Departamento dos ambientes. buena localizacion, cocina comedor con amueblamiento incluido y balcon con vista a la calle.',2700,'nND7ylsLJ7NufLvr3aG2egMCdEPTjMSbRvzLoyth.jpeg','7zhKOLDuhhFIPCEOGXFgNfBWBbCgzJxnGON8GuVV.jpeg','aglLnERJXL8P7iBpas8uiGUnclVEQxp92oYUB9Ms.jpeg',2,4,'inmuebles'),(18,'2019-12-06 04:05:45','2019-12-06 04:05:45','2019-12-06','Propiedad Horizontal','Propiedad apta para mediano grupo familiar. Este inmueble cuenta con cocina, comedor, 3 habitaciones y jardín frontal.',7300,'5vOgmNGED9E3OVn3THbgVlWlkFQW79OBlyosRYaa.jpeg','Z8dbc6rvfohIvHjIM17BCeEht5jVJE8ZVuhZaeAY.jpeg','CV6ADtYeWhlyJKzzo0MVyGa8xnU9Q50Asmv2Aojr.jpeg',2,5,'inmuebles'),(19,'2019-12-06 04:08:15','2019-12-06 04:08:15','2019-12-06','Casa dos Platas','Propiedad de dos plantas para grandes grupos familiartes. PB cocina y comedor con baños de servicio y lavadero. PA, dormitorios y playrooms.',2200,'4Lrkep4aQrd3y29C0XXfiCYxOm7busIEQMZnRtWG.jpeg','ErQPd5RvCOFiyCTyGHbjiRmVI17eEjoAEToF48W6.jpeg','qlkLo9JPDRWDeoDkZiPwt9nWqPs8CaFIb2tUFaxt.jpeg',2,6,'inmuebles'),(20,'2019-12-06 04:09:38','2019-12-06 04:09:38','2019-12-06','<NAME>','<NAME>. Diferentes versiones. mango de madera y sacaclavos.',2,'Sv0JlbyucMx1HeJYPEZFK1szxixP9NZ9I9hl3xmM.jpeg','DwlEOh5IhBgCxsNzBkeXDtNJx5kyZ6qllDgBATRH.jpeg','JtFdz3tfekDli7aJnJ1elj0fRK2iIFMWlfT7HJi8.jpeg',4,2,'herramientas'),(21,'2019-12-06 04:12:25','2019-12-06 04:12:25','2019-12-06','Percutora BOSH','Percutora marca BOSH de altisima calidad. viene con estuche, mechas de diferente medida y mango estabilizador.',120,'T88Fidn6VD0iEogEMyuva8i8fuP3qFyLTvPoVaFr.jpeg','AptMrU6lgchPOa8CclYt4KuK7e2gEA8nVIdCSFF2.jpeg','LGJPvwSKYgpxD9LN9qlTH62smV6XQsnC6uga2ksU.jpeg',4,3,'herramientas'),(22,'2019-12-06 04:13:53','2019-12-06 04:13:53','2019-12-06','Sierra electrica BOSH','Sierra electrica BOSH. Este instrumento es ideal para trabajos sobre madera. Su dientes comen cualquier tipo de madera. Viene con estuche y con funda para la hoja',110,'yYKWFQaNJokFDT8Fsq6btRnMbwpftF8Xh8VvnBPh.jpeg','CkdHzRuHMp7qjte1woMkhxTqiC1UBf970HTRsQkH.jpeg','Q0HxaaVivfhYy7G20uWvpD4uMWdMAbtNKOZw9Wvs.jpeg',4,4,'herramientas'),(23,'2019-12-06 04:15:13','2019-12-06 04:15:13','2019-12-06','Juego de Llaves','Set de tubos y llaves de gran calidad. Este estuche cuenta con llaves ingles, francesas y llaves tubo de direfentes medidas.',50,'7c4KrWdIUqS6iXUaM5WKEuuiKL34RxbboD1LdYPw.jpeg','zqwwt7klbvpum2oSjRpFViVt9xq59OUJZFqO7lWy.jpeg','ookpoQZQLIpmkZy9RdSES3ae6Ue7XDYihlrjgf9A.jpeg',4,5,'herramientas'),(24,'2019-12-06 04:16:39','2019-12-06 04:16:39','2019-12-06','Nivel Laser DeWalt','Este intrumento es util para trabajos de pintureria o mampostería. con este artefacto de gran utilidad usted dejara esas incomodas mangueras para poder trabajar de una forma mas eficiente y rapida.',100,'UhzVwouTNIJSShwGxJsg1JNT6IivI2drIhbp2ykp.jpeg','clZPQSyEXwhDDamqoh90dHCT2rf2PHgHLJ8CaQTR.jpeg','cS7MNexJWqpoEv9yWUQETyfMNbKnj6HeoMAhjycH.jpeg',4,6,'herramientas'),(27,'2019-12-06 04:22:11','2019-12-06 04:22:11','2019-12-06','<NAME>','- Heladera dos fríos,dos puertas,con freezer,con Dispenser\r\n - Volumen útil:328 litros.\r\n - Sistema Cycle Defrost.\r\n - Freezer independiente con estante divisor.\r\n - Temperatura freezer:\r\n - 18º.\r\n - Provista de cubeteras para hielo.\r\n - Descongelamiento aut.',430,'VryP8BD5iSto4O1ZO56hYyRBT7bvEQwQNfoEAt8k.jpeg','ozd8L5GC7Ek9wLx2c19XrhZzbw2UIPIpNZmcaJxn.jpeg','xAyah1bQUStk4CO6OHE8IfW02uwRAaPbI4AXR8h8.jpeg',5,2,'electrodomesticos'),(28,'2019-12-06 04:24:16','2019-12-06 04:24:16','2019-12-06','Lavarropas Automatico LG','Este innovador electrodoméstico logrará que la tarea de lavado diario sea más que sencilla. Su diseño eficaz permitirá dejar tu ropa impecable sin dañarla, optimizar tiempo y evitar los residuos de jabón.',250,'FNgMH53Jb7Sj2WIiZXGFzvxJnfK9xJXA9kK6Sgz8.jpeg','Quzcy8qfyaP7rq8bu58CMykf7744PnaiSpA2wGaR.jpeg','WEQXkly7BLb1AB0d167F0nmTC2vPv55YSdF8ne4M.jpeg',5,3,'electrodomesticos'),(29,'2019-12-06 04:26:52','2019-12-06 04:26:52','2019-12-06','Juego de Vajilla de 16 piezas','Ahora tu hogar puede ser fiel a tu estilo personal. Combina colores y estilos en tu menaje de cocina y mesa, de forma que la originalidad y la funcionalidad sean los protagonistas de tu día a día.',100,'OvJ59GHLxdmdEn34fvz1JSNQObJDBNdfskZLuE65.jpeg','nysOXD5Fg7zT4cCTQtIaJeUDiibt1ChWiVDZLAML.jpeg','ITjelc4TAsKvF7XXieIEWIjRCDa6VE0iYZFZw53F.jpeg',5,4,'electrodomesticos'),(30,'2019-12-06 04:29:22','2019-12-06 04:29:22','2019-12-06','<NAME>','COCINA A GAS - LONGVIE\r\n MODELO: 13231BF - 56CM BLANCA\r\n CARACTERÍSTICAS:\r\n Eficiencia energética AA.\r\n Multigas.\r\n Horno QuickClean.\r\n 4 hornallas de tres diferentes potencias para optimizar su uso.\r\n Plancha enlozada.\r\n Puerta con visor de doble vidrio templ...',200,'cgn7I3jo4wserDVY8HnTMFYRRORLciY8eKtvF72i.jpeg','s6xlkOusIJJ8koADYAKVSwAW7fzfl9nIBKDb5XWB.jpeg','HMLJ07YFfTrWPj4FIrsdWDtFOq61gGYKYFi2Kk4l.jpeg',5,5,'electrodomesticos'),(31,'2019-12-06 04:31:04','2019-12-06 04:31:04','2019-12-06','Microondas Samsung','Variedad de funciones y programas\r\n Posee la función de descongelamiento automático, que calcula el tiempo necesario y la potencia según el tipo de alimento o según el peso. Para destacar, este microondas cuenta con diferentes niveles de cocción .',50,'FhoID3o24EL2c6ogfKCtbKwbqdAk3eNXbSPj6MWo.jpeg','5ZVKkqkc7rF3qNEQAnWDcdK0ySE8DnmDNGsFOb9R.jpeg','orv49BPwjTNzfkHr4Zay5wNnAWeILP6qAXOr9ieA.jpeg',5,6,'electrodomesticos'),(32,'2019-12-06 04:39:58','2019-12-29 04:52:54','2019-12-06','La odisea de Homero','Título del libro: La Odisea, Autor: Homero, Editorial: Del fondo, Idioma: Español, Género del libro: Literatura y ficción, Tipo de narración: Novela',4,'Vm90tmqsADWbpRQZj4x98hI4DSXBmvIPkp8chauD.jpeg','HggdZG5u0WcycDPK5xJp8Ejj0CMu1O9tgdBaxugH.jpeg','axoV8FfhR3LPPNF815jYB0JM8hPMdRZXAl7NWWYY.jpeg',8,1,'libros'),(33,'2019-12-06 04:41:40','2019-12-06 04:41:40','2019-12-06','Appetites de <NAME>','Título del libro:\r\n Appetites\r\n Autor:\r\n <NAME>\r\n Idioma:\r\n Español\r\n Editorial:\r\n Planeta\r\n Formato:\r\n Papel\r\n Cubierta:\r\n Blanda\r\n Género del libro:\r\n Recreación, hobbies y oficios\r\n Subgéneros:\r\n Gastronomía',9,'31bra86t0x4HJ4WwL07jZ05TKpnJCv3g8DWKN4no.jpeg','986dGYi4A8BbqEjtlmMrn2v2KJYsJgYOB2Kwrk0Z.jpeg','b539U3RZCUMKxmMNeBFtwgoPOFw6DACWXReWMB1A.jpeg',8,2,'libros'),(34,'2019-12-06 04:43:15','2019-12-06 04:43:15','2019-12-06','It','El libro que inspiró a la película homónima. ¿Quién o qué mutila y mata a los niños de un pequeño pueblo norteamericano? ¿Por qué llega cíclicamente el horror a Derry en forma d e un payaso siniestro que va sembrando la destrucción a su paso?',6,'yzDpbmHlHh72xvgI9N02scglMZ5QmzfZGRwei2Ec.jpeg','FSnc0aRELgcEGgdcqSvtj2v43zy04YzHz6qSYOE6.jpeg','rsR6wH4Yy4qu3WWwPhdFAsA7J7PoIC7GvZOJ0Chs.jpeg',8,3,'libros'),(35,'2019-12-06 04:44:52','2020-01-01 20:38:15','2019-12-06','Enciclopedia Larousse Ilustrado','Título del libro\r\n DICCIONARIO ESCOLAR LAROUSSE. NUEVA EDICION\r\n Idioma\r\n Español\r\n Editorial\r\n LAROUSSE\r\n Formato\r\n Papel\r\n Género del libro\r\n Diccionarios y enciclopedias',10,'tZYyWopfgV8jRKAY8oZBPkUGuujo5lDgiWmmbKAA.jpeg','xKBhSQA21xOlPBnDuCb2io5Zxc0ZY4l2l2P50CMF.jpeg','Upik5bpK3q2wIZsLnvFAbE823UhsYwoqQFRbawpb.png',8,4,'libros'),(36,'2019-12-06 04:46:53','2020-01-01 20:19:29','2019-12-06','Santa Biblia','Santa Biblia El libro mas importante de la historia que cambio el destino de la humanidad y de la religion',6,'F7zKrWzi26sNwun7l7WJ72I7wlj4TBlMoAFDEVBr.jpeg','QpWtVq31qTff2vAot9iLg4um9lMGY6tHnhgtH6x1.jpeg','veE89Ow3h1xWG36CXjzW98N630J1wOvyRaRItk7K.jpeg',8,5,'libros'),(37,'2019-12-06 04:48:53','2019-12-06 04:48:53','2019-12-06','Las mil y una curiosidades sobre buenos aires','Una guia de turismo de la ciudad de Buenos Aires cuenta las historias mas curiosas y mas intrigantes sobre una de las ciudades mas importantes del mundo',8,'mchT7a1OyhtvF5UhpgvlZjzBX7XGoKAt6zXvXnDS.jpeg','IJsYvTWndtvKUuPztXWtJshQ3APPfvYtnIkhotDV.jpeg','QBJJqQ6fHnEDSrIfow0opyfzJUeTLar4nEYsJUUF.jpeg',8,6,'libros'),(39,'2019-12-06 05:58:27','2019-12-06 05:58:27','2019-12-06','El poder esta dentro de ti','Auto ayuda para poder encontrar dentro de uno mismo las herramientas para poder sobrepasar los problemas que nos presenta la vida',5,'QcqJryjKdQRsHUM9a97kkAMls9wBjYa0PT3da2Or.jpeg','bUD37MreHPqrMyescdJ7vTMnzNzGvM8rilqxUJsD.jpeg','MreLB7HGvo3plOIchQod2ShyuKCME4WzbQTXUvNX.jpeg',8,8,'libros'),(40,'2019-12-06 06:00:32','2019-12-06 06:00:32','2019-12-06','Muñeco Buzz LighYear','LLEGARON LOS MUÑECOS DE TOY STORY QUE ESTABAS ESPERANDO, LLEVALO CONTIGO A TODOS LADOS.\r\n MATERIAL SUAVE Y ESPONJOSO. TAMAÑO 40 CMS APROXIMADAMENTE.\r\n EDAD: 3+ AÑOS',100,'a8DU93ehG8ApX0yo38bgbLM5COYzT8eqWbxshBG5.jpeg','Uq5Q4IuiURQKoVGROeiKD5UxDJge5RkLOcUS402c.jpeg','bjHw6lsmAlfJrK4j9IPNikze7829ZaE5jLNaw5JL.jpeg',7,4,'juguetes'),(41,'2019-12-06 06:01:39','2019-12-06 06:01:39','2019-12-06','Aviones de Juguete','Varias clases de aviones para hacer volar la imaginacion de los mas pequeños',2,'XLWqkkhxD8RWFxNCRJjqmXttEfs3yCg2kABxXM55.jpeg','w1wlxy0I0TtckcdKEoV2t40cenWygJagNYfgcrae.jpeg','EeV8fjuZnsOfBIPhPEgvFp1lhO8tHlQGqvrT4RTX.jpeg',7,5,'juguetes'),(42,'2019-12-06 06:03:23','2019-12-06 06:03:23','2019-12-06','Oso iteractivo parlante','Osos con botones intecativos escondidos en las extemidades de los muñecos para fomentar la curiosidad de los bebes',2,'PdxP9m7Y813pkprUGT0nD0vu82oKqu3qaDie3Edg.jpeg','VwTWxZ0SXV7wWGb8pcXy74woaXWP9Yfh0oG0Nyq6.jpeg','3aII6zWWv1qKheaw6iYX9nDd5ZrINgltfcNpn2SP.jpeg',7,6,'juguetes'),(44,'2019-12-06 06:07:05','2019-12-06 06:07:05','2019-12-06','Autos Hot Wheels','Colecciona los autos mas increibles para usar en tus pistas de carreras!',10,'I3jwiLPlVI3JQODv25JYrn0eWcnNKEZO3UeUa5Yf.jpeg','9X3Vdi4EQNo7OViKnWvQxKZTvKJ6nqDvLGZCYgoU.jpeg','7VgjE96TM1vCm3LTic9TRbkmCCJPyjb0abTv1DgY.jpeg',7,8,'juguetes'),(45,'2019-12-06 15:42:15','2019-12-06 15:42:15','2019-12-06','Bicicleta Mountain Bike Fire Bird Rod.26','• Cuadro: Acero Hi-ten Y\r\n • Colores disponibles:\r\n o Negro con rojo\r\n o Amarillo con negro\r\n o Verde con negro\r\n o Azul con negro\r\n • Sistema de cambios: Power\r\n • Frenos: V-Brake\r\n • Horquilla: Suspension Fast\r\n • Llantas: doble pared\r\n • Cubiertas...',140,'7YAE7RBEHUeR9LkQSu5nxHPB3G2mbz2mvjdqnhuU.jpeg','MOWcCNOgHUdrbezRrzRTN735XxDfGzCm4QIoqSsb.jpeg','7TL8umui29B3HueftcEruPwnAisHLeKfbAaBTZYr.jpeg',9,1,'rodados'),(46,'2019-12-06 15:45:30','2019-12-06 15:45:30','2019-12-06','Bicicleta R26 Fire Bird Black Shimano','Detalle de componentes:\r\n • Cuadro: Aluminio hidroformado 6061\r\n • Horquilla: Suspension Fast R26\r\n • Sistema de cambios: Shimano Tourney de 21 velocidades\r\n • Manijas de cambio Shimano Rapid Fire\r\n • Piñón: 7 velocidades\r\n • Pata de cambio: Shim...',100,'XvUPIwSEXfF6KiobQi7j0Mt4YfiHvIjBbRJjvz1j.jpeg','gdBfms7q0WDkCC6ITDC1pxtiXSbOs3YHzxdUgEeb.jpeg','JTB9K2VKqc4lHYJnClZoa0UgQmTqU554pYMf0TAg.jpeg',9,2,'rodados'),(47,'2019-12-06 15:48:31','2019-12-06 15:48:31','2019-12-06','Bicicleta Moma Bike Peak','La marca número uno de Argentina ahora puede ser tuya. La tecnología y diseño de su cuadro, alto estándar de componentes y estricto control de calidad, hacen de MOMA la marca favorita tanto para uso urbano, freestyle, mountain bike o ruta.',500,'anL60NVeA8JFh8PR0EJzaw0uOBLruZhNnHaOJZRC.jpeg','pPF1jOc73q99gfeZhVsNqaeRyxHvaLgEqywUJxPB.jpeg','B6FEqFxR4CI5SFTU2IvZzSKLdqoyZOG6ehafEbka.jpeg',9,3,'rodados'),(49,'2019-12-06 15:51:24','2019-12-06 15:51:24','2019-12-06','Bicicleta Electrica','Chasis Monocasco en acero\r\n Potencia 5000 watt\r\n Motor Trimove PWT, sin escobillas, C.C.\r\n Batería Litio ion 30ah\r\n Celdas espaciales de alta descarga\r\n Frenos Sistema Hidráulico\r\n Disco 203mm delantero\r\n Disco 203mm trasero\r\n Suspensión delantera Horquilla d...',3000,'XdY840GB7SKDP31WUwZQL8J6zCFiChzHCfQuBFNZ.jpeg','uaHV3Aj3Ubx34dJJcxW6UVpWhL1b3CZclStQ7AyB.jpeg','FG6WW1yUqSd4zrPwVMQvUfu4OVRKsR9lM0mEOkti.jpeg',9,4,'rodados'),(50,'2019-12-06 15:53:39','2019-12-06 15:53:39','2019-12-06','<NAME>','Tipo: Triciclo a pedal.\r\n o Modelo: Moma\r\n o Edad: 3 - 6 años.\r\n o Peso máximo: 50 Kg.\r\n o Incluye calcos decorativas.\r\n o Diseño robusto y versátil.\r\n o Fácil de manejar sobre todo tipo de terrenos.\r\n o Relación de pedaleo ideal para realizar ascensos s...',85,'IcMclFLn56iZIsGrCLoaUtw6yavXbDd0WV2Oi616.jpeg','wUBhutFur9tcLMvHkqvawAbZUrysGlgZuYOfZ0gh.jpeg','MLROOExeBF58AbZemmSvmv7OxWNHpmAGHEG5hD2W.jpeg',9,5,'rodados'),(51,'2019-12-06 15:55:20','2019-12-06 15:55:20','2019-12-06','Monopatin Scooter','Monopatin para uso en zonas urbanas. Otro medio de trasporte para ayudar al medio ambiente.',74,'Whn1xs9mRYaoqTFkaRyot3V7mx5y4t1XBU7UYB3B.jpeg','NR14zVznwVF3miaGF9yA7bY4Bo3qqt3mZTau5RNR.jpeg','ZY5KPXJDVduNc22Fp0QNpGDfN2lUSfv5BrJWAm9j.jpeg',9,6,'rodados'),(53,'2019-12-06 15:59:30','2019-12-06 15:59:30','2019-12-06','Iphone 5','IPhone 5s 16 giga 4G Nuevos Sellados Libres de fabrica OEM\r\n Únicamente color SPACE GRAY \r\n Envios gratis a todo el país por mercadoenvios (correo argentino)',200,'NFtQosOs0FAgzm6gR6OSihgz9Nt5aKVLnC3Zen5n.jpeg','KBe1u9kYXUaspHsLX2JdZ6YKDeVhakPJTwbxF9aB.jpeg','Cj75T2HHuaTo7yoEi1yeJY4pHY5QJ4J1fbBPuN3F.jpeg',10,1,'celulares'),(54,'2019-12-06 16:01:25','2019-12-06 16:01:25','2019-12-06','Huawei GW','Bateria tipoPolimero de Litio\r\n Capacidad batería3000 Amperios hora\r\n Cámara de fotos: cámaraApertura ƒ / 2.0, Enfoque automático, Geoetiquetado, HDR\r\n Resolución cámara de fotos13 Megapíxeles\r\n Resolución cámara de fotos (alto)3120 Píxeles\r\n Resol...',54,'mRdcuL6hRgvrUpaCcIjPQYRSssWp89LIzSqKkysb.jpeg','GIod8Y268yqNpcIMsoRpfjBYXO6ssTOywSN3gFVo.jpeg','N3Vzoeo4sX6udR9Egspzl4AL0xFAsouNlzGy3EE6.jpeg',10,2,'celulares'),(55,'2019-12-06 16:03:57','2019-12-06 16:03:57','2019-12-06','Xaiomi Mi 8','Acabado en degradado con efecto espejo.\r\n Un solo color no es suficiente. Tu smartphone cambia de color con la elegancia propia de una pintura impresionista. El resultado es el azul aurora y el negro medianoche, colores creados para dar rienda suelta a tu...',160,'PXxmtX5mMJpnBxBYfU8OKWpBY1wzl0TfsF7MUbeL.jpeg','LykiDNOSPwYjP8NbkTBeH3rcXctCpDoG0kQO7cid.jpeg','ioyIpLQ6w3wsJMhPs0CSBvWRDsnZIhQxbL9gdzYo.jpeg',10,3,'celulares'),(56,'2019-12-06 16:06:35','2019-12-06 16:06:35','2019-12-06','Motorola E5','Procesador de alto rendimiento\r\n Su potente procesador y memoria RAM, te permitirán ejecutar aplicaciones y realizar múltiples tareas al mismo tiempo. Su sistema operativo Android 8.0 te resultará eficiente e intuitivo.',100,'GxQjq2jv1AlNsL5TWkasEutToVsMMyZtC12gDMBa.jpeg','s1cewI7bHZKhhKkK7JNjzbwFJeJ2kNEYVvcNKucj.jpeg','iazeFEYbHlRu0gfvttjBNJV5ArEuMpZa124h2Z7e.jpeg',10,4,'celulares'),(57,'2019-12-06 16:09:56','2019-12-06 16:09:56','2019-12-06','Samsung J2','Disfrutá más con una pantalla amplia:\r\n Con un diseño que destaca, el Galaxy J2 Core cuenta con una increíble pantalla qHD de 5\" que ofrece mayor cobertura y mejor experiencia de visualización. Además, cuenta con una variedad de llamativos colores c...',80,'J9oQjUmL5CfuXlJQN2r4wof8VAzcKDjAYEPnFxg0.jpeg','b1droWozm0w0bYImMsRjMnMeEjfcfPSjqicJKJ61.jpeg','z5iPgvh0FRZTgRU7B0HWXAmIvlYzr2u0WJfBSDlB.jpeg',10,5,'celulares'),(58,'2019-12-06 16:12:00','2019-12-06 16:12:00','2019-12-06','Xaiomi Red Mi Go','Este Xiaomi Redmi GO es un móvil bastante ligero, con cuerpo de plástico y un tamaño algo más pequeño de lo normal a estas alturas. La parte trasera está muy despejada al no contar con el lector de huellas, para desbloquear este móvil tan básico ...',80,'z12pL9ylHZr9VflRuuUrpAwI9OYxtY6Ao3tPQxdo.jpeg','95k3BI79orThJia1v4tr3b3iec0yWaSQXYd71qUI.jpeg','xvOPhIbL9tpTWo4fbRGMnGEQ2NaxYdKw3d02bSdN.jpeg',10,6,'celulares'),(61,'2020-01-01 19:40:39','2020-01-01 19:40:39','2020-01-01','<NAME> 2012','Excelente estado',4000,'ALQIL3DGWyQ7DtdZA41U5T2L0ePeHnxsjgzRQOXT.jpeg','9OjECFIaboMy7zZDqX5O2Rx0Qiuv6sDdfZ4hqR9T.jpeg','UffDp9ExH36lFcz0JSzoshNG9ZpFM6SQIS87VO2T.jpeg',1,1,'autos'),(62,'2020-01-01 20:07:48','2020-01-01 20:07:48','2020-01-01','Toyota 2014','To<NAME>. Listo para tranferir',5000,'yvvkDp3eEsKqmXOPT0RxbG4XKUR4rFxYbinobLtK.jpeg','zZFdb1WKbv0PIyDz84Yo8e96LYLznzgfIo7UqL2p.jpeg','Xy9v9HI9bLQIx6JSRVNYZfmjMen7O4Ps4yMrQTwn.jpeg',1,1,'autos'),(63,'2020-01-02 00:04:03','2020-01-02 00:04:03','2020-01-01','GRAND THEFT AUTO 5','En la extensa y soleada ciudad de Los Santos, tres criminales muy diferentes lo arriesgarán todo en una serie de atrevidos y peligrosos atracos que marcarán sus vidas.',2,'p0Dmh3NSQmAhmRhqmkAwW3U0gZdoJxlEKa2lbrhP.webp','yjfFymZyfevtAZENbAiiJkJyTtAefZiptMhJSruu.webp','xQlIzdKrzmKQM44e5HqOgs7opwGkyTFubucEVbnq.webp',6,1,'gamers'),(64,'2020-01-02 00:08:24','2020-01-02 00:08:24','2020-01-01','The Last Of Us Ps3','¿Serás de los últimos que queden en The Last of Us™?\r\nCuando el mundo que conocemos desaparece, cuando la línea que separa el bien del mal se difumina y cuando se toman decisiones de vida o muerte a diario, ¿qué decisiones tomarías para sobrevivir?',2,'M39lBn1xTKxJZT5Dk5PyIHDtkmuTCAoGE0nFiGPM.webp','lYGdxYCn4LIFdi7LRgb3UOeOSfMkcpoubdtiK5Sz.webp','FBNkH4OXbMUAKk2QBm6zWskZAFaldkHW26TLlmMs.webp',6,1,'gamers,libros'),(65,'2020-01-02 00:13:06','2020-01-02 00:13:06','2020-01-01','Call Of Duty Ghosts I Juego Ps3','CALL OF DUTY GHOSTS',2,'KdPYZ2GBrjh3kDdnW2uhO5EGE063rbgkRev22KR5.webp','NY0ZLJvKAgL7EuSNTWzbi4O3IZcPsaq5PcMrG6h8.webp','RvcGyUQw8aayB1pXpLT4nbfchohgopq1139xKTcc.webp',6,4,'gamers,juguetes,libros'),(68,'2020-01-07 23:31:36','2020-01-07 23:33:34','2020-01-07','libro','bdthzdjzrdth',7,'VmiQd27qypVNQnagP4UrOr0val0dFbStA3QAcKA4.jpeg','R90QLK8GbMcuYCYMv6OFzh06A4sM5S8dkAXupysS.jpeg','HbEvXqihN7hS9J4KHhzQeAyYjAG3esJABCK862B3.jpeg',8,9,'juguetes,libros'),(69,'2020-01-09 15:46:01','2020-01-09 15:46:01','2020-01-09','jugete x','fsefhpsaefhapse',5,'K4lqM81GqnfzCDGR4EW0hsyiMXrH4GzYe39Jj9Qg.jpeg','u7rke1mA3ywf9QwHOPyMPJYFU6WKVr9WbKzFqf9e.png','ek887gcdBdE1KJFWiKL3pSbvNKdFXGyeo1leUfAN.png',7,10,'herramientas,libros'),(71,'2020-01-11 19:28:52','2020-01-11 19:28:52','2020-01-11','Antiguo Ropero Provenzal Patinado','Roperos provenzal patinados desarmables de hermosas tallas, patinados en blanco con terminación en cera.\r\n\r\nLos modelos de las fotografías son de muestra, Todos los roperos son con cajonera a la vista 2 puertas grandes y una chica del centro, lo que cambia es el tallado de los mismos, no somos fabricantes, son roperos antiguos recilados, realizado de patina exterior y lustre parte interior. Los modelos depende de las nuevas adquisiciones de la tienda.',1900,'2ehiAK8XyJp55TEtCv6aDemEZQm3b4ywJMgvukY7.jpeg','S7qGAWbRKXopP1abpinB9WbjUbJYpR3CaLlmOIoO.jpeg','R0BlPZMAfaEwRlyFrGS4pLHg2uwdopGCV2HgPGuO.jpeg',3,1,'muebles,herramientas,electrodomesticos'),(72,'2020-01-11 19:37:37','2020-01-11 19:37:37','2020-01-11','Mostrador restaurante','Mostrador de madera con piedra de granito arriba , 124 cm de ancho 110 de alto 72 de profundidad en la parte trasera tiene una mesada a 80 cm de altura de 129 x 69 cm , dos cajones y varios compartimientos',40,'mp8FsULExbkgJizzVI4g94uk8px0qM3nv8iQY0ll.jpeg','dJMFPNa4jPnnu25RSmTMuuJJ6iOpX7wHZR7PAJGb.jpeg','vZQmBS5GdO8jYprIToTlcfaXnmObmyanNTKZMduf.jpeg',3,6,'muebles,herramientas'),(86,'2020-01-12 06:02:06','2020-01-12 06:02:06','2020-01-12','<NAME> 2012','Excelente estado. Listo para tranferir',2000,'CisHUvY9Lwahf8413hleLwQDYxvJMUiMK5vHvssh.jpeg','Xq79lRCxhz0XnKLgcnmnhroVn8TavUWzFwgxhD26.jpeg','GRSWsIhBQ0iECMV9oGsclfDzoNOgFiJPNStuiI2l.jpeg',1,7,'autos'),(87,'2020-01-12 06:03:04','2020-01-12 06:03:04','2020-01-12','Peugeot Partner 1.4 Furgon Confort','<NAME> taxi',3000,'R91dIvc9n3mYKjzDbc2Yw6zctSv4MKkKYnRcrtb3.jpeg','ygbJy6hqdEh6gRqCKvLFGZOymDhl5AEWaf5fDsgV.jpeg','o94cBpXq6vOkgG49ECTFkQ0NGl6apQBdrdeZ1T6L.jpeg',1,7,'autos'),(89,'2020-01-12 21:02:00','2020-01-12 21:02:00','2020-01-12','Kia Sportage 2.0','Excelente mecánica. Impecable',4200,'crpIX5D3uKfTM4w7gvBVJdE9AgO16EVCZSniCZRH.jpeg','7pvkBFSaM1ju8Fycbpk5zRiMX3PMeQNSRkNNpE83.jpeg','DNf9MgVtin3qNkLTpjqpwyl1buVK0AEBC5lELr8F.jpeg',1,9,'autos'),(90,'2020-01-15 17:16:26','2020-01-15 17:16:26','2020-01-15','Coleccion de libros','Colección de libros varios',100,'VKjx3EG5VrZ6HP4szTTTLmC2D01VDD6U1nicp5Jt.jpeg','gYWwnEYsaaXutXdqtJmREgXgHOJz78bOYJnHoVOI.jpeg','vRzG3AmrljceaDKVABJPCpRlZIoOkX2LDynjGnqS.jpeg',8,1,'libros'); /*!40000 ALTER TABLE `products` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping data for table `users` -- LOCK TABLES `users` WRITE; /*!40000 ALTER TABLE `users` DISABLE KEYS */; INSERT INTO `users` VALUES (1,'admin','Eric','Mena','<EMAIL>',NULL,'$2y$10$saSN2eJr/Al6fI0lvt1D7.R142ZRr55iCZBildAEvaRf6emMWC18.','1976-03-03','masculino','perfilHombre.png',NULL,'General Pico 10631','EL LIBERTADOR','Buenos Aires','011 4739-4347','11-3401-6800','IwZRLBIWns4M3bnD3mT7s5fprVkmym0Usw2WI0pYqh8ZtGSkP0MpALasiFKu','2019-11-26 03:12:24','2020-01-12 13:41:16'),(2,'user','Adriana','Garcia','<EMAIL>',NULL,'$2y$10$wr5hBQs9.c8hD/wLSYUGW.FJ8vRnrEtx83fhcr8q5/Ktf9kqsUCGG','1976-03-12',NULL,'avatar16.png',NULL,'Sucre 1845','<NAME>','Buenos Aires','011 1234 1234','11 1234 5678',NULL,'2019-12-10 18:30:38','2019-12-10 18:30:51'),(3,'user','Jorge','Gonzalez','<EMAIL>',NULL,'$2y$10$.qf7BGYy6b4eTtfYVHnog.Od5HaT61jvwYsCtEIvQLKCYSNmlsJ6G','1997-06-22',NULL,'avatar13.png',NULL,'Pichincha 1520','San Miguel','Buenos Aires','011 4941-2286','11-1234-1234',NULL,'2019-12-13 18:27:46','2019-12-13 18:29:24'),(4,'user','Alberto','Fernandez','<EMAIL>',NULL,'$2y$10$DY4VqZ5fXfLjnY8od2MtF.JOIB8fB7M2Yd2WfqlM1nu9aWMow6nI2','1976-03-03',NULL,'avatar24.png',NULL,'California 1518','Virrey del Pino','Buenos Aires','011 1234-1234','11-1234-1234',NULL,'2019-12-19 12:52:53','2019-12-27 05:49:49'),(5,'user','Delia','Ojeda','<EMAIL>',NULL,'$2y$10$xMPCILzfFQafMls4V1nBhON.VLVVxr.01EX4UKQXCTB/VMkm3Q/Zq','2019-12-27',NULL,'avatar20.png',NULL,'General Hornos 1160','Caseros','Buenos Aires','011 4444-4444','11-2648-9867',NULL,'2019-12-27 12:38:38','2019-12-28 00:53:32'),(6,'user','Jorge','Jacobson','<EMAIL>',NULL,'$2y$10$D3bHtJr.T3GiSaTJxerpI.9UTCr2JpIFiDB7Km/D36FVKZiZWfK6y','1987-06-15',NULL,'avatar03.png',NULL,'General Lavalle 3410','Monte Grande','Buenos Aires','011 4985-5566','11-6668-5622',NULL,'2019-12-27 12:39:57','2019-12-27 12:40:05'),(7,'user','Mauricio','Macri','<EMAIL>',NULL,'$2y$10$T3bv13wJF0wH3WF8RDhmSetxiOeKPM2I/Oo2vEbYQta/jUzU6cQtW','1968-05-20',NULL,'avatar18.png',NULL,'Otamendi 247','San Justo','Buenos Aires','011 5698-6654','11-6648-5592',NULL,'2019-12-28 00:29:31','2019-12-28 00:30:01'),(8,'user','Eduardo','Hernandez','<EMAIL>',NULL,'$2y$10$XPM9ZHIZihfD.hx7JItY3OAvf8uSr7sqeHboIXN.eptChC2dIFrKW','1986-06-02',NULL,'avatar19.png',NULL,'Lincoln 2342','<NAME>','Buenos Aires','011 1234-6655','11-6694-8863',NULL,'2019-12-28 00:35:45','2019-12-28 00:35:59'),(9,'user','carlos','tevez','<EMAIL>',NULL,'$2y$10$Jh6HP5A8SCF.cs6l84Iv4uLmgytOcvXLFtE1GN0RsbHGlQAyPTc1K','1956-12-25','masculino','avatar14.png',NULL,'Fraga 900','CHACARITA','Ciudad Autónoma de Buenos Aires','011 3939-3523','011 3939-3523',NULL,'2020-01-07 23:20:13','2020-01-12 21:00:29'),(10,'user','Alexis','daniele','<EMAIL>',NULL,'$2y$10$AjxVWZlNxNfpY7YNQ6tG5uSyDpzhFItJBLen4J3UEhu81ETgzOHJW','1995-06-07',NULL,'avatar08.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-09 15:44:30','2020-01-09 15:44:51'),(11,'user','vicky','forni','<EMAIL>',NULL,'$2y$10$FWrAMCEIfiZ6xHJAgIBq6.3swC9F8wq.PFP2HsKKcVCZ74pcRPuWK','1990-12-14',NULL,'avatar16.png',NULL,'Av. Rivadavia 1520','CABALLITO','Ciudad Autónoma de Buenos Aires',NULL,NULL,NULL,'2020-01-09 17:59:42','2020-01-12 05:12:46'),(12,'user','Dario','Villarroel','<EMAIL>',NULL,'$2y$10$srnhG7yZDoDpgDVzZ.51v.Jm0qUryFOLUiNSauOnISdmwd12GHANq','1986-06-15',NULL,'avatar08.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-10 06:12:24','2020-01-10 06:15:33'),(13,'user','Mario','Negri','<EMAIL>',NULL,'$2y$10$sFlYRlV/ReGd1EzB2JW58ezzvhUv/KElVTLzXLMs4TIslVwZembFK','1988-06-20',NULL,'perfilDesconocido.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-10 06:16:03','2020-01-10 06:16:03'),(14,'user','Marcos','Palladini','<EMAIL>',NULL,'$2y$10$YjlcyeyHLV4IW0eLWpWdYOd21JYQcD/ak5Ry/q6rJX1kmTLI1MSle','1976-03-03',NULL,'perfilDesconocido.png',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-16 01:47:27','2020-01-16 01:47:27'); /*!40000 ALTER TABLE `users` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2020-01-15 20:33:42
CREATE TABLE [dbo].[Tags] ( [TagID] INT IDENTITY (1, 1) NOT NULL, [Tag] CHAR (25) NOT NULL, [TagDescription] CHAR (512) NOT NULL, [PriorityTag] BIT NOT NULL );
-- Procedure WebTemplate_Del SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[WebTemplate_Del] ( @Id int ) AS SET NOCOUNT ON if(@Id > 0) DELETE FROM WebTemplate WHERE Id=@Id RETURN GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO
INSERT INTO department ("name") VALUES ("Sales"); INSERT INTO department ("name") VALUES ("Legal"); INSERT INTO department ("name") VALUES ("Finance"); INSERT INTO roles (title, salary, department_id) VALUES ("Salesperson", 60000, 1), ("Paralegal", 80000, 2), ("Sales Manager", 120000, 1), ("Accountant", 100000, 3), ("Legal Team Lead", 150000, 2); INSERT INTO employee ("first_name", "last_name", "role_id", "manager_id") VALUES ("Mike", "Chan", 5, null), ("Cesar", "Romero", 3, null), ("John", "Doe", 1, 2), ("Tom", "Allen", 2, 1)
/* Script: GeomIntersect.sql Purpose: Microsoft Transact SQL Script that calculate the intersection of two geometry objects. Two examples are provided here - one using variables, the other using an inner join from here: http://www.benjaminspaulding.com/2011/11/15/spatial-sql-geographer-part-1-spatial-sql/ Instructions: Set proper table and field names and run the script. Author: <NAME> - 2016 */ --Using variables DECLARE @poly_geom geometry select @poly_geom = geom.STAsText() From dbo.States_Provinces where dbo.States_Provinces.name_1 like '%Massachusetts%' DECLARE @line_geom geometry select @line_geom = geom.STAsText() from dbo.Roads where IDval = 2974 SELECT @poly_geom.STIntersects(@line_geom) as IntersectValue, @poly_geom as input1, @line_geom as input2 --Using Inner Join - this should work. I haven't tested it :( Will return all records that return TRUE intersection (1) select * From dbo.States_Provinces P inner join dbo.Roads I on P.geom.STIntersects(I.geom) = 1 where p.NAME_1 = 'Massachusetts'
create table p1k1 as ( select p1.id as p1_id, k_person2id from person p1, knows where p1.p_personid = k_person1id ); create table fpf as ( select f_title, f_forumid, fp_personid, fp_joindate from forum f, forum_person fp where fp.fp_forumid = f.f_forumid ); create index p1k1_idx on p1k1(p1_id);
<gh_stars>1-10 DELETE FROM AD_Menu WHERE AD_Process_ID IN (540618, 540724); DELETE FROM AD_Scheduler WHERE AD_Process_ID IN (540618, 540724); DELETE FROM AD_Process WHERE AD_Process_ID IN (540618, 540724); DROP VIEW IF EXISTS "de.metas.fresh".X_MRP_ProductInfo_AttributeVal_Raw_V; DROP VIEW IF EXISTS X_MRP_ProductInfo_V; DROP VIEW IF EXISTS X_MRP_ProductInfo_V_deprecated; DROP FUNCTION IF EXISTS "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V(numeric, numeric); DROP FUNCTION IF EXISTS x_mrp_productinfo_attributeval_v(date, numeric); DROP FUNCTION IF EXISTS X_MRP_ProductInfo_Detail_Fallback_V(date); DROP FUNCTION IF EXISTS X_MRP_ProductInfo_Detail_Insert_Fallback(date); DROP FUNCTION IF EXISTS "de.metas.fresh".X_MRP_ProductInfo_Detail_Update_Poor_Mans_MRP(date, numeric, numeric); DROP FUNCTION IF EXISTS X_MRP_ProductInfo_Detail_V(date, numeric); DROP FUNCTION IF EXISTS "de.metas.fresh".X_MRP_ProductInfo_Detail_MV_Refresh(date, numeric, numeric); DROP FUNCTION IF EXISTS x_mrp_productinfo_detail_v_experimental(date,date); DROP TABLE IF EXISTS X_MRP_ProductInfo_Detail_MV CASCADE;
-- 2017-05-20T12:00:11.930 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543344,0,'AD_Role_Included_ID',TO_TIMESTAMP('2017-05-20 12:00:11','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Included Role','Included Role',TO_TIMESTAMP('2017-05-20 12:00:11','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-05-20T12:00:11.938 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543344 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2017-05-20T12:00:12.029 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,556814,543344,0,13,53222,'N','AD_Role_Included_ID',TO_TIMESTAMP('2017-05-20 12:00:11','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','Y','N','N','N','Y','Y','N','N','N','N','Included Role',TO_TIMESTAMP('2017-05-20 12:00:11','YYYY-MM-DD HH24:MI:SS'),100,1) ; -- 2017-05-20T12:00:12.035 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=556814 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-05-20T12:00:12.043 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE AD_Role_Included ADD COLUMN AD_Role_Included_ID numeric(10,0) NOT NULL DEFAULT nextval('ad_role_included_seq') ; -- 2017-05-20T12:00:12.133 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE AD_Role_Included DROP CONSTRAINT IF EXISTS ad_role_included_pkey ; -- 2017-05-20T12:00:12.134 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE AD_Role_Included DROP CONSTRAINT IF EXISTS ad_role_included_key ; -- 2017-05-20T12:00:12.139 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE AD_Role_Included ADD CONSTRAINT ad_role_included_pkey PRIMARY KEY (AD_Role_Included_ID) ; -- 2017-05-20T12:00:12.335 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,556814,558499,0,53240,TO_TIMESTAMP('2017-05-20 12:00:12','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','N','N','N','N','N','N','N','Included Role',TO_TIMESTAMP('2017-05-20 12:00:12','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-05-20T12:00:12.341 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=558499 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-05-20T12:00:35.925 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543345,0,'AD_Role_OrgAccess_ID',TO_TIMESTAMP('2017-05-20 12:00:35','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Role_OrgAccess','AD_Role_OrgAccess',TO_TIMESTAMP('2017-05-20 12:00:35','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-05-20T12:00:35.928 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543345 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2017-05-20T12:00:36.010 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,556815,543345,0,13,422,'N','AD_Role_OrgAccess_ID',TO_TIMESTAMP('2017-05-20 12:00:35','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','Y','N','N','N','Y','Y','N','N','N','N','AD_Role_OrgAccess',TO_TIMESTAMP('2017-05-20 12:00:35','YYYY-MM-DD HH24:MI:SS'),100,1) ; -- 2017-05-20T12:00:36.014 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=556815 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-05-20T12:00:36.019 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE AD_Role_OrgAccess ADD COLUMN AD_Role_OrgAccess_ID numeric(10,0) NOT NULL DEFAULT nextval('ad_role_orgaccess_seq') ; -- 2017-05-20T12:00:36.059 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE AD_Role_OrgAccess DROP CONSTRAINT IF EXISTS ad_role_orgaccess_pkey ; -- 2017-05-20T12:00:36.060 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE AD_Role_OrgAccess DROP CONSTRAINT IF EXISTS ad_role_orgaccess_key ; -- 2017-05-20T12:00:36.061 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE AD_Role_OrgAccess ADD CONSTRAINT ad_role_orgaccess_pkey PRIMARY KEY (AD_Role_OrgAccess_ID) ; -- 2017-05-20T12:00:36.168 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,556815,558500,0,351,TO_TIMESTAMP('2017-05-20 12:00:36','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','N','N','N','N','N','N','N','AD_Role_OrgAccess',TO_TIMESTAMP('2017-05-20 12:00:36','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-05-20T12:00:36.189 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=558500 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ;
create table if not exists markets ( quote_asset varchar(64), base_asset varchar(64), ticker varchar not null, primary key (quote_asset, base_asset) ); create table if not exists fills ( side varchar(4) not null, tx_id varchar(64) not null, height integer not null, quote_asset varchar(64) not null, base_asset varchar(64) not null, amount bigint not null, price bigint not null, fee bigint not null, ts bigint not null );
<reponame>499453466/Lua-Other /* =============================== Title: The Harvest Festival Remove Author: Nexis Team: Sun++ (www.sunplusplus.info) Duration: Sept 8th - Sept 13th =============================== */ /* REMOVE CREATURE SPAWNS */ DELETE FROM `creature_spawns` WHERE `id` BETWEEN '400000' AND '400026'; /* REMOVE CREATURE WAYPOINTS */ DELETE FROM `creature_waypoints` WHERE `spawnid` BETWEEN '400000' AND '400025'; /* REMOVE GAMEOBJECT SPAWNS */ DELETE FROM `gameobject_spawns` WHERE `id` BETWEEN '400000' AND '400130';
-- Create widgets. -- requires: users
alter table evt_feature_used add if not exists feature_alias varchar(255); update host set kind = 'other' where host.kind = 'corporate'
<reponame>radekg/kratos ALTER TABLE "sessions" ADD COLUMN "active" NUMERIC DEFAULT 'false';
/* create trigger - check if the identifier name includes a dot(.). */ create user u1; call login ('u1') on class db_user; create table u1.t1 (c1 int, c2 varchar, c3 datetime); create table u1.t2 (c1 int, c2 varchar, c3 datetime); create trigger u1.trig1 after insert on u1.t1 execute insert into t2 values (obj.c1, obj.c2, obj.c3); create trigger u1.trig1.trig1 after insert on u1.t1 execute insert into t2 values (obj.c1, obj.c2, obj.c3); create trigger [trig2.trig2] after insert on u1.t1 execute insert into t2 values (obj.c1, obj.c2, obj.c3); create trigger "trig3.trig3" after insert on u1.t1 execute insert into t2 values (obj.c1, obj.c2, obj.c3); create trigger `trig4.trig4` after insert on u1.t1 execute insert into t2 values (obj.c1, obj.c2, obj.c3); call login ('u1') on class db_user; drop trigger trig1; drop table t2; drop table t1; call login ('dba') on class db_user; drop user u1;
<filename>Database/flegigs_clean_database.sql -- phpMyAdmin SQL Dump -- version 4.4.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 15, 2019 at 11:47 AM -- Server version: 5.6.25 -- PHP Version: 5.6.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `flegigs` -- -- -------------------------------------------------------- -- -- Table structure for table `accepted_jobs` -- CREATE TABLE IF NOT EXISTS `accepted_jobs` ( `id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `customer_user_id` int(11) NOT NULL, `helper_user_id` int(11) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE IF NOT EXISTS `admin` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `name` varchar(255) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `card_information` -- CREATE TABLE IF NOT EXISTS `card_information` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `card_holder_name` varchar(255) NOT NULL, `card_number` varchar(255) NOT NULL, `expiry_month` int(11) NOT NULL, `expiry_year` int(11) NOT NULL, `cvv_no` int(11) NOT NULL, `card_type` varchar(100) NOT NULL, `is_primary` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `customer` -- CREATE TABLE IF NOT EXISTS `customer` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `first_name` varchar(255) NOT NULL, `last_name` varchar(255) NOT NULL, `location` varchar(255) NOT NULL, `latitude` varchar(255) NOT NULL, `longitude` varchar(255) NOT NULL, `profile_image` varchar(255) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' COMMENT 'default 1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `customers_rating` -- CREATE TABLE IF NOT EXISTS `customers_rating` ( `id` int(11) NOT NULL, `helper_user_id` int(11) NOT NULL, `customer_user_id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `rating` varchar(50) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `escrow_payment` -- CREATE TABLE IF NOT EXISTS `escrow_payment` ( `id` int(11) NOT NULL, `customer_user_id` int(11) NOT NULL, `receiver_id` int(11) NOT NULL, `profile_id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `payment_amount` varchar(255) NOT NULL, `payment_date` datetime NOT NULL, `transection_id` varchar(255) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `escrow_to_helper_payment` -- CREATE TABLE IF NOT EXISTS `escrow_to_helper_payment` ( `id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `helper_user_id` int(11) NOT NULL, `pay_amount` varchar(255) NOT NULL, `booking_fees` varchar(255) NOT NULL, `payment_time` datetime NOT NULL, `transection_id` varchar(255) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' COMMENT '1 for payment success, 0 for payment faild' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `helpers` -- CREATE TABLE IF NOT EXISTS `helpers` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `first_name` varchar(255) NOT NULL, `last_name` varchar(255) NOT NULL, `mobile` varchar(255) NOT NULL, `gender` varchar(50) NOT NULL, `location` varchar(255) NOT NULL, `latitude` varchar(255) NOT NULL, `longitude` varchar(255) NOT NULL, `profile_image` varchar(255) NOT NULL, `stripe_key` varchar(255) NOT NULL, `status` int(11) NOT NULL DEFAULT '0' COMMENT 'default 0 for inactive, 1 for active' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `helpers_rating` -- CREATE TABLE IF NOT EXISTS `helpers_rating` ( `id` int(11) NOT NULL, `helper_user_id` int(11) NOT NULL, `customer_user_id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `rating` varchar(50) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `helper_support` -- CREATE TABLE IF NOT EXISTS `helper_support` ( `id` int(11) NOT NULL, `helper_user_id` int(11) NOT NULL, `helper_email` varchar(255) NOT NULL, `subject` varchar(255) NOT NULL, `message_body` longtext NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `jobs` -- CREATE TABLE IF NOT EXISTS `jobs` ( `id` int(11) NOT NULL, `job_id` varchar(50) NOT NULL, `customer_user_id` int(11) NOT NULL, `short_description` varchar(255) NOT NULL, `difficulty_level` varchar(50) NOT NULL, `no_of_helper` varchar(50) NOT NULL, `gender_preference` varchar(50) NOT NULL, `duration` varchar(100) NOT NULL, `monitary_compensation` varchar(255) NOT NULL, `location` varchar(255) NOT NULL, `latitude` varchar(255) NOT NULL, `longitude` varchar(255) NOT NULL, `posted_job_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `completed_job_date` datetime NOT NULL, `job_status` int(11) NOT NULL COMMENT 'default 0 for pending, 1 for in-progress, 2 for completed and 3 for cancelled' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `job_images` -- CREATE TABLE IF NOT EXISTS `job_images` ( `id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `customer_user_id` int(11) NOT NULL, `images` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `notification_list` -- CREATE TABLE IF NOT EXISTS `notification_list` ( `id` int(11) NOT NULL, `customer_user_id` int(11) NOT NULL, `helper_user_id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `message` varchar(255) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `payment_record` -- CREATE TABLE IF NOT EXISTS `payment_record` ( `id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `customer_user_id` int(11) NOT NULL, `helper_user_id` int(11) NOT NULL, `transection_id` varchar(255) NOT NULL, `job_payment` varchar(255) NOT NULL, `tip` varchar(255) NOT NULL, `booking_fees` varchar(100) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `profile` -- CREATE TABLE IF NOT EXISTS `profile` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; -- -- Dumping data for table `profile` -- INSERT INTO `profile` (`id`, `name`) VALUES (1, 'admin'), (2, 'customer'), (3, 'helper'); -- -------------------------------------------------------- -- -- Table structure for table `requested_job` -- CREATE TABLE IF NOT EXISTS `requested_job` ( `id` int(11) NOT NULL, `job_id` int(11) NOT NULL, `helper_user_id` int(11) NOT NULL, `status` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `token_record` -- CREATE TABLE IF NOT EXISTS `token_record` ( `id` int(11) NOT NULL, `profile_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `device_token` longtext NOT NULL, `device_type` varchar(100) NOT NULL, `device_id` varchar(100) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- -- Dumping data for table `token_record` -- INSERT INTO `token_record` (`id`, `profile_id`, `user_id`, `device_token`, `device_type`, `device_id`) VALUES (1, 3, 29, 'eES-HTrgy2Q:APA91bF3d9fuf-0f8NUTs8xslM7HAMkrpJS0G8RxBdeGFNylmWzqjU3Gbo5zkCgXmqsSjphlWBAcMWRqh50ALjam89eIQBu25G8ya5guzp2KNT9fVbzWVnNi5uTl3qo008o28WYDyLbd', 'android', '<PASSWORD>'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL, `profile_id` int(11) NOT NULL, `email` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `otp` varchar(100) DEFAULT NULL, `status` int(11) NOT NULL DEFAULT '1' COMMENT 'default 1 for active, 0 for inactive', `is_online` int(11) NOT NULL DEFAULT '1' COMMENT '1 for online and 0 for offline' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table `accepted_jobs` -- ALTER TABLE `accepted_jobs` ADD PRIMARY KEY (`id`), ADD KEY `job_id` (`job_id`); -- -- Indexes for table `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id`), ADD KEY `profile_id` (`user_id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `card_information` -- ALTER TABLE `card_information` ADD PRIMARY KEY (`id`); -- -- Indexes for table `customer` -- ALTER TABLE `customer` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `customers_rating` -- ALTER TABLE `customers_rating` ADD PRIMARY KEY (`id`); -- -- Indexes for table `escrow_payment` -- ALTER TABLE `escrow_payment` ADD PRIMARY KEY (`id`); -- -- Indexes for table `escrow_to_helper_payment` -- ALTER TABLE `escrow_to_helper_payment` ADD PRIMARY KEY (`id`); -- -- Indexes for table `helpers` -- ALTER TABLE `helpers` ADD PRIMARY KEY (`id`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `helpers_rating` -- ALTER TABLE `helpers_rating` ADD PRIMARY KEY (`id`); -- -- Indexes for table `helper_support` -- ALTER TABLE `helper_support` ADD PRIMARY KEY (`id`); -- -- Indexes for table `jobs` -- ALTER TABLE `jobs` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `job_id` (`job_id`), ADD KEY `customer_user_id` (`customer_user_id`); -- -- Indexes for table `job_images` -- ALTER TABLE `job_images` ADD PRIMARY KEY (`id`), ADD KEY `job_id` (`job_id`,`customer_user_id`); -- -- Indexes for table `notification_list` -- ALTER TABLE `notification_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `payment_record` -- ALTER TABLE `payment_record` ADD PRIMARY KEY (`id`); -- -- Indexes for table `profile` -- ALTER TABLE `profile` ADD PRIMARY KEY (`id`); -- -- Indexes for table `requested_job` -- ALTER TABLE `requested_job` ADD PRIMARY KEY (`id`); -- -- Indexes for table `token_record` -- ALTER TABLE `token_record` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD KEY `profile_id` (`profile_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `accepted_jobs` -- ALTER TABLE `accepted_jobs` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `admin` -- ALTER TABLE `admin` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `card_information` -- ALTER TABLE `card_information` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `customer` -- ALTER TABLE `customer` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `customers_rating` -- ALTER TABLE `customers_rating` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `escrow_payment` -- ALTER TABLE `escrow_payment` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `escrow_to_helper_payment` -- ALTER TABLE `escrow_to_helper_payment` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `helpers` -- ALTER TABLE `helpers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `helpers_rating` -- ALTER TABLE `helpers_rating` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `helper_support` -- ALTER TABLE `helper_support` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `jobs` -- ALTER TABLE `jobs` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `job_images` -- ALTER TABLE `job_images` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `notification_list` -- ALTER TABLE `notification_list` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `payment_record` -- ALTER TABLE `payment_record` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `profile` -- ALTER TABLE `profile` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `requested_job` -- ALTER TABLE `requested_job` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `token_record` -- ALTER TABLE `token_record` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- Constraints for dumped tables -- -- -- Constraints for table `accepted_jobs` -- ALTER TABLE `accepted_jobs` ADD CONSTRAINT `accepted_jobs_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`); -- -- Constraints for table `admin` -- ALTER TABLE `admin` ADD CONSTRAINT `admin_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `customer` -- ALTER TABLE `customer` ADD CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `helpers` -- ALTER TABLE `helpers` ADD CONSTRAINT `helpers_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `jobs` -- ALTER TABLE `jobs` ADD CONSTRAINT `jobs_ibfk_1` FOREIGN KEY (`customer_user_id`) REFERENCES `customer` (`user_id`); -- -- Constraints for table `job_images` -- ALTER TABLE `job_images` ADD CONSTRAINT `job_images_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `users` -- ALTER TABLE `users` ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`profile_id`) REFERENCES `profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
INSERT IGNORE INTO category (description) VALUES ('North Indian'); INSERT IGNORE INTO category (description) VALUES ('South Indian'); INSERT IGNORE INTO category (description) VALUES ('East Indian'); INSERT IGNORE INTO category (description) VALUES ('West Indian'); INSERT IGNORE INTO category (description) VALUES ('American Dish'); INSERT IGNORE INTO category (description) VALUES ('Mexican Dish'); INSERT IGNORE INTO unit_of_measure (description) VALUES (''); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Small'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Medium'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Large'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Ripe'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Pint'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Cup'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Cups'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Clove'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Teaspoon'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Tablespoon'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Pinch'); INSERT IGNORE INTO unit_of_measure (description) VALUES ('Ounce');
-- 1.6 between operator use sql_store; select * from customers where points between 1000 and 3000; -- exercise select * from customers where birth_date between '1990-1-1' and '2000-1-1';
SELECT PeakName,RiverName,LOWER(CONCAT(left(PeakName,LEN(PeakName)-1),RiverName)) AS Mix from Peaks, Rivers WHERE RIGHT(PeakName,1)=LEFT(RiverName,1) ORDER BY Mix
<gh_stars>10-100 -- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: salesforce; Type: SCHEMA; Schema: -; Owner: - -- CREATE SCHEMA salesforce; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; SET search_path = public, pg_catalog; -- -- Name: get_xmlbinary(); Type: FUNCTION; Schema: public; Owner: - -- CREATE FUNCTION get_xmlbinary() RETURNS character varying LANGUAGE plpgsql AS $$ BEGIN RETURN 'heroku-connect'; END; $$; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: friendly_id_slugs; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE friendly_id_slugs ( id integer NOT NULL, slug character varying NOT NULL, sluggable_id integer NOT NULL, sluggable_type character varying(50), scope character varying, created_at timestamp without time zone, deleted_at timestamp without time zone ); -- -- Name: friendly_id_slugs_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE friendly_id_slugs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: friendly_id_slugs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE friendly_id_slugs_id_seq OWNED BY friendly_id_slugs.id; -- -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE schema_migrations ( version character varying NOT NULL ); -- -- Name: spree_addresses; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_addresses ( id integer NOT NULL, firstname character varying, lastname character varying, address1 character varying, address2 character varying, city character varying, zipcode character varying, phone character varying, state_name character varying, alternative_phone character varying, company character varying, state_id integer, country_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_addresses_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_addresses_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_addresses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_addresses_id_seq OWNED BY spree_addresses.id; -- -- Name: spree_adjustments; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_adjustments ( id integer NOT NULL, source_id integer, source_type character varying, adjustable_id integer, adjustable_type character varying, amount numeric(10,2), label character varying, mandatory boolean, eligible boolean DEFAULT true, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, state character varying, order_id integer NOT NULL, included boolean DEFAULT false ); -- -- Name: spree_adjustments_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_adjustments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_adjustments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_adjustments_id_seq OWNED BY spree_adjustments.id; -- -- Name: spree_assets; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_assets ( id integer NOT NULL, viewable_id integer, viewable_type character varying, attachment_width integer, attachment_height integer, attachment_file_size integer, "position" integer, attachment_content_type character varying, attachment_file_name character varying, type character varying(75), attachment_updated_at timestamp without time zone, alt text, created_at timestamp without time zone, updated_at timestamp without time zone ); -- -- Name: spree_assets_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_assets_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_assets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_assets_id_seq OWNED BY spree_assets.id; -- -- Name: spree_calculators; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_calculators ( id integer NOT NULL, type character varying, calculable_id integer, calculable_type character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, preferences text, deleted_at timestamp without time zone ); -- -- Name: spree_calculators_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_calculators_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_calculators_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_calculators_id_seq OWNED BY spree_calculators.id; -- -- Name: spree_countries; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_countries ( id integer NOT NULL, iso_name character varying, iso character varying, iso3 character varying, name character varying, numcode integer, states_required boolean DEFAULT false, updated_at timestamp without time zone ); -- -- Name: spree_countries_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_countries_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_countries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_countries_id_seq OWNED BY spree_countries.id; -- -- Name: spree_credit_cards; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_credit_cards ( id integer NOT NULL, month character varying, year character varying, cc_type character varying, last_digits character varying, address_id integer, gateway_customer_profile_id character varying, gateway_payment_profile_id character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, name character varying, user_id integer, payment_method_id integer, "default" boolean DEFAULT false NOT NULL ); -- -- Name: spree_credit_cards_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_credit_cards_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_credit_cards_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_credit_cards_id_seq OWNED BY spree_credit_cards.id; -- -- Name: spree_customer_returns; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_customer_returns ( id integer NOT NULL, number character varying, stock_location_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_customer_returns_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_customer_returns_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_customer_returns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_customer_returns_id_seq OWNED BY spree_customer_returns.id; -- -- Name: spree_gateways; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_gateways ( id integer NOT NULL, type character varying, name character varying, description text, active boolean DEFAULT true, environment character varying DEFAULT 'development'::character varying, server character varying DEFAULT 'test'::character varying, test_mode boolean DEFAULT true, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, preferences text ); -- -- Name: spree_gateways_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_gateways_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_gateways_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_gateways_id_seq OWNED BY spree_gateways.id; -- -- Name: spree_inventory_units; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_inventory_units ( id integer NOT NULL, state character varying, variant_id integer, order_id integer, shipment_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, pending boolean DEFAULT true, line_item_id integer ); -- -- Name: spree_inventory_units_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_inventory_units_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_inventory_units_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_inventory_units_id_seq OWNED BY spree_inventory_units.id; -- -- Name: spree_line_items; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_line_items ( id integer NOT NULL, variant_id integer, order_id integer, quantity integer NOT NULL, price numeric(10,2) NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, currency character varying, cost_price numeric(10,2), tax_category_id integer, adjustment_total numeric(10,2) DEFAULT 0.0, additional_tax_total numeric(10,2) DEFAULT 0.0, promo_total numeric(10,2) DEFAULT 0.0, included_tax_total numeric(10,2) DEFAULT 0.0 NOT NULL, pre_tax_amount numeric(12,4) DEFAULT 0.0 NOT NULL ); -- -- Name: spree_line_items_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_line_items_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_line_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_line_items_id_seq OWNED BY spree_line_items.id; -- -- Name: spree_log_entries; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_log_entries ( id integer NOT NULL, source_id integer, source_type character varying, details text, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_log_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_log_entries_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_log_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_log_entries_id_seq OWNED BY spree_log_entries.id; -- -- Name: spree_option_types; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_option_types ( id integer NOT NULL, name character varying(100), presentation character varying(100), "position" integer DEFAULT 0 NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_option_types_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_option_types_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_option_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_option_types_id_seq OWNED BY spree_option_types.id; -- -- Name: spree_option_types_prototypes; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_option_types_prototypes ( prototype_id integer, option_type_id integer ); -- -- Name: spree_option_values; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_option_values ( id integer NOT NULL, "position" integer, name character varying, presentation character varying, option_type_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_option_values_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_option_values_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_option_values_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_option_values_id_seq OWNED BY spree_option_values.id; -- -- Name: spree_option_values_variants; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_option_values_variants ( variant_id integer, option_value_id integer ); -- -- Name: spree_orders; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_orders ( id integer NOT NULL, number character varying(32), item_total numeric(10,2) DEFAULT 0.0 NOT NULL, total numeric(10,2) DEFAULT 0.0 NOT NULL, state character varying, adjustment_total numeric(10,2) DEFAULT 0.0 NOT NULL, user_id integer, completed_at timestamp without time zone, bill_address_id integer, ship_address_id integer, payment_total numeric(10,2) DEFAULT 0.0, shipping_method_id integer, shipment_state character varying, payment_state character varying, email character varying, special_instructions text, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, currency character varying, last_ip_address character varying, created_by_id integer, shipment_total numeric(10,2) DEFAULT 0.0 NOT NULL, additional_tax_total numeric(10,2) DEFAULT 0.0, promo_total numeric(10,2) DEFAULT 0.0, channel character varying DEFAULT 'spree'::character varying, included_tax_total numeric(10,2) DEFAULT 0.0 NOT NULL, item_count integer DEFAULT 0, approver_id integer, approved_at timestamp without time zone, confirmation_delivered boolean DEFAULT false, considered_risky boolean DEFAULT false, guest_token character varying, canceled_at timestamp without time zone, canceler_id integer, store_id integer, state_lock_version integer DEFAULT 0 NOT NULL ); -- -- Name: spree_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_orders_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_orders_id_seq OWNED BY spree_orders.id; -- -- Name: spree_orders_promotions; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_orders_promotions ( order_id integer, promotion_id integer ); -- -- Name: spree_payment_capture_events; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_payment_capture_events ( id integer NOT NULL, amount numeric(10,2) DEFAULT 0.0, payment_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_payment_capture_events_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_payment_capture_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_payment_capture_events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_payment_capture_events_id_seq OWNED BY spree_payment_capture_events.id; -- -- Name: spree_payment_methods; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_payment_methods ( id integer NOT NULL, type character varying, name character varying, description text, active boolean DEFAULT true, deleted_at timestamp without time zone, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, display_on character varying, auto_capture boolean, preferences text ); -- -- Name: spree_payment_methods_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_payment_methods_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_payment_methods_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_payment_methods_id_seq OWNED BY spree_payment_methods.id; -- -- Name: spree_payments; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_payments ( id integer NOT NULL, amount numeric(10,2) DEFAULT 0.0 NOT NULL, order_id integer, source_id integer, source_type character varying, payment_method_id integer, state character varying, response_code character varying, avs_response character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, number character varying, cvv_response_code character varying, cvv_response_message character varying ); -- -- Name: spree_payments_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_payments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_payments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_payments_id_seq OWNED BY spree_payments.id; -- -- Name: spree_preferences; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_preferences ( id integer NOT NULL, value text, key character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_preferences_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_preferences_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_preferences_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_preferences_id_seq OWNED BY spree_preferences.id; -- -- Name: spree_prices; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_prices ( id integer NOT NULL, variant_id integer NOT NULL, amount numeric(10,2), currency character varying, deleted_at timestamp without time zone ); -- -- Name: spree_prices_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_prices_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_prices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_prices_id_seq OWNED BY spree_prices.id; -- -- Name: spree_product_option_types; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_product_option_types ( id integer NOT NULL, "position" integer, product_id integer, option_type_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_product_option_types_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_product_option_types_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_product_option_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_product_option_types_id_seq OWNED BY spree_product_option_types.id; -- -- Name: spree_product_properties; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_product_properties ( id integer NOT NULL, value character varying, product_id integer, property_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, "position" integer DEFAULT 0 ); -- -- Name: spree_product_properties_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_product_properties_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_product_properties_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_product_properties_id_seq OWNED BY spree_product_properties.id; -- -- Name: spree_products; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_products ( id integer NOT NULL, name character varying DEFAULT ''::character varying NOT NULL, description text, available_on timestamp without time zone, deleted_at timestamp without time zone, slug character varying, meta_description text, meta_keywords character varying, tax_category_id integer, shipping_category_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, promotionable boolean DEFAULT true, meta_title character varying ); -- -- Name: spree_products_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_products_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_products_id_seq OWNED BY spree_products.id; -- -- Name: spree_products_promotion_rules; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_products_promotion_rules ( product_id integer, promotion_rule_id integer ); -- -- Name: spree_products_taxons; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_products_taxons ( product_id integer, taxon_id integer, id integer NOT NULL, "position" integer ); -- -- Name: spree_products_taxons_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_products_taxons_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_products_taxons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_products_taxons_id_seq OWNED BY spree_products_taxons.id; -- -- Name: spree_promotion_action_line_items; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_promotion_action_line_items ( id integer NOT NULL, promotion_action_id integer, variant_id integer, quantity integer DEFAULT 1 ); -- -- Name: spree_promotion_action_line_items_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_promotion_action_line_items_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_promotion_action_line_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_promotion_action_line_items_id_seq OWNED BY spree_promotion_action_line_items.id; -- -- Name: spree_promotion_actions; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_promotion_actions ( id integer NOT NULL, promotion_id integer, "position" integer, type character varying, deleted_at timestamp without time zone ); -- -- Name: spree_promotion_actions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_promotion_actions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_promotion_actions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_promotion_actions_id_seq OWNED BY spree_promotion_actions.id; -- -- Name: spree_promotion_categories; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_promotion_categories ( id integer NOT NULL, name character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, code character varying ); -- -- Name: spree_promotion_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_promotion_categories_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_promotion_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_promotion_categories_id_seq OWNED BY spree_promotion_categories.id; -- -- Name: spree_promotion_rules; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_promotion_rules ( id integer NOT NULL, promotion_id integer, user_id integer, product_group_id integer, type character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, code character varying, preferences text ); -- -- Name: spree_promotion_rules_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_promotion_rules_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_promotion_rules_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_promotion_rules_id_seq OWNED BY spree_promotion_rules.id; -- -- Name: spree_promotion_rules_users; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_promotion_rules_users ( user_id integer, promotion_rule_id integer ); -- -- Name: spree_promotions; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_promotions ( id integer NOT NULL, description character varying, expires_at timestamp without time zone, starts_at timestamp without time zone, name character varying, type character varying, usage_limit integer, match_policy character varying DEFAULT 'all'::character varying, code character varying, advertise boolean DEFAULT false, path character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, promotion_category_id integer ); -- -- Name: spree_promotions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_promotions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_promotions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_promotions_id_seq OWNED BY spree_promotions.id; -- -- Name: spree_properties; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_properties ( id integer NOT NULL, name character varying, presentation character varying NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_properties_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_properties_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_properties_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_properties_id_seq OWNED BY spree_properties.id; -- -- Name: spree_properties_prototypes; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_properties_prototypes ( prototype_id integer, property_id integer ); -- -- Name: spree_prototypes; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_prototypes ( id integer NOT NULL, name character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_prototypes_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_prototypes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_prototypes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_prototypes_id_seq OWNED BY spree_prototypes.id; -- -- Name: spree_refund_reasons; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_refund_reasons ( id integer NOT NULL, name character varying, active boolean DEFAULT true, mutable boolean DEFAULT true, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_refund_reasons_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_refund_reasons_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_refund_reasons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_refund_reasons_id_seq OWNED BY spree_refund_reasons.id; -- -- Name: spree_refunds; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_refunds ( id integer NOT NULL, payment_id integer, amount numeric(10,2) DEFAULT 0.0 NOT NULL, transaction_id character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, refund_reason_id integer, reimbursement_id integer ); -- -- Name: spree_refunds_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_refunds_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_refunds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_refunds_id_seq OWNED BY spree_refunds.id; -- -- Name: spree_reimbursement_credits; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_reimbursement_credits ( id integer NOT NULL, amount numeric(10,2) DEFAULT 0.0 NOT NULL, reimbursement_id integer, creditable_id integer, creditable_type character varying ); -- -- Name: spree_reimbursement_credits_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_reimbursement_credits_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_reimbursement_credits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_reimbursement_credits_id_seq OWNED BY spree_reimbursement_credits.id; -- -- Name: spree_reimbursement_types; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_reimbursement_types ( id integer NOT NULL, name character varying, active boolean DEFAULT true, mutable boolean DEFAULT true, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, type character varying ); -- -- Name: spree_reimbursement_types_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_reimbursement_types_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_reimbursement_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_reimbursement_types_id_seq OWNED BY spree_reimbursement_types.id; -- -- Name: spree_reimbursements; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_reimbursements ( id integer NOT NULL, number character varying, reimbursement_status character varying, customer_return_id integer, order_id integer, total numeric(10,2), created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_reimbursements_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_reimbursements_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_reimbursements_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_reimbursements_id_seq OWNED BY spree_reimbursements.id; -- -- Name: spree_return_authorization_reasons; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_return_authorization_reasons ( id integer NOT NULL, name character varying, active boolean DEFAULT true, mutable boolean DEFAULT true, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_return_authorization_reasons_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_return_authorization_reasons_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_return_authorization_reasons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_return_authorization_reasons_id_seq OWNED BY spree_return_authorization_reasons.id; -- -- Name: spree_return_authorizations; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_return_authorizations ( id integer NOT NULL, number character varying, state character varying, order_id integer, memo text, created_at timestamp without time zone, updated_at timestamp without time zone, stock_location_id integer, return_authorization_reason_id integer ); -- -- Name: spree_return_authorizations_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_return_authorizations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_return_authorizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_return_authorizations_id_seq OWNED BY spree_return_authorizations.id; -- -- Name: spree_return_items; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_return_items ( id integer NOT NULL, return_authorization_id integer, inventory_unit_id integer, exchange_variant_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, pre_tax_amount numeric(12,4) DEFAULT 0.0 NOT NULL, included_tax_total numeric(12,4) DEFAULT 0.0 NOT NULL, additional_tax_total numeric(12,4) DEFAULT 0.0 NOT NULL, reception_status character varying, acceptance_status character varying, customer_return_id integer, reimbursement_id integer, exchange_inventory_unit_id integer, acceptance_status_errors text, preferred_reimbursement_type_id integer, override_reimbursement_type_id integer, resellable boolean DEFAULT true NOT NULL ); -- -- Name: spree_return_items_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_return_items_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_return_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_return_items_id_seq OWNED BY spree_return_items.id; -- -- Name: spree_roles; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_roles ( id integer NOT NULL, name character varying ); -- -- Name: spree_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_roles_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_roles_id_seq OWNED BY spree_roles.id; -- -- Name: spree_roles_users; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_roles_users ( role_id integer, user_id integer ); -- -- Name: spree_shipments; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_shipments ( id integer NOT NULL, tracking character varying, number character varying, cost numeric(10,2) DEFAULT 0.0, shipped_at timestamp without time zone, order_id integer, address_id integer, state character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, stock_location_id integer, adjustment_total numeric(10,2) DEFAULT 0.0, additional_tax_total numeric(10,2) DEFAULT 0.0, promo_total numeric(10,2) DEFAULT 0.0, included_tax_total numeric(10,2) DEFAULT 0.0 NOT NULL, pre_tax_amount numeric(12,4) DEFAULT 0.0 NOT NULL ); -- -- Name: spree_shipments_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_shipments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_shipments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_shipments_id_seq OWNED BY spree_shipments.id; -- -- Name: spree_shipping_categories; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_shipping_categories ( id integer NOT NULL, name character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_shipping_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_shipping_categories_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_shipping_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_shipping_categories_id_seq OWNED BY spree_shipping_categories.id; -- -- Name: spree_shipping_method_categories; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_shipping_method_categories ( id integer NOT NULL, shipping_method_id integer NOT NULL, shipping_category_id integer NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_shipping_method_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_shipping_method_categories_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_shipping_method_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_shipping_method_categories_id_seq OWNED BY spree_shipping_method_categories.id; -- -- Name: spree_shipping_methods; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_shipping_methods ( id integer NOT NULL, name character varying, display_on character varying, deleted_at timestamp without time zone, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, tracking_url character varying, admin_name character varying, tax_category_id integer, code character varying ); -- -- Name: spree_shipping_methods_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_shipping_methods_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_shipping_methods_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_shipping_methods_id_seq OWNED BY spree_shipping_methods.id; -- -- Name: spree_shipping_methods_zones; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_shipping_methods_zones ( shipping_method_id integer, zone_id integer ); -- -- Name: spree_shipping_rates; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_shipping_rates ( id integer NOT NULL, shipment_id integer, shipping_method_id integer, selected boolean DEFAULT false, cost numeric(8,2) DEFAULT 0, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, tax_rate_id integer ); -- -- Name: spree_shipping_rates_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_shipping_rates_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_shipping_rates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_shipping_rates_id_seq OWNED BY spree_shipping_rates.id; -- -- Name: spree_skrill_transactions; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_skrill_transactions ( id integer NOT NULL, email character varying, amount double precision, currency character varying, transaction_id integer, customer_id integer, payment_type character varying, created_at timestamp without time zone, updated_at timestamp without time zone ); -- -- Name: spree_skrill_transactions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_skrill_transactions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_skrill_transactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_skrill_transactions_id_seq OWNED BY spree_skrill_transactions.id; -- -- Name: spree_state_changes; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_state_changes ( id integer NOT NULL, name character varying, previous_state character varying, stateful_id integer, user_id integer, stateful_type character varying, next_state character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_state_changes_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_state_changes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_state_changes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_state_changes_id_seq OWNED BY spree_state_changes.id; -- -- Name: spree_states; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_states ( id integer NOT NULL, name character varying, abbr character varying, country_id integer, updated_at timestamp without time zone ); -- -- Name: spree_states_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_states_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_states_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_states_id_seq OWNED BY spree_states.id; -- -- Name: spree_stock_items; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_stock_items ( id integer NOT NULL, stock_location_id integer, variant_id integer, count_on_hand integer DEFAULT 0 NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, backorderable boolean DEFAULT false, deleted_at timestamp without time zone ); -- -- Name: spree_stock_items_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_stock_items_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_stock_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_stock_items_id_seq OWNED BY spree_stock_items.id; -- -- Name: spree_stock_locations; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_stock_locations ( id integer NOT NULL, name character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, "default" boolean DEFAULT false NOT NULL, address1 character varying, address2 character varying, city character varying, state_id integer, state_name character varying, country_id integer, zipcode character varying, phone character varying, active boolean DEFAULT true, backorderable_default boolean DEFAULT false, propagate_all_variants boolean DEFAULT true, admin_name character varying ); -- -- Name: spree_stock_locations_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_stock_locations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_stock_locations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_stock_locations_id_seq OWNED BY spree_stock_locations.id; -- -- Name: spree_stock_movements; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_stock_movements ( id integer NOT NULL, stock_item_id integer, quantity integer DEFAULT 0, action character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, originator_id integer, originator_type character varying ); -- -- Name: spree_stock_movements_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_stock_movements_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_stock_movements_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_stock_movements_id_seq OWNED BY spree_stock_movements.id; -- -- Name: spree_stock_transfers; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_stock_transfers ( id integer NOT NULL, type character varying, reference character varying, source_location_id integer, destination_location_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, number character varying ); -- -- Name: spree_stock_transfers_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_stock_transfers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_stock_transfers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_stock_transfers_id_seq OWNED BY spree_stock_transfers.id; -- -- Name: spree_stores; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_stores ( id integer NOT NULL, name character varying, url character varying, meta_description text, meta_keywords text, seo_title character varying, mail_from_address character varying, default_currency character varying, code character varying, "default" boolean DEFAULT false NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_stores_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_stores_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_stores_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_stores_id_seq OWNED BY spree_stores.id; -- -- Name: spree_tax_categories; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_tax_categories ( id integer NOT NULL, name character varying, description character varying, is_default boolean DEFAULT false, deleted_at timestamp without time zone, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, tax_code character varying ); -- -- Name: spree_tax_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_tax_categories_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_tax_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_tax_categories_id_seq OWNED BY spree_tax_categories.id; -- -- Name: spree_tax_rates; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_tax_rates ( id integer NOT NULL, amount numeric(8,5), zone_id integer, tax_category_id integer, included_in_price boolean DEFAULT false, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, name character varying, show_rate_in_label boolean DEFAULT true, deleted_at timestamp without time zone ); -- -- Name: spree_tax_rates_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_tax_rates_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_tax_rates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_tax_rates_id_seq OWNED BY spree_tax_rates.id; -- -- Name: spree_taxonomies; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_taxonomies ( id integer NOT NULL, name character varying NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, "position" integer DEFAULT 0 ); -- -- Name: spree_taxonomies_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_taxonomies_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_taxonomies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_taxonomies_id_seq OWNED BY spree_taxonomies.id; -- -- Name: spree_taxons; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_taxons ( id integer NOT NULL, parent_id integer, "position" integer DEFAULT 0, name character varying NOT NULL, permalink character varying, taxonomy_id integer, lft integer, rgt integer, icon_file_name character varying, icon_content_type character varying, icon_file_size integer, icon_updated_at timestamp without time zone, description text, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, meta_title character varying, meta_description character varying, meta_keywords character varying, depth integer, hero_file_name character varying, hero_content_type character varying, hero_file_size integer, hero_updated_at timestamp without time zone, group_file_name character varying, group_content_type character varying, group_file_size integer, group_updated_at timestamp without time zone, style_file_name character varying, style_content_type character varying, style_file_size integer, style_updated_at timestamp without time zone ); -- -- Name: spree_taxons_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_taxons_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_taxons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_taxons_id_seq OWNED BY spree_taxons.id; -- -- Name: spree_taxons_promotion_rules; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_taxons_promotion_rules ( id integer NOT NULL, taxon_id integer, promotion_rule_id integer ); -- -- Name: spree_taxons_promotion_rules_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_taxons_promotion_rules_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_taxons_promotion_rules_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_taxons_promotion_rules_id_seq OWNED BY spree_taxons_promotion_rules.id; -- -- Name: spree_taxons_prototypes; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_taxons_prototypes ( id integer NOT NULL, taxon_id integer, prototype_id integer ); -- -- Name: spree_taxons_prototypes_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_taxons_prototypes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_taxons_prototypes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_taxons_prototypes_id_seq OWNED BY spree_taxons_prototypes.id; -- -- Name: spree_trackers; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_trackers ( id integer NOT NULL, analytics_id character varying, active boolean DEFAULT true, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_trackers_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_trackers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_trackers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_trackers_id_seq OWNED BY spree_trackers.id; -- -- Name: spree_users; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_users ( id integer NOT NULL, encrypted_password character varying(128), password_salt character varying(128), email character varying, remember_token character varying, persistence_token character varying, reset_password_token character varying, perishable_token character varying, sign_in_count integer DEFAULT 0 NOT NULL, failed_attempts integer DEFAULT 0 NOT NULL, last_request_at timestamp without time zone, current_sign_in_at timestamp without time zone, last_sign_in_at timestamp without time zone, current_sign_in_ip character varying, last_sign_in_ip character varying, login character varying, ship_address_id integer, bill_address_id integer, authentication_token character varying, unlock_token character varying, locked_at timestamp without time zone, reset_password_sent_at timestamp without time zone, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, spree_api_key character varying(48), remember_created_at timestamp without time zone, deleted_at timestamp without time zone, confirmation_token character varying, confirmed_at timestamp without time zone, confirmation_sent_at timestamp without time zone ); -- -- Name: spree_users_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_users_id_seq OWNED BY spree_users.id; -- -- Name: spree_variants; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_variants ( id integer NOT NULL, sku character varying DEFAULT ''::character varying NOT NULL, weight numeric(8,2) DEFAULT 0.0, height numeric(8,2), width numeric(8,2), depth numeric(8,2), deleted_at timestamp without time zone, is_master boolean DEFAULT false, product_id integer, cost_price numeric(10,2), "position" integer, cost_currency character varying, track_inventory boolean DEFAULT true, tax_category_id integer, updated_at timestamp without time zone, stock_items_count integer DEFAULT 0 NOT NULL ); -- -- Name: spree_variants_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_variants_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_variants_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_variants_id_seq OWNED BY spree_variants.id; -- -- Name: spree_zone_members; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_zone_members ( id integer NOT NULL, zoneable_id integer, zoneable_type character varying, zone_id integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); -- -- Name: spree_zone_members_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_zone_members_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_zone_members_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_zone_members_id_seq OWNED BY spree_zone_members.id; -- -- Name: spree_zones; Type: TABLE; Schema: public; Owner: -; Tablespace: -- CREATE TABLE spree_zones ( id integer NOT NULL, name character varying, description character varying, default_tax boolean DEFAULT false, zone_members_count integer DEFAULT 0, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, kind character varying ); -- -- Name: spree_zones_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- CREATE SEQUENCE spree_zones_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: spree_zones_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- ALTER SEQUENCE spree_zones_id_seq OWNED BY spree_zones.id; SET search_path = salesforce, pg_catalog; -- -- Name: contact; Type: TABLE; Schema: salesforce; Owner: -; Tablespace: -- CREATE TABLE contact ( id integer NOT NULL, mailingstreet character varying(255), mailingcity character varying(40), mailingstate character varying(80), mailingcountry character varying(80), mailingpostalcode character varying(20), firstname character varying(40), lastname character varying(80), email character varying(80), phone character varying(40), sfid character varying(18), spree_email__c character varying(80) ); -- -- Name: contact_id_seq; Type: SEQUENCE; Schema: salesforce; Owner: - -- CREATE SEQUENCE contact_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: contact_id_seq; Type: SEQUENCE OWNED BY; Schema: salesforce; Owner: - -- ALTER SEQUENCE contact_id_seq OWNED BY contact.id; -- -- Name: lineitem__c; Type: TABLE; Schema: salesforce; Owner: -; Tablespace: -- CREATE TABLE lineitem__c ( id integer NOT NULL, sfid character varying(18), name character varying(80), price_unit__c double precision, product_id__c character varying(18), product_id__r__spree_id__c character varying(14), order_id__c character varying(18), order_id__r__spree_id__c character varying(14), spree_id__c character varying(14), price_total__c double precision, quantity__c double precision ); -- -- Name: lineitem__c_id_seq; Type: SEQUENCE; Schema: salesforce; Owner: - -- CREATE SEQUENCE lineitem__c_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: lineitem__c_id_seq; Type: SEQUENCE OWNED BY; Schema: salesforce; Owner: - -- ALTER SEQUENCE lineitem__c_id_seq OWNED BY lineitem__c.id; -- -- Name: order__c; Type: TABLE; Schema: salesforce; Owner: -; Tablespace: -- CREATE TABLE order__c ( id integer NOT NULL, sfid character varying(18), name character varying(80), total__c double precision, contact__c character varying(18), spree_id__c character varying(14), contact__r__spree_email__c character varying(80), state__c character varying(40) ); -- -- Name: order__c_id_seq; Type: SEQUENCE; Schema: salesforce; Owner: - -- CREATE SEQUENCE order__c_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: order__c_id_seq; Type: SEQUENCE OWNED BY; Schema: salesforce; Owner: - -- ALTER SEQUENCE order__c_id_seq OWNED BY order__c.id; -- -- Name: pricebook2; Type: TABLE; Schema: salesforce; Owner: -; Tablespace: -- CREATE TABLE pricebook2 ( id integer NOT NULL, sfid character varying(18), name character varying(255), isactive boolean, isstandard boolean ); -- -- Name: pricebook2_id_seq; Type: SEQUENCE; Schema: salesforce; Owner: - -- CREATE SEQUENCE pricebook2_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: pricebook2_id_seq; Type: SEQUENCE OWNED BY; Schema: salesforce; Owner: - -- ALTER SEQUENCE pricebook2_id_seq OWNED BY pricebook2.id; -- -- Name: pricebookentry; Type: TABLE; Schema: salesforce; Owner: -; Tablespace: -- CREATE TABLE pricebookentry ( id integer NOT NULL, sfid character varying(18), pricebook2id character varying(18), product2__spree_id__c character varying(14), name character varying(255), unitprice double precision ); -- -- Name: pricebookentry_id_seq; Type: SEQUENCE; Schema: salesforce; Owner: - -- CREATE SEQUENCE pricebookentry_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: pricebookentry_id_seq; Type: SEQUENCE OWNED BY; Schema: salesforce; Owner: - -- ALTER SEQUENCE pricebookentry_id_seq OWNED BY pricebookentry.id; -- -- Name: product2; Type: TABLE; Schema: salesforce; Owner: -; Tablespace: -- CREATE TABLE product2 ( id integer NOT NULL, productcode character varying(255), name character varying(255), spree_id__c character varying(14), description character varying(4000) ); -- -- Name: product2_id_seq; Type: SEQUENCE; Schema: salesforce; Owner: - -- CREATE SEQUENCE product2_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: product2_id_seq; Type: SEQUENCE OWNED BY; Schema: salesforce; Owner: - -- ALTER SEQUENCE product2_id_seq OWNED BY product2.id; SET search_path = public, pg_catalog; -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY friendly_id_slugs ALTER COLUMN id SET DEFAULT nextval('friendly_id_slugs_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_addresses ALTER COLUMN id SET DEFAULT nextval('spree_addresses_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_adjustments ALTER COLUMN id SET DEFAULT nextval('spree_adjustments_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_assets ALTER COLUMN id SET DEFAULT nextval('spree_assets_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_calculators ALTER COLUMN id SET DEFAULT nextval('spree_calculators_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_countries ALTER COLUMN id SET DEFAULT nextval('spree_countries_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_credit_cards ALTER COLUMN id SET DEFAULT nextval('spree_credit_cards_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_customer_returns ALTER COLUMN id SET DEFAULT nextval('spree_customer_returns_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_gateways ALTER COLUMN id SET DEFAULT nextval('spree_gateways_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_inventory_units ALTER COLUMN id SET DEFAULT nextval('spree_inventory_units_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_line_items ALTER COLUMN id SET DEFAULT nextval('spree_line_items_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_log_entries ALTER COLUMN id SET DEFAULT nextval('spree_log_entries_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_option_types ALTER COLUMN id SET DEFAULT nextval('spree_option_types_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_option_values ALTER COLUMN id SET DEFAULT nextval('spree_option_values_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_orders ALTER COLUMN id SET DEFAULT nextval('spree_orders_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_payment_capture_events ALTER COLUMN id SET DEFAULT nextval('spree_payment_capture_events_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_payment_methods ALTER COLUMN id SET DEFAULT nextval('spree_payment_methods_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_payments ALTER COLUMN id SET DEFAULT nextval('spree_payments_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_preferences ALTER COLUMN id SET DEFAULT nextval('spree_preferences_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_prices ALTER COLUMN id SET DEFAULT nextval('spree_prices_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_product_option_types ALTER COLUMN id SET DEFAULT nextval('spree_product_option_types_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_product_properties ALTER COLUMN id SET DEFAULT nextval('spree_product_properties_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_products ALTER COLUMN id SET DEFAULT nextval('spree_products_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_products_taxons ALTER COLUMN id SET DEFAULT nextval('spree_products_taxons_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_promotion_action_line_items ALTER COLUMN id SET DEFAULT nextval('spree_promotion_action_line_items_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_promotion_actions ALTER COLUMN id SET DEFAULT nextval('spree_promotion_actions_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_promotion_categories ALTER COLUMN id SET DEFAULT nextval('spree_promotion_categories_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_promotion_rules ALTER COLUMN id SET DEFAULT nextval('spree_promotion_rules_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_promotions ALTER COLUMN id SET DEFAULT nextval('spree_promotions_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_properties ALTER COLUMN id SET DEFAULT nextval('spree_properties_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_prototypes ALTER COLUMN id SET DEFAULT nextval('spree_prototypes_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_refund_reasons ALTER COLUMN id SET DEFAULT nextval('spree_refund_reasons_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_refunds ALTER COLUMN id SET DEFAULT nextval('spree_refunds_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_reimbursement_credits ALTER COLUMN id SET DEFAULT nextval('spree_reimbursement_credits_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_reimbursement_types ALTER COLUMN id SET DEFAULT nextval('spree_reimbursement_types_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_reimbursements ALTER COLUMN id SET DEFAULT nextval('spree_reimbursements_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_return_authorization_reasons ALTER COLUMN id SET DEFAULT nextval('spree_return_authorization_reasons_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_return_authorizations ALTER COLUMN id SET DEFAULT nextval('spree_return_authorizations_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_return_items ALTER COLUMN id SET DEFAULT nextval('spree_return_items_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_roles ALTER COLUMN id SET DEFAULT nextval('spree_roles_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_shipments ALTER COLUMN id SET DEFAULT nextval('spree_shipments_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_shipping_categories ALTER COLUMN id SET DEFAULT nextval('spree_shipping_categories_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_shipping_method_categories ALTER COLUMN id SET DEFAULT nextval('spree_shipping_method_categories_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_shipping_methods ALTER COLUMN id SET DEFAULT nextval('spree_shipping_methods_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_shipping_rates ALTER COLUMN id SET DEFAULT nextval('spree_shipping_rates_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_skrill_transactions ALTER COLUMN id SET DEFAULT nextval('spree_skrill_transactions_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_state_changes ALTER COLUMN id SET DEFAULT nextval('spree_state_changes_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_states ALTER COLUMN id SET DEFAULT nextval('spree_states_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_stock_items ALTER COLUMN id SET DEFAULT nextval('spree_stock_items_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_stock_locations ALTER COLUMN id SET DEFAULT nextval('spree_stock_locations_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_stock_movements ALTER COLUMN id SET DEFAULT nextval('spree_stock_movements_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_stock_transfers ALTER COLUMN id SET DEFAULT nextval('spree_stock_transfers_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_stores ALTER COLUMN id SET DEFAULT nextval('spree_stores_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_tax_categories ALTER COLUMN id SET DEFAULT nextval('spree_tax_categories_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_tax_rates ALTER COLUMN id SET DEFAULT nextval('spree_tax_rates_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_taxonomies ALTER COLUMN id SET DEFAULT nextval('spree_taxonomies_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_taxons ALTER COLUMN id SET DEFAULT nextval('spree_taxons_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_taxons_promotion_rules ALTER COLUMN id SET DEFAULT nextval('spree_taxons_promotion_rules_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_taxons_prototypes ALTER COLUMN id SET DEFAULT nextval('spree_taxons_prototypes_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_trackers ALTER COLUMN id SET DEFAULT nextval('spree_trackers_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_users ALTER COLUMN id SET DEFAULT nextval('spree_users_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_variants ALTER COLUMN id SET DEFAULT nextval('spree_variants_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_zone_members ALTER COLUMN id SET DEFAULT nextval('spree_zone_members_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY spree_zones ALTER COLUMN id SET DEFAULT nextval('spree_zones_id_seq'::regclass); SET search_path = salesforce, pg_catalog; -- -- Name: id; Type: DEFAULT; Schema: salesforce; Owner: - -- ALTER TABLE ONLY contact ALTER COLUMN id SET DEFAULT nextval('contact_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: salesforce; Owner: - -- ALTER TABLE ONLY lineitem__c ALTER COLUMN id SET DEFAULT nextval('lineitem__c_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: salesforce; Owner: - -- ALTER TABLE ONLY order__c ALTER COLUMN id SET DEFAULT nextval('order__c_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: salesforce; Owner: - -- ALTER TABLE ONLY pricebook2 ALTER COLUMN id SET DEFAULT nextval('pricebook2_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: salesforce; Owner: - -- ALTER TABLE ONLY pricebookentry ALTER COLUMN id SET DEFAULT nextval('pricebookentry_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: salesforce; Owner: - -- ALTER TABLE ONLY product2 ALTER COLUMN id SET DEFAULT nextval('product2_id_seq'::regclass); SET search_path = public, pg_catalog; -- -- Name: friendly_id_slugs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY friendly_id_slugs ADD CONSTRAINT friendly_id_slugs_pkey PRIMARY KEY (id); -- -- Name: spree_addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_addresses ADD CONSTRAINT spree_addresses_pkey PRIMARY KEY (id); -- -- Name: spree_adjustments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_adjustments ADD CONSTRAINT spree_adjustments_pkey PRIMARY KEY (id); -- -- Name: spree_assets_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_assets ADD CONSTRAINT spree_assets_pkey PRIMARY KEY (id); -- -- Name: spree_calculators_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_calculators ADD CONSTRAINT spree_calculators_pkey PRIMARY KEY (id); -- -- Name: spree_countries_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_countries ADD CONSTRAINT spree_countries_pkey PRIMARY KEY (id); -- -- Name: spree_credit_cards_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_credit_cards ADD CONSTRAINT spree_credit_cards_pkey PRIMARY KEY (id); -- -- Name: spree_customer_returns_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_customer_returns ADD CONSTRAINT spree_customer_returns_pkey PRIMARY KEY (id); -- -- Name: spree_gateways_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_gateways ADD CONSTRAINT spree_gateways_pkey PRIMARY KEY (id); -- -- Name: spree_inventory_units_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_inventory_units ADD CONSTRAINT spree_inventory_units_pkey PRIMARY KEY (id); -- -- Name: spree_line_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_line_items ADD CONSTRAINT spree_line_items_pkey PRIMARY KEY (id); -- -- Name: spree_log_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_log_entries ADD CONSTRAINT spree_log_entries_pkey PRIMARY KEY (id); -- -- Name: spree_option_types_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_option_types ADD CONSTRAINT spree_option_types_pkey PRIMARY KEY (id); -- -- Name: spree_option_values_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_option_values ADD CONSTRAINT spree_option_values_pkey PRIMARY KEY (id); -- -- Name: spree_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_orders ADD CONSTRAINT spree_orders_pkey PRIMARY KEY (id); -- -- Name: spree_payment_capture_events_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_payment_capture_events ADD CONSTRAINT spree_payment_capture_events_pkey PRIMARY KEY (id); -- -- Name: spree_payment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_payment_methods ADD CONSTRAINT spree_payment_methods_pkey PRIMARY KEY (id); -- -- Name: spree_payments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_payments ADD CONSTRAINT spree_payments_pkey PRIMARY KEY (id); -- -- Name: spree_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_preferences ADD CONSTRAINT spree_preferences_pkey PRIMARY KEY (id); -- -- Name: spree_prices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_prices ADD CONSTRAINT spree_prices_pkey PRIMARY KEY (id); -- -- Name: spree_product_option_types_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_product_option_types ADD CONSTRAINT spree_product_option_types_pkey PRIMARY KEY (id); -- -- Name: spree_product_properties_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_product_properties ADD CONSTRAINT spree_product_properties_pkey PRIMARY KEY (id); -- -- Name: spree_products_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_products ADD CONSTRAINT spree_products_pkey PRIMARY KEY (id); -- -- Name: spree_products_taxons_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_products_taxons ADD CONSTRAINT spree_products_taxons_pkey PRIMARY KEY (id); -- -- Name: spree_promotion_action_line_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_promotion_action_line_items ADD CONSTRAINT spree_promotion_action_line_items_pkey PRIMARY KEY (id); -- -- Name: spree_promotion_actions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_promotion_actions ADD CONSTRAINT spree_promotion_actions_pkey PRIMARY KEY (id); -- -- Name: spree_promotion_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_promotion_categories ADD CONSTRAINT spree_promotion_categories_pkey PRIMARY KEY (id); -- -- Name: spree_promotion_rules_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_promotion_rules ADD CONSTRAINT spree_promotion_rules_pkey PRIMARY KEY (id); -- -- Name: spree_promotions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_promotions ADD CONSTRAINT spree_promotions_pkey PRIMARY KEY (id); -- -- Name: spree_properties_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_properties ADD CONSTRAINT spree_properties_pkey PRIMARY KEY (id); -- -- Name: spree_prototypes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_prototypes ADD CONSTRAINT spree_prototypes_pkey PRIMARY KEY (id); -- -- Name: spree_refund_reasons_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_refund_reasons ADD CONSTRAINT spree_refund_reasons_pkey PRIMARY KEY (id); -- -- Name: spree_refunds_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_refunds ADD CONSTRAINT spree_refunds_pkey PRIMARY KEY (id); -- -- Name: spree_reimbursement_credits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_reimbursement_credits ADD CONSTRAINT spree_reimbursement_credits_pkey PRIMARY KEY (id); -- -- Name: spree_reimbursement_types_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_reimbursement_types ADD CONSTRAINT spree_reimbursement_types_pkey PRIMARY KEY (id); -- -- Name: spree_reimbursements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_reimbursements ADD CONSTRAINT spree_reimbursements_pkey PRIMARY KEY (id); -- -- Name: spree_return_authorization_reasons_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_return_authorization_reasons ADD CONSTRAINT spree_return_authorization_reasons_pkey PRIMARY KEY (id); -- -- Name: spree_return_authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_return_authorizations ADD CONSTRAINT spree_return_authorizations_pkey PRIMARY KEY (id); -- -- Name: spree_return_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_return_items ADD CONSTRAINT spree_return_items_pkey PRIMARY KEY (id); -- -- Name: spree_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_roles ADD CONSTRAINT spree_roles_pkey PRIMARY KEY (id); -- -- Name: spree_shipments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_shipments ADD CONSTRAINT spree_shipments_pkey PRIMARY KEY (id); -- -- Name: spree_shipping_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_shipping_categories ADD CONSTRAINT spree_shipping_categories_pkey PRIMARY KEY (id); -- -- Name: spree_shipping_method_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_shipping_method_categories ADD CONSTRAINT spree_shipping_method_categories_pkey PRIMARY KEY (id); -- -- Name: spree_shipping_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_shipping_methods ADD CONSTRAINT spree_shipping_methods_pkey PRIMARY KEY (id); -- -- Name: spree_shipping_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_shipping_rates ADD CONSTRAINT spree_shipping_rates_pkey PRIMARY KEY (id); -- -- Name: spree_skrill_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_skrill_transactions ADD CONSTRAINT spree_skrill_transactions_pkey PRIMARY KEY (id); -- -- Name: spree_state_changes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_state_changes ADD CONSTRAINT spree_state_changes_pkey PRIMARY KEY (id); -- -- Name: spree_states_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_states ADD CONSTRAINT spree_states_pkey PRIMARY KEY (id); -- -- Name: spree_stock_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_stock_items ADD CONSTRAINT spree_stock_items_pkey PRIMARY KEY (id); -- -- Name: spree_stock_locations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_stock_locations ADD CONSTRAINT spree_stock_locations_pkey PRIMARY KEY (id); -- -- Name: spree_stock_movements_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_stock_movements ADD CONSTRAINT spree_stock_movements_pkey PRIMARY KEY (id); -- -- Name: spree_stock_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_stock_transfers ADD CONSTRAINT spree_stock_transfers_pkey PRIMARY KEY (id); -- -- Name: spree_stores_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_stores ADD CONSTRAINT spree_stores_pkey PRIMARY KEY (id); -- -- Name: spree_tax_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_tax_categories ADD CONSTRAINT spree_tax_categories_pkey PRIMARY KEY (id); -- -- Name: spree_tax_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_tax_rates ADD CONSTRAINT spree_tax_rates_pkey PRIMARY KEY (id); -- -- Name: spree_taxonomies_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_taxonomies ADD CONSTRAINT spree_taxonomies_pkey PRIMARY KEY (id); -- -- Name: spree_taxons_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_taxons ADD CONSTRAINT spree_taxons_pkey PRIMARY KEY (id); -- -- Name: spree_taxons_promotion_rules_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_taxons_promotion_rules ADD CONSTRAINT spree_taxons_promotion_rules_pkey PRIMARY KEY (id); -- -- Name: spree_taxons_prototypes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_taxons_prototypes ADD CONSTRAINT spree_taxons_prototypes_pkey PRIMARY KEY (id); -- -- Name: spree_trackers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_trackers ADD CONSTRAINT spree_trackers_pkey PRIMARY KEY (id); -- -- Name: spree_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_users ADD CONSTRAINT spree_users_pkey PRIMARY KEY (id); -- -- Name: spree_variants_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_variants ADD CONSTRAINT spree_variants_pkey PRIMARY KEY (id); -- -- Name: spree_zone_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_zone_members ADD CONSTRAINT spree_zone_members_pkey PRIMARY KEY (id); -- -- Name: spree_zones_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- ALTER TABLE ONLY spree_zones ADD CONSTRAINT spree_zones_pkey PRIMARY KEY (id); SET search_path = salesforce, pg_catalog; -- -- Name: contact_pkey; Type: CONSTRAINT; Schema: salesforce; Owner: -; Tablespace: -- ALTER TABLE ONLY contact ADD CONSTRAINT contact_pkey PRIMARY KEY (id); -- -- Name: lineitem__c_pkey; Type: CONSTRAINT; Schema: salesforce; Owner: -; Tablespace: -- ALTER TABLE ONLY lineitem__c ADD CONSTRAINT lineitem__c_pkey PRIMARY KEY (id); -- -- Name: order__c_pkey; Type: CONSTRAINT; Schema: salesforce; Owner: -; Tablespace: -- ALTER TABLE ONLY order__c ADD CONSTRAINT order__c_pkey PRIMARY KEY (id); -- -- Name: pricebook2_pkey; Type: CONSTRAINT; Schema: salesforce; Owner: -; Tablespace: -- ALTER TABLE ONLY pricebook2 ADD CONSTRAINT pricebook2_pkey PRIMARY KEY (id); -- -- Name: pricebookentry_pkey; Type: CONSTRAINT; Schema: salesforce; Owner: -; Tablespace: -- ALTER TABLE ONLY pricebookentry ADD CONSTRAINT pricebookentry_pkey PRIMARY KEY (id); -- -- Name: product2_pkey; Type: CONSTRAINT; Schema: salesforce; Owner: -; Tablespace: -- ALTER TABLE ONLY product2 ADD CONSTRAINT product2_pkey PRIMARY KEY (id); SET search_path = public, pg_catalog; -- -- Name: email_idx_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX email_idx_unique ON spree_users USING btree (email); -- -- Name: index_addresses_on_firstname; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_addresses_on_firstname ON spree_addresses USING btree (firstname); -- -- Name: index_addresses_on_lastname; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_addresses_on_lastname ON spree_addresses USING btree (lastname); -- -- Name: index_adjustments_on_order_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_adjustments_on_order_id ON spree_adjustments USING btree (adjustable_id); -- -- Name: index_assets_on_viewable_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_assets_on_viewable_id ON spree_assets USING btree (viewable_id); -- -- Name: index_assets_on_viewable_type_and_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_assets_on_viewable_type_and_type ON spree_assets USING btree (viewable_type, type); -- -- Name: index_friendly_id_slugs_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_friendly_id_slugs_on_deleted_at ON friendly_id_slugs USING btree (deleted_at); -- -- Name: index_friendly_id_slugs_on_slug_and_sluggable_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_friendly_id_slugs_on_slug_and_sluggable_type ON friendly_id_slugs USING btree (slug, sluggable_type); -- -- Name: index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope ON friendly_id_slugs USING btree (slug, sluggable_type, scope); -- -- Name: index_friendly_id_slugs_on_sluggable_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_friendly_id_slugs_on_sluggable_id ON friendly_id_slugs USING btree (sluggable_id); -- -- Name: index_friendly_id_slugs_on_sluggable_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_friendly_id_slugs_on_sluggable_type ON friendly_id_slugs USING btree (sluggable_type); -- -- Name: index_inventory_units_on_order_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_inventory_units_on_order_id ON spree_inventory_units USING btree (order_id); -- -- Name: index_inventory_units_on_shipment_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_inventory_units_on_shipment_id ON spree_inventory_units USING btree (shipment_id); -- -- Name: index_inventory_units_on_variant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_inventory_units_on_variant_id ON spree_inventory_units USING btree (variant_id); -- -- Name: index_option_values_variants_on_variant_id_and_option_value_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_option_values_variants_on_variant_id_and_option_value_id ON spree_option_values_variants USING btree (variant_id, option_value_id); -- -- Name: index_product_properties_on_product_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_product_properties_on_product_id ON spree_product_properties USING btree (product_id); -- -- Name: index_products_promotion_rules_on_product_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_products_promotion_rules_on_product_id ON spree_products_promotion_rules USING btree (product_id); -- -- Name: index_products_promotion_rules_on_promotion_rule_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_products_promotion_rules_on_promotion_rule_id ON spree_products_promotion_rules USING btree (promotion_rule_id); -- -- Name: index_promotion_rules_on_product_group_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_promotion_rules_on_product_group_id ON spree_promotion_rules USING btree (product_group_id); -- -- Name: index_promotion_rules_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_promotion_rules_on_user_id ON spree_promotion_rules USING btree (user_id); -- -- Name: index_promotion_rules_users_on_promotion_rule_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_promotion_rules_users_on_promotion_rule_id ON spree_promotion_rules_users USING btree (promotion_rule_id); -- -- Name: index_promotion_rules_users_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_promotion_rules_users_on_user_id ON spree_promotion_rules_users USING btree (user_id); -- -- Name: index_refunds_on_refund_reason_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_refunds_on_refund_reason_id ON spree_refunds USING btree (refund_reason_id); -- -- Name: index_return_authorizations_on_return_authorization_reason_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_return_authorizations_on_return_authorization_reason_id ON spree_return_authorizations USING btree (return_authorization_reason_id); -- -- Name: index_return_items_on_customer_return_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_return_items_on_customer_return_id ON spree_return_items USING btree (customer_return_id); -- -- Name: index_shipments_on_number; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_shipments_on_number ON spree_shipments USING btree (number); -- -- Name: index_spree_addresses_on_country_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_addresses_on_country_id ON spree_addresses USING btree (country_id); -- -- Name: index_spree_addresses_on_state_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_addresses_on_state_id ON spree_addresses USING btree (state_id); -- -- Name: index_spree_adjustments_on_adjustable_id_and_adjustable_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_adjustments_on_adjustable_id_and_adjustable_type ON spree_adjustments USING btree (adjustable_id, adjustable_type); -- -- Name: index_spree_adjustments_on_eligible; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_adjustments_on_eligible ON spree_adjustments USING btree (eligible); -- -- Name: index_spree_adjustments_on_order_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_adjustments_on_order_id ON spree_adjustments USING btree (order_id); -- -- Name: index_spree_adjustments_on_source_id_and_source_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_adjustments_on_source_id_and_source_type ON spree_adjustments USING btree (source_id, source_type); -- -- Name: index_spree_calculators_on_calculable_id_and_calculable_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_calculators_on_calculable_id_and_calculable_type ON spree_calculators USING btree (calculable_id, calculable_type); -- -- Name: index_spree_calculators_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_calculators_on_deleted_at ON spree_calculators USING btree (deleted_at); -- -- Name: index_spree_calculators_on_id_and_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_calculators_on_id_and_type ON spree_calculators USING btree (id, type); -- -- Name: index_spree_credit_cards_on_address_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_credit_cards_on_address_id ON spree_credit_cards USING btree (address_id); -- -- Name: index_spree_credit_cards_on_payment_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_credit_cards_on_payment_method_id ON spree_credit_cards USING btree (payment_method_id); -- -- Name: index_spree_credit_cards_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_credit_cards_on_user_id ON spree_credit_cards USING btree (user_id); -- -- Name: index_spree_gateways_on_active; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_gateways_on_active ON spree_gateways USING btree (active); -- -- Name: index_spree_gateways_on_test_mode; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_gateways_on_test_mode ON spree_gateways USING btree (test_mode); -- -- Name: index_spree_inventory_units_on_line_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_inventory_units_on_line_item_id ON spree_inventory_units USING btree (line_item_id); -- -- Name: index_spree_line_items_on_order_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_line_items_on_order_id ON spree_line_items USING btree (order_id); -- -- Name: index_spree_line_items_on_tax_category_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_line_items_on_tax_category_id ON spree_line_items USING btree (tax_category_id); -- -- Name: index_spree_line_items_on_variant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_line_items_on_variant_id ON spree_line_items USING btree (variant_id); -- -- Name: index_spree_log_entries_on_source_id_and_source_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_log_entries_on_source_id_and_source_type ON spree_log_entries USING btree (source_id, source_type); -- -- Name: index_spree_option_types_on_position; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_option_types_on_position ON spree_option_types USING btree ("position"); -- -- Name: index_spree_option_values_on_option_type_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_option_values_on_option_type_id ON spree_option_values USING btree (option_type_id); -- -- Name: index_spree_option_values_on_position; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_option_values_on_position ON spree_option_values USING btree ("position"); -- -- Name: index_spree_option_values_variants_on_variant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_option_values_variants_on_variant_id ON spree_option_values_variants USING btree (variant_id); -- -- Name: index_spree_orders_on_approver_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_approver_id ON spree_orders USING btree (approver_id); -- -- Name: index_spree_orders_on_bill_address_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_bill_address_id ON spree_orders USING btree (bill_address_id); -- -- Name: index_spree_orders_on_completed_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_completed_at ON spree_orders USING btree (completed_at); -- -- Name: index_spree_orders_on_confirmation_delivered; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_confirmation_delivered ON spree_orders USING btree (confirmation_delivered); -- -- Name: index_spree_orders_on_considered_risky; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_considered_risky ON spree_orders USING btree (considered_risky); -- -- Name: index_spree_orders_on_created_by_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_created_by_id ON spree_orders USING btree (created_by_id); -- -- Name: index_spree_orders_on_guest_token; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_guest_token ON spree_orders USING btree (guest_token); -- -- Name: index_spree_orders_on_number; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_number ON spree_orders USING btree (number); -- -- Name: index_spree_orders_on_ship_address_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_ship_address_id ON spree_orders USING btree (ship_address_id); -- -- Name: index_spree_orders_on_shipping_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_shipping_method_id ON spree_orders USING btree (shipping_method_id); -- -- Name: index_spree_orders_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_user_id ON spree_orders USING btree (user_id); -- -- Name: index_spree_orders_on_user_id_and_created_by_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_on_user_id_and_created_by_id ON spree_orders USING btree (user_id, created_by_id); -- -- Name: index_spree_orders_promotions_on_order_id_and_promotion_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_orders_promotions_on_order_id_and_promotion_id ON spree_orders_promotions USING btree (order_id, promotion_id); -- -- Name: index_spree_payment_capture_events_on_payment_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_payment_capture_events_on_payment_id ON spree_payment_capture_events USING btree (payment_id); -- -- Name: index_spree_payment_methods_on_id_and_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_payment_methods_on_id_and_type ON spree_payment_methods USING btree (id, type); -- -- Name: index_spree_payments_on_order_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_payments_on_order_id ON spree_payments USING btree (order_id); -- -- Name: index_spree_payments_on_payment_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_payments_on_payment_method_id ON spree_payments USING btree (payment_method_id); -- -- Name: index_spree_payments_on_source_id_and_source_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_payments_on_source_id_and_source_type ON spree_payments USING btree (source_id, source_type); -- -- Name: index_spree_preferences_on_key; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX index_spree_preferences_on_key ON spree_preferences USING btree (key); -- -- Name: index_spree_prices_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_prices_on_deleted_at ON spree_prices USING btree (deleted_at); -- -- Name: index_spree_prices_on_variant_id_and_currency; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_prices_on_variant_id_and_currency ON spree_prices USING btree (variant_id, currency); -- -- Name: index_spree_product_option_types_on_option_type_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_product_option_types_on_option_type_id ON spree_product_option_types USING btree (option_type_id); -- -- Name: index_spree_product_option_types_on_position; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_product_option_types_on_position ON spree_product_option_types USING btree ("position"); -- -- Name: index_spree_product_option_types_on_product_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_product_option_types_on_product_id ON spree_product_option_types USING btree (product_id); -- -- Name: index_spree_product_properties_on_position; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_product_properties_on_position ON spree_product_properties USING btree ("position"); -- -- Name: index_spree_product_properties_on_property_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_product_properties_on_property_id ON spree_product_properties USING btree (property_id); -- -- Name: index_spree_products_on_available_on; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_products_on_available_on ON spree_products USING btree (available_on); -- -- Name: index_spree_products_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_products_on_deleted_at ON spree_products USING btree (deleted_at); -- -- Name: index_spree_products_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_products_on_name ON spree_products USING btree (name); -- -- Name: index_spree_products_on_shipping_category_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_products_on_shipping_category_id ON spree_products USING btree (shipping_category_id); -- -- Name: index_spree_products_on_slug; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX index_spree_products_on_slug ON spree_products USING btree (slug); -- -- Name: index_spree_products_on_tax_category_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_products_on_tax_category_id ON spree_products USING btree (tax_category_id); -- -- Name: index_spree_products_taxons_on_position; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_products_taxons_on_position ON spree_products_taxons USING btree ("position"); -- -- Name: index_spree_products_taxons_on_product_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_products_taxons_on_product_id ON spree_products_taxons USING btree (product_id); -- -- Name: index_spree_products_taxons_on_taxon_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_products_taxons_on_taxon_id ON spree_products_taxons USING btree (taxon_id); -- -- Name: index_spree_promotion_action_line_items_on_promotion_action_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotion_action_line_items_on_promotion_action_id ON spree_promotion_action_line_items USING btree (promotion_action_id); -- -- Name: index_spree_promotion_action_line_items_on_variant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotion_action_line_items_on_variant_id ON spree_promotion_action_line_items USING btree (variant_id); -- -- Name: index_spree_promotion_actions_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotion_actions_on_deleted_at ON spree_promotion_actions USING btree (deleted_at); -- -- Name: index_spree_promotion_actions_on_id_and_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotion_actions_on_id_and_type ON spree_promotion_actions USING btree (id, type); -- -- Name: index_spree_promotion_actions_on_promotion_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotion_actions_on_promotion_id ON spree_promotion_actions USING btree (promotion_id); -- -- Name: index_spree_promotion_rules_on_promotion_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotion_rules_on_promotion_id ON spree_promotion_rules USING btree (promotion_id); -- -- Name: index_spree_promotions_on_advertise; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotions_on_advertise ON spree_promotions USING btree (advertise); -- -- Name: index_spree_promotions_on_code; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotions_on_code ON spree_promotions USING btree (code); -- -- Name: index_spree_promotions_on_expires_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotions_on_expires_at ON spree_promotions USING btree (expires_at); -- -- Name: index_spree_promotions_on_id_and_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotions_on_id_and_type ON spree_promotions USING btree (id, type); -- -- Name: index_spree_promotions_on_promotion_category_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotions_on_promotion_category_id ON spree_promotions USING btree (promotion_category_id); -- -- Name: index_spree_promotions_on_starts_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_promotions_on_starts_at ON spree_promotions USING btree (starts_at); -- -- Name: index_spree_reimbursement_types_on_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_reimbursement_types_on_type ON spree_reimbursement_types USING btree (type); -- -- Name: index_spree_reimbursements_on_customer_return_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_reimbursements_on_customer_return_id ON spree_reimbursements USING btree (customer_return_id); -- -- Name: index_spree_reimbursements_on_order_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_reimbursements_on_order_id ON spree_reimbursements USING btree (order_id); -- -- Name: index_spree_return_items_on_exchange_inventory_unit_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_return_items_on_exchange_inventory_unit_id ON spree_return_items USING btree (exchange_inventory_unit_id); -- -- Name: index_spree_roles_users_on_role_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_roles_users_on_role_id ON spree_roles_users USING btree (role_id); -- -- Name: index_spree_roles_users_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_roles_users_on_user_id ON spree_roles_users USING btree (user_id); -- -- Name: index_spree_shipments_on_address_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_shipments_on_address_id ON spree_shipments USING btree (address_id); -- -- Name: index_spree_shipments_on_order_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_shipments_on_order_id ON spree_shipments USING btree (order_id); -- -- Name: index_spree_shipments_on_stock_location_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_shipments_on_stock_location_id ON spree_shipments USING btree (stock_location_id); -- -- Name: index_spree_shipping_method_categories_on_shipping_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_shipping_method_categories_on_shipping_method_id ON spree_shipping_method_categories USING btree (shipping_method_id); -- -- Name: index_spree_shipping_methods_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_shipping_methods_on_deleted_at ON spree_shipping_methods USING btree (deleted_at); -- -- Name: index_spree_shipping_methods_on_tax_category_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_shipping_methods_on_tax_category_id ON spree_shipping_methods USING btree (tax_category_id); -- -- Name: index_spree_shipping_rates_on_selected; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_shipping_rates_on_selected ON spree_shipping_rates USING btree (selected); -- -- Name: index_spree_shipping_rates_on_tax_rate_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_shipping_rates_on_tax_rate_id ON spree_shipping_rates USING btree (tax_rate_id); -- -- Name: index_spree_state_changes_on_stateful_id_and_stateful_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_state_changes_on_stateful_id_and_stateful_type ON spree_state_changes USING btree (stateful_id, stateful_type); -- -- Name: index_spree_state_changes_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_state_changes_on_user_id ON spree_state_changes USING btree (user_id); -- -- Name: index_spree_states_on_country_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_states_on_country_id ON spree_states USING btree (country_id); -- -- Name: index_spree_stock_items_on_backorderable; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_items_on_backorderable ON spree_stock_items USING btree (backorderable); -- -- Name: index_spree_stock_items_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_items_on_deleted_at ON spree_stock_items USING btree (deleted_at); -- -- Name: index_spree_stock_items_on_stock_location_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_items_on_stock_location_id ON spree_stock_items USING btree (stock_location_id); -- -- Name: index_spree_stock_items_on_variant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_items_on_variant_id ON spree_stock_items USING btree (variant_id); -- -- Name: index_spree_stock_locations_on_active; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_locations_on_active ON spree_stock_locations USING btree (active); -- -- Name: index_spree_stock_locations_on_backorderable_default; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_locations_on_backorderable_default ON spree_stock_locations USING btree (backorderable_default); -- -- Name: index_spree_stock_locations_on_country_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_locations_on_country_id ON spree_stock_locations USING btree (country_id); -- -- Name: index_spree_stock_locations_on_propagate_all_variants; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_locations_on_propagate_all_variants ON spree_stock_locations USING btree (propagate_all_variants); -- -- Name: index_spree_stock_locations_on_state_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_locations_on_state_id ON spree_stock_locations USING btree (state_id); -- -- Name: index_spree_stock_movements_on_stock_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_movements_on_stock_item_id ON spree_stock_movements USING btree (stock_item_id); -- -- Name: index_spree_stock_transfers_on_destination_location_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_transfers_on_destination_location_id ON spree_stock_transfers USING btree (destination_location_id); -- -- Name: index_spree_stock_transfers_on_number; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_transfers_on_number ON spree_stock_transfers USING btree (number); -- -- Name: index_spree_stock_transfers_on_source_location_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stock_transfers_on_source_location_id ON spree_stock_transfers USING btree (source_location_id); -- -- Name: index_spree_stores_on_code; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stores_on_code ON spree_stores USING btree (code); -- -- Name: index_spree_stores_on_default; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stores_on_default ON spree_stores USING btree ("default"); -- -- Name: index_spree_stores_on_url; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_stores_on_url ON spree_stores USING btree (url); -- -- Name: index_spree_tax_categories_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_tax_categories_on_deleted_at ON spree_tax_categories USING btree (deleted_at); -- -- Name: index_spree_tax_categories_on_is_default; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_tax_categories_on_is_default ON spree_tax_categories USING btree (is_default); -- -- Name: index_spree_tax_rates_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_tax_rates_on_deleted_at ON spree_tax_rates USING btree (deleted_at); -- -- Name: index_spree_tax_rates_on_included_in_price; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_tax_rates_on_included_in_price ON spree_tax_rates USING btree (included_in_price); -- -- Name: index_spree_tax_rates_on_show_rate_in_label; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_tax_rates_on_show_rate_in_label ON spree_tax_rates USING btree (show_rate_in_label); -- -- Name: index_spree_tax_rates_on_tax_category_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_tax_rates_on_tax_category_id ON spree_tax_rates USING btree (tax_category_id); -- -- Name: index_spree_tax_rates_on_zone_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_tax_rates_on_zone_id ON spree_tax_rates USING btree (zone_id); -- -- Name: index_spree_taxonomies_on_position; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_taxonomies_on_position ON spree_taxonomies USING btree ("position"); -- -- Name: index_spree_taxons_on_position; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_taxons_on_position ON spree_taxons USING btree ("position"); -- -- Name: index_spree_taxons_promotion_rules_on_promotion_rule_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_taxons_promotion_rules_on_promotion_rule_id ON spree_taxons_promotion_rules USING btree (promotion_rule_id); -- -- Name: index_spree_taxons_promotion_rules_on_taxon_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_taxons_promotion_rules_on_taxon_id ON spree_taxons_promotion_rules USING btree (taxon_id); -- -- Name: index_spree_taxons_prototypes_on_prototype_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_taxons_prototypes_on_prototype_id ON spree_taxons_prototypes USING btree (prototype_id); -- -- Name: index_spree_taxons_prototypes_on_taxon_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_taxons_prototypes_on_taxon_id ON spree_taxons_prototypes USING btree (taxon_id); -- -- Name: index_spree_trackers_on_active; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_trackers_on_active ON spree_trackers USING btree (active); -- -- Name: index_spree_users_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_users_on_deleted_at ON spree_users USING btree (deleted_at); -- -- Name: index_spree_users_on_spree_api_key; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_users_on_spree_api_key ON spree_users USING btree (spree_api_key); -- -- Name: index_spree_variants_on_deleted_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_variants_on_deleted_at ON spree_variants USING btree (deleted_at); -- -- Name: index_spree_variants_on_is_master; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_variants_on_is_master ON spree_variants USING btree (is_master); -- -- Name: index_spree_variants_on_position; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_variants_on_position ON spree_variants USING btree ("position"); -- -- Name: index_spree_variants_on_product_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_variants_on_product_id ON spree_variants USING btree (product_id); -- -- Name: index_spree_variants_on_sku; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_variants_on_sku ON spree_variants USING btree (sku); -- -- Name: index_spree_variants_on_tax_category_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_variants_on_tax_category_id ON spree_variants USING btree (tax_category_id); -- -- Name: index_spree_variants_on_track_inventory; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_variants_on_track_inventory ON spree_variants USING btree (track_inventory); -- -- Name: index_spree_zone_members_on_zone_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_zone_members_on_zone_id ON spree_zone_members USING btree (zone_id); -- -- Name: index_spree_zone_members_on_zoneable_id_and_zoneable_type; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_zone_members_on_zoneable_id_and_zoneable_type ON spree_zone_members USING btree (zoneable_id, zoneable_type); -- -- Name: index_spree_zones_on_default_tax; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_zones_on_default_tax ON spree_zones USING btree (default_tax); -- -- Name: index_spree_zones_on_kind; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_spree_zones_on_kind ON spree_zones USING btree (kind); -- -- Name: index_taxons_on_parent_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_taxons_on_parent_id ON spree_taxons USING btree (parent_id); -- -- Name: index_taxons_on_permalink; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_taxons_on_permalink ON spree_taxons USING btree (permalink); -- -- Name: index_taxons_on_taxonomy_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX index_taxons_on_taxonomy_id ON spree_taxons USING btree (taxonomy_id); -- -- Name: spree_shipping_rates_join_index; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX spree_shipping_rates_join_index ON spree_shipping_rates USING btree (shipment_id, shipping_method_id); -- -- Name: stock_item_by_loc_and_var_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE INDEX stock_item_by_loc_and_var_id ON spree_stock_items USING btree (stock_location_id, variant_id); -- -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version); -- -- Name: unique_spree_shipping_method_categories; Type: INDEX; Schema: public; Owner: -; Tablespace: -- CREATE UNIQUE INDEX unique_spree_shipping_method_categories ON spree_shipping_method_categories USING btree (shipping_category_id, shipping_method_id); SET search_path = salesforce, pg_catalog; -- -- Name: index_contact_on_spree_email__c; Type: INDEX; Schema: salesforce; Owner: -; Tablespace: -- CREATE UNIQUE INDEX index_contact_on_spree_email__c ON contact USING btree (spree_email__c); -- -- PostgreSQL database dump complete -- SET search_path TO "$user",public; INSERT INTO schema_migrations (version) VALUES ('20150603174003'); INSERT INTO schema_migrations (version) VALUES ('20150603174004'); INSERT INTO schema_migrations (version) VALUES ('20150603174005'); INSERT INTO schema_migrations (version) VALUES ('20150603174006'); INSERT INTO schema_migrations (version) VALUES ('20150603174007'); INSERT INTO schema_migrations (version) VALUES ('20150603174008'); INSERT INTO schema_migrations (version) VALUES ('20150603174009'); INSERT INTO schema_migrations (version) VALUES ('20150603174010'); INSERT INTO schema_migrations (version) VALUES ('20150603174011'); INSERT INTO schema_migrations (version) VALUES ('20150603174012'); INSERT INTO schema_migrations (version) VALUES ('20150603174013'); INSERT INTO schema_migrations (version) VALUES ('20150603174014'); INSERT INTO schema_migrations (version) VALUES ('20150603174015'); INSERT INTO schema_migrations (version) VALUES ('20150603174016'); INSERT INTO schema_migrations (version) VALUES ('20150603174017'); INSERT INTO schema_migrations (version) VALUES ('20150603174018'); INSERT INTO schema_migrations (version) VALUES ('20150603174019'); INSERT INTO schema_migrations (version) VALUES ('20150603174020'); INSERT INTO schema_migrations (version) VALUES ('20150603174021'); INSERT INTO schema_migrations (version) VALUES ('20150603174022'); INSERT INTO schema_migrations (version) VALUES ('20150603174023'); INSERT INTO schema_migrations (version) VALUES ('20150603174024'); INSERT INTO schema_migrations (version) VALUES ('20150603174025'); INSERT INTO schema_migrations (version) VALUES ('20150603174026'); INSERT INTO schema_migrations (version) VALUES ('20150603174027'); INSERT INTO schema_migrations (version) VALUES ('20150603174028'); INSERT INTO schema_migrations (version) VALUES ('20150603174029'); INSERT INTO schema_migrations (version) VALUES ('20150603174030'); INSERT INTO schema_migrations (version) VALUES ('20150603174031'); INSERT INTO schema_migrations (version) VALUES ('20150603174032'); INSERT INTO schema_migrations (version) VALUES ('20150603174033'); INSERT INTO schema_migrations (version) VALUES ('20150603174034'); INSERT INTO schema_migrations (version) VALUES ('20150603174035'); INSERT INTO schema_migrations (version) VALUES ('20150603174036'); INSERT INTO schema_migrations (version) VALUES ('20150603174037'); INSERT INTO schema_migrations (version) VALUES ('20150603174038'); INSERT INTO schema_migrations (version) VALUES ('20150603174039'); INSERT INTO schema_migrations (version) VALUES ('20150603174040'); INSERT INTO schema_migrations (version) VALUES ('20150603174041'); INSERT INTO schema_migrations (version) VALUES ('20150603174042'); INSERT INTO schema_migrations (version) VALUES ('20150603174043'); INSERT INTO schema_migrations (version) VALUES ('20150603174044'); INSERT INTO schema_migrations (version) VALUES ('20150603174045'); INSERT INTO schema_migrations (version) VALUES ('20150603174046'); INSERT INTO schema_migrations (version) VALUES ('20150603174047'); INSERT INTO schema_migrations (version) VALUES ('20150603174048'); INSERT INTO schema_migrations (version) VALUES ('20150603174049'); INSERT INTO schema_migrations (version) VALUES ('20150603174050'); INSERT INTO schema_migrations (version) VALUES ('20150603174051'); INSERT INTO schema_migrations (version) VALUES ('20150603174052'); INSERT INTO schema_migrations (version) VALUES ('20150603174053'); INSERT INTO schema_migrations (version) VALUES ('20150603174054'); INSERT INTO schema_migrations (version) VALUES ('20150603174055'); INSERT INTO schema_migrations (version) VALUES ('20150603174056'); INSERT INTO schema_migrations (version) VALUES ('20150603174057'); INSERT INTO schema_migrations (version) VALUES ('20150603174058'); INSERT INTO schema_migrations (version) VALUES ('20150603174059'); INSERT INTO schema_migrations (version) VALUES ('20150603174060'); INSERT INTO schema_migrations (version) VALUES ('20150603174061'); INSERT INTO schema_migrations (version) VALUES ('20150603174062'); INSERT INTO schema_migrations (version) VALUES ('20150603174063'); INSERT INTO schema_migrations (version) VALUES ('20150603174064'); INSERT INTO schema_migrations (version) VALUES ('20150603174065'); INSERT INTO schema_migrations (version) VALUES ('20150603174066'); INSERT INTO schema_migrations (version) VALUES ('20150603174067'); INSERT INTO schema_migrations (version) VALUES ('20150603174068'); INSERT INTO schema_migrations (version) VALUES ('20150603174069'); INSERT INTO schema_migrations (version) VALUES ('20150603174070'); INSERT INTO schema_migrations (version) VALUES ('20150603174071'); INSERT INTO schema_migrations (version) VALUES ('20150603174072'); INSERT INTO schema_migrations (version) VALUES ('20150603174073'); INSERT INTO schema_migrations (version) VALUES ('20150603174074'); INSERT INTO schema_migrations (version) VALUES ('20150603174075'); INSERT INTO schema_migrations (version) VALUES ('20150603174076'); INSERT INTO schema_migrations (version) VALUES ('20150603174077'); INSERT INTO schema_migrations (version) VALUES ('20150603174078'); INSERT INTO schema_migrations (version) VALUES ('20150603174079'); INSERT INTO schema_migrations (version) VALUES ('20150603174080'); INSERT INTO schema_migrations (version) VALUES ('20150603174081'); INSERT INTO schema_migrations (version) VALUES ('20150603174082'); INSERT INTO schema_migrations (version) VALUES ('20150603174083'); INSERT INTO schema_migrations (version) VALUES ('20150603174084'); INSERT INTO schema_migrations (version) VALUES ('20150603174085'); INSERT INTO schema_migrations (version) VALUES ('20150603174086'); INSERT INTO schema_migrations (version) VALUES ('20150603174087'); INSERT INTO schema_migrations (version) VALUES ('20150603174088'); INSERT INTO schema_migrations (version) VALUES ('20150603174089'); INSERT INTO schema_migrations (version) VALUES ('20150603174090'); INSERT INTO schema_migrations (version) VALUES ('20150603174091'); INSERT INTO schema_migrations (version) VALUES ('20150603174092'); INSERT INTO schema_migrations (version) VALUES ('20150603174093'); INSERT INTO schema_migrations (version) VALUES ('20150603174094'); INSERT INTO schema_migrations (version) VALUES ('20150603174095'); INSERT INTO schema_migrations (version) VALUES ('20150603174096'); INSERT INTO schema_migrations (version) VALUES ('20150603174097'); INSERT INTO schema_migrations (version) VALUES ('20150603174098'); INSERT INTO schema_migrations (version) VALUES ('20150603174099'); INSERT INTO schema_migrations (version) VALUES ('20150603174100'); INSERT INTO schema_migrations (version) VALUES ('20150603174101'); INSERT INTO schema_migrations (version) VALUES ('20150603174102'); INSERT INTO schema_migrations (version) VALUES ('20150603174103'); INSERT INTO schema_migrations (version) VALUES ('20150603174104'); INSERT INTO schema_migrations (version) VALUES ('20150603174105'); INSERT INTO schema_migrations (version) VALUES ('20150603174106'); INSERT INTO schema_migrations (version) VALUES ('20150603174107'); INSERT INTO schema_migrations (version) VALUES ('20150603174108'); INSERT INTO schema_migrations (version) VALUES ('20150603174109'); INSERT INTO schema_migrations (version) VALUES ('20150603174110'); INSERT INTO schema_migrations (version) VALUES ('20150603174111'); INSERT INTO schema_migrations (version) VALUES ('20150603174112'); INSERT INTO schema_migrations (version) VALUES ('20150603174113'); INSERT INTO schema_migrations (version) VALUES ('20150603174114'); INSERT INTO schema_migrations (version) VALUES ('20150603174115'); INSERT INTO schema_migrations (version) VALUES ('20150603174116'); INSERT INTO schema_migrations (version) VALUES ('20150603174117'); INSERT INTO schema_migrations (version) VALUES ('20150603174118'); INSERT INTO schema_migrations (version) VALUES ('20150603174119'); INSERT INTO schema_migrations (version) VALUES ('20150603174120'); INSERT INTO schema_migrations (version) VALUES ('20150603174121'); INSERT INTO schema_migrations (version) VALUES ('20150603174122'); INSERT INTO schema_migrations (version) VALUES ('20150603174123'); INSERT INTO schema_migrations (version) VALUES ('20150603174124'); INSERT INTO schema_migrations (version) VALUES ('20150603174125'); INSERT INTO schema_migrations (version) VALUES ('20150603174126'); INSERT INTO schema_migrations (version) VALUES ('20150603174127'); INSERT INTO schema_migrations (version) VALUES ('20150603174128'); INSERT INTO schema_migrations (version) VALUES ('20150603174129'); INSERT INTO schema_migrations (version) VALUES ('20150603174130'); INSERT INTO schema_migrations (version) VALUES ('20150603174131'); INSERT INTO schema_migrations (version) VALUES ('20150603174132'); INSERT INTO schema_migrations (version) VALUES ('20150603174133'); INSERT INTO schema_migrations (version) VALUES ('20150603174134'); INSERT INTO schema_migrations (version) VALUES ('20150603174135'); INSERT INTO schema_migrations (version) VALUES ('20150603174136'); INSERT INTO schema_migrations (version) VALUES ('20150603174137'); INSERT INTO schema_migrations (version) VALUES ('20150603174138'); INSERT INTO schema_migrations (version) VALUES ('20150603174139'); INSERT INTO schema_migrations (version) VALUES ('20150603174140'); INSERT INTO schema_migrations (version) VALUES ('20150603174141'); INSERT INTO schema_migrations (version) VALUES ('20150603174142'); INSERT INTO schema_migrations (version) VALUES ('20150603174143'); INSERT INTO schema_migrations (version) VALUES ('20150603174144'); INSERT INTO schema_migrations (version) VALUES ('20150603174145'); INSERT INTO schema_migrations (version) VALUES ('20150603174146'); INSERT INTO schema_migrations (version) VALUES ('20150603174147'); INSERT INTO schema_migrations (version) VALUES ('20150603174148'); INSERT INTO schema_migrations (version) VALUES ('20150603174149'); INSERT INTO schema_migrations (version) VALUES ('20150603174150'); INSERT INTO schema_migrations (version) VALUES ('20150603174151'); INSERT INTO schema_migrations (version) VALUES ('20150603174152'); INSERT INTO schema_migrations (version) VALUES ('20150603174153'); INSERT INTO schema_migrations (version) VALUES ('20150603174154'); INSERT INTO schema_migrations (version) VALUES ('20150603174155'); INSERT INTO schema_migrations (version) VALUES ('20150603174156'); INSERT INTO schema_migrations (version) VALUES ('20150603174157'); INSERT INTO schema_migrations (version) VALUES ('20150603174158'); INSERT INTO schema_migrations (version) VALUES ('20150603174159'); INSERT INTO schema_migrations (version) VALUES ('20150603174160'); INSERT INTO schema_migrations (version) VALUES ('20150603174161'); INSERT INTO schema_migrations (version) VALUES ('20150603174162'); INSERT INTO schema_migrations (version) VALUES ('20150603174163'); INSERT INTO schema_migrations (version) VALUES ('20150603174164'); INSERT INTO schema_migrations (version) VALUES ('20150603174165'); INSERT INTO schema_migrations (version) VALUES ('20150603174166'); INSERT INTO schema_migrations (version) VALUES ('20150603174167'); INSERT INTO schema_migrations (version) VALUES ('20150603174168'); INSERT INTO schema_migrations (version) VALUES ('20150603174169'); INSERT INTO schema_migrations (version) VALUES ('20150603174170'); INSERT INTO schema_migrations (version) VALUES ('20150603174171'); INSERT INTO schema_migrations (version) VALUES ('20150603174172'); INSERT INTO schema_migrations (version) VALUES ('20150603174173'); INSERT INTO schema_migrations (version) VALUES ('20150603174174'); INSERT INTO schema_migrations (version) VALUES ('20150603174175'); INSERT INTO schema_migrations (version) VALUES ('20150603174176'); INSERT INTO schema_migrations (version) VALUES ('20150603174177'); INSERT INTO schema_migrations (version) VALUES ('20150603174178'); INSERT INTO schema_migrations (version) VALUES ('20150603174179'); INSERT INTO schema_migrations (version) VALUES ('20150603174180'); INSERT INTO schema_migrations (version) VALUES ('20150603174181'); INSERT INTO schema_migrations (version) VALUES ('20150603174182'); INSERT INTO schema_migrations (version) VALUES ('20150603174183'); INSERT INTO schema_migrations (version) VALUES ('20150603174184'); INSERT INTO schema_migrations (version) VALUES ('20150603174185'); INSERT INTO schema_migrations (version) VALUES ('20150603174186'); INSERT INTO schema_migrations (version) VALUES ('20150603174187'); INSERT INTO schema_migrations (version) VALUES ('20150603174188'); INSERT INTO schema_migrations (version) VALUES ('20150603174189'); INSERT INTO schema_migrations (version) VALUES ('20150603174190'); INSERT INTO schema_migrations (version) VALUES ('20150603174191'); INSERT INTO schema_migrations (version) VALUES ('20150603174192'); INSERT INTO schema_migrations (version) VALUES ('20150603174193'); INSERT INTO schema_migrations (version) VALUES ('20150603174194'); INSERT INTO schema_migrations (version) VALUES ('20150603174195'); INSERT INTO schema_migrations (version) VALUES ('20150603174196'); INSERT INTO schema_migrations (version) VALUES ('20150603174197'); INSERT INTO schema_migrations (version) VALUES ('20150603174198'); INSERT INTO schema_migrations (version) VALUES ('20150603174199'); INSERT INTO schema_migrations (version) VALUES ('20150603174200'); INSERT INTO schema_migrations (version) VALUES ('20150603174201'); INSERT INTO schema_migrations (version) VALUES ('20150603174202'); INSERT INTO schema_migrations (version) VALUES ('20150603174203'); INSERT INTO schema_migrations (version) VALUES ('20150603174204'); INSERT INTO schema_migrations (version) VALUES ('20150603174205'); INSERT INTO schema_migrations (version) VALUES ('20150603174206'); INSERT INTO schema_migrations (version) VALUES ('20150603174207'); INSERT INTO schema_migrations (version) VALUES ('20150603174208'); INSERT INTO schema_migrations (version) VALUES ('20150603174209'); INSERT INTO schema_migrations (version) VALUES ('20150603174210'); INSERT INTO schema_migrations (version) VALUES ('20150603174211'); INSERT INTO schema_migrations (version) VALUES ('20150603174212'); INSERT INTO schema_migrations (version) VALUES ('20150603174213'); INSERT INTO schema_migrations (version) VALUES ('20150603174214'); INSERT INTO schema_migrations (version) VALUES ('20150603174215'); INSERT INTO schema_migrations (version) VALUES ('20150603174216'); INSERT INTO schema_migrations (version) VALUES ('20150603174217'); INSERT INTO schema_migrations (version) VALUES ('20150603174218'); INSERT INTO schema_migrations (version) VALUES ('20150603174219'); INSERT INTO schema_migrations (version) VALUES ('20150603174220'); INSERT INTO schema_migrations (version) VALUES ('20150603174221'); INSERT INTO schema_migrations (version) VALUES ('20150618142658'); INSERT INTO schema_migrations (version) VALUES ('20150630152357'); INSERT INTO schema_migrations (version) VALUES ('20150630211014'); INSERT INTO schema_migrations (version) VALUES ('20150630220623'); INSERT INTO schema_migrations (version) VALUES ('20150702002050'); INSERT INTO schema_migrations (version) VALUES ('20150702002851'); INSERT INTO schema_migrations (version) VALUES ('20150707020708'); INSERT INTO schema_migrations (version) VALUES ('20150707021104'); INSERT INTO schema_migrations (version) VALUES ('20150707225035'); INSERT INTO schema_migrations (version) VALUES ('20150708214736'); INSERT INTO schema_migrations (version) VALUES ('20150708224309'); INSERT INTO schema_migrations (version) VALUES ('20150723205155'); INSERT INTO schema_migrations (version) VALUES ('20150824221311'); INSERT INTO schema_migrations (version) VALUES ('20150825231328'); INSERT INTO schema_migrations (version) VALUES ('20150825231337'); INSERT INTO schema_migrations (version) VALUES ('20150909232103'); INSERT INTO schema_migrations (version) VALUES ('20150910185306'); INSERT INTO schema_migrations (version) VALUES ('20150910185307'); INSERT INTO schema_migrations (version) VALUES ('20150910185308'); INSERT INTO schema_migrations (version) VALUES ('20150910185309');
<gh_stars>1-10  CREATE View uspgenerator.GeneratorUspStep_Persistence_IsInactive_setpoint As With ro_u As ( Select usp_id = u.id , u.usp_schema , u.usp_name , ro.is_persistence_check_duplicate_per_pk , ro.is_persistence_check_for_empty_source , ro.is_persistence_delete_missing , ro.is_persistence_delete_changed , ro.is_persistence_insert , ro.is_persistence_truncate , ro.is_persistence_update_changed , source_pk_index_guid = ro_s.pk_index_guid From repo.RepoObject_gross As ro Inner Join uspgenerator.GeneratorUsp As u On ro.RepoObject_schema_name = u.usp_schema And ro.usp_persistence_name = u.usp_name Left Join repo.RepoObject_gross As ro_s On ro_s.RepoObject_guid = ro.persistence_source_RepoObject_guid ) Select --check for empty source ro_u.usp_id , Number = 100 , is_inactive = Case ro_u.is_persistence_check_for_empty_source When 1 Then 0 Else 1 End , ro_u.source_pk_index_guid -- required only for debugging From ro_u Union All Select --check duplicate per PK --also check existing PK ro_u.usp_id , Number = 300 , is_inactive = Case When ro_u.is_persistence_check_duplicate_per_pk = 1 And Not ( ro_u.source_pk_index_guid Is Null ) Then 0 Else 1 End , ro_u.source_pk_index_guid From ro_u Union All Select --truncate persistence target ro_u.usp_id , Number = 400 , is_inactive = Case ro_u.is_persistence_truncate When 1 Then 0 Else 1 End , ro_u.source_pk_index_guid From ro_u Union All Select --delete persistence target missing in source --also do not delete if truncate, because there is nothing to delete after truncate --also check existing PK ro_u.usp_id , Number = 500 , is_inactive = Case When ro_u.is_persistence_truncate = 1 Or ro_u.is_persistence_delete_missing = 0 Or ro_u.source_pk_index_guid Is Null Then 1 Else 0 End , ro_u.source_pk_index_guid From ro_u Union All Select --delete persistence target changed --also do not delete if truncate, because there is nothing to delete after truncate --also check existing PK ro_u.usp_id , Number = 550 , is_inactive = Case When ro_u.is_persistence_truncate = 1 Or ro_u.is_persistence_delete_changed = 0 Or ro_u.source_pk_index_guid Is Null Then 1 Else 0 End , ro_u.source_pk_index_guid From ro_u Union All Select --update changed --also du not update after deleting changed or after truncate, because there is nothing to update --also check existing PK ro_u.usp_id , Number = 600 , is_inactive = Case When ro_u.is_persistence_truncate = 1 Or ro_u.is_persistence_delete_changed = 1 Or ro_u.is_persistence_update_changed = 0 Or ro_u.source_pk_index_guid Is Null Then 1 Else 0 End , ro_u.source_pk_index_guid From ro_u Union All Select --insert missing --don't do this, if 'insert all' (in case of truncate) --also check existing PK ro_u.usp_id , Number = 700 , is_inactive = Case When ro_u.is_persistence_insert = 1 And Not ro_u.is_persistence_truncate = 1 And Not ( ro_u.source_pk_index_guid Is Null ) Then 0 Else 1 End , ro_u.source_pk_index_guid From ro_u Union All Select --insert all --only in combination with truncate --possible enhancement: maybe some delete all is required, if truncate is not possible? ro_u.usp_id , Number = 800 , is_inactive = Case When ro_u.is_persistence_truncate = 1 And ro_u.is_persistence_insert = 1 Then 0 Else 1 End , ro_u.source_pk_index_guid From ro_u Union All Select --todo: --merge ro_u.usp_id , Number = 900 , is_inactive = 1 , ro_u.source_pk_index_guid From ro_u Go Execute sp_addextendedproperty @name = N'RepoObject_guid' , @value = '7f90291c-9d61-eb11-84dc-a81e8446d5b0' , @level0type = N'SCHEMA' , @level0name = N'uspgenerator' , @level1type = N'VIEW' , @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint'; Go Execute sp_addextendedproperty @name = N'RepoObjectColumn_guid' , @value = 'fdf67926-9d61-eb11-84dc-a81e8446d5b0' , @level0type = N'SCHEMA' , @level0name = N'uspgenerator' , @level1type = N'VIEW' , @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint' , @level2type = N'COLUMN' , @level2name = N'usp_id'; Go Execute sp_addextendedproperty @name = N'RepoObjectColumn_guid' , @value = 'fef67926-9d61-eb11-84dc-a81e8446d5b0' , @level0type = N'SCHEMA' , @level0name = N'uspgenerator' , @level1type = N'VIEW' , @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint' , @level2type = N'COLUMN' , @level2name = N'Number'; Go Execute sp_addextendedproperty @name = N'RepoObjectColumn_guid' , @value = 'fff67926-9d61-eb11-84dc-a81e8446d5b0' , @level0type = N'SCHEMA' , @level0name = N'uspgenerator' , @level1type = N'VIEW' , @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint' , @level2type = N'COLUMN' , @level2name = N'is_inactive'; Go Execute sp_addextendedproperty @name = N'RepoObjectColumn_guid' , @value = 'f630c24a-759b-eb11-84f5-a81e8446d5b0' , @level0type = N'SCHEMA' , @level0name = N'uspgenerator' , @level1type = N'VIEW' , @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint' , @level2type = N'COLUMN' , @level2name = N'source_pk_index_guid'; GO EXECUTE sp_addextendedproperty @name = N'ReferencedObjectList', @value = N'* [repo].[RepoObject_gross] * [uspgenerator].[GeneratorUsp]', @level0type = N'SCHEMA', @level0name = N'uspgenerator', @level1type = N'VIEW', @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint'; GO GO EXECUTE sp_addextendedproperty @name = N'pk_IndexPatternColumnName', @value = N'usp_id', @level0type = N'SCHEMA', @level0name = N'uspgenerator', @level1type = N'VIEW', @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint'; GO EXECUTE sp_addextendedproperty @name = N'pk_IndexPatternColumnDatatype', @value = N'int', @level0type = N'SCHEMA', @level0name = N'uspgenerator', @level1type = N'VIEW', @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint'; GO EXECUTE sp_addextendedproperty @name = N'pk_index_guid', @value = N'363BB439-0796-EB11-84F4-A81E8446D5B0', @level0type = N'SCHEMA', @level0name = N'uspgenerator', @level1type = N'VIEW', @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint'; GO EXECUTE sp_addextendedproperty @name = N'AntoraReferencingList', @value = N'* xref:uspgenerator.usp_GeneratorUsp_insert_update_persistence.adoc[]', @level0type = N'SCHEMA', @level0name = N'uspgenerator', @level1type = N'VIEW', @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint'; GO EXECUTE sp_addextendedproperty @name = N'AntoraReferencedList', @value = N'* xref:repo.RepoObject_gross.adoc[] * xref:uspgenerator.GeneratorUsp.adoc[]', @level0type = N'SCHEMA', @level0name = N'uspgenerator', @level1type = N'VIEW', @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint'; GO EXECUTE sp_addextendedproperty @name = N'is_ssas', @value = N'0', @level0type = N'SCHEMA', @level0name = N'uspgenerator', @level1type = N'VIEW', @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint'; GO EXECUTE sp_addextendedproperty @name = N'is_repo_managed', @value = N'0', @level0type = N'SCHEMA', @level0name = N'uspgenerator', @level1type = N'VIEW', @level1name = N'GeneratorUspStep_Persistence_IsInactive_setpoint';
-- file:tstypes.sql ln:219 expect:true SELECT * FROM unnest('base hidden rebel spaceship strike'::tsvector)
<filename>d365fo.tools/internal/sql/clear-azurebacpacdatabase.sql --Author: <NAME> (@ITRasmus) --Author: <NAME> (@dropshind) --Author: <NAME> (@skaue) --Prepare a database in Azure SQL Database for export to SQL Server. -- Re-assign full text catalogs to [dbo] BEGIN DECLARE @catalogName NVARCHAR(256); DECLARE @sqlStmtTable NVARCHAR(512) DECLARE reassignfulltextcatalogcursor CURSOR FOR SELECT DISTINCT NAME FROM sys.fulltext_catalogs -- Open cursor and disable on all tables returned OPEN reassignfulltextcatalogcursor FETCH next FROM reassignfulltextcatalogcursor INTO @catalogName WHILE @@FETCH_STATUS = 0 BEGIN SET @sqlStmtTable = 'ALTER AUTHORIZATION ON Fulltext Catalog::[' + @catalogName + '] TO [dbo]' EXEC Sp_executesql @sqlStmtTable FETCH next FROM reassignfulltextcatalogcursor INTO @catalogName END CLOSE reassignfulltextcatalogcursor DEALLOCATE reassignfulltextcatalogcursor END --Disable change tracking on tables where it is enabled. DECLARE @SQL VARCHAR(1000) SET quoted_identifier OFF DECLARE changetrackingcursor CURSOR FOR SELECT 'ALTER TABLE [' + t.NAME + '] DISABLE CHANGE_TRACKING' FROM sys.change_tracking_tables ct INNER JOIN sys.tables t ON ct.object_id = t.object_id OPEN changetrackingcursor FETCH changetrackingcursor INTO @SQL WHILE @@Fetch_Status = 0 BEGIN EXEC(@SQL) FETCH changetrackingcursor INTO @SQL END CLOSE changetrackingcursor DEALLOCATE changetrackingcursor --Disable change tracking on the database itself. IF( 1 = (SELECT 1 FROM sys.change_tracking_databases WHERE database_id = Db_id('@NewDatabase')) ) ALTER DATABASE -- SET THE NAME OF YOUR DATABASE BELOW [@NewDatabase] SET change_tracking = OFF -- Ensure users can be dropped by changing ownership of certain schemas DECLARE @SCHEMASQL VARCHAR(1000) SET quoted_identifier OFF DECLARE schemacursor CURSOR FOR SELECT 'ALTER AUTHORIZATION ON SCHEMA::[' + NAME + '] TO [DBO]; ' FROM sys.schemas WHERE sys.schemas.NAME IN ( 'BACKUP', 'SHADOW', 'BatchScheduling' ) OPEN schemacursor FETCH schemacursor INTO @SCHEMASQL WHILE @@FETCH_STATUS = 0 BEGIN EXEC(@SCHEMASQL) FETCH schemacursor INTO @SCHEMASQL END CLOSE schemacursor DEALLOCATE schemacursor --Drop certificates that are tied to database users, which will cause errors when exporting the database --if not dropped because then the corresponding user(s) can't be dropped later in the script. --These certs are created from User options > Account > Electronic signature > "Get certificate" button in D365FO UI DECLARE certcursor CURSOR FOR SELECT 'DROP CERTIFICATE ' + Quotename(c.NAME) + ';' FROM sys.certificates c WHERE c.principal_id IN (SELECT u.uid FROM sys.sysusers u WHERE issqlrole = 0 AND hasdbaccess = 1 AND NAME <> 'dbo'); OPEN certcursor; FETCH certcursor INTO @SQL; WHILE @@Fetch_Status = 0 BEGIN EXEC(@SQL); FETCH certcursor INTO @SQL; END; CLOSE certcursor; DEALLOCATE certcursor; --Remove the database level users from the database --these will be recreated after importing in SQL Server. DECLARE @userSQL VARCHAR(1000) SET quoted_identifier OFF DECLARE usercursor CURSOR FOR SELECT 'DROP USER [' + NAME + ']' FROM sys.sysusers WHERE issqlrole = 0 AND hasdbaccess = 1 AND NAME <> 'dbo' OPEN usercursor FETCH usercursor INTO @userSQL WHILE @@Fetch_Status = 0 BEGIN EXEC(@userSQL) FETCH usercursor INTO @userSQL END CLOSE usercursor DEALLOCATE usercursor --Delete the SYSSQLRESOURCESTATSVIEW view as it has an Azure-specific definition in it. --We will run db synch later to recreate the correct view for SQL Server. IF( 1 = (SELECT 1 FROM sys.views WHERE NAME = 'SYSSQLRESOURCESTATSVIEW') ) DROP VIEW syssqlresourcestatsview --Next, set system parameters ready for being a SQL Server Database. UPDATE sysglobalconfiguration SET value = 'SQLSERVER' WHERE NAME = 'BACKENDDB' UPDATE sysglobalconfiguration SET value = 0 WHERE NAME = 'TEMPTABLEINAXDB' --Clean up the batch server configuration, server sessions, and printers from the previous environment. TRUNCATE TABLE sysserverconfig TRUNCATE TABLE sysserversessions TRUNCATE TABLE syscorpnetprinters TRUNCATE TABLE sysclientsessions TRUNCATE TABLE batchserverconfig TRUNCATE TABLE batchservergroup --Remove records which could lead to accidentally sending an email externally. UPDATE sysemailparameters SET smtprelayservername = '', mailernoninteractive = 'SMTP' --LANE.SWENKA 9/12/18 Forcing SMTP as Exchange provider can still email on refresh --Remove encrypted SMTP Password record(s) TRUNCATE TABLE sysemailsmtppassword; --GO UPDATE logisticselectronicaddress SET locator = '' WHERE locator LIKE '%@%'; --GO TRUNCATE TABLE printmgmtsettings TRUNCATE TABLE printmgmtdocinstance --Set any waiting, executing, ready, or canceling batches to withhold. UPDATE batchjob SET status = 0 WHERE status IN ( 1, 2, 5, 7 ); --GO -- Clear encrypted hardware profile merchand properties UPDATE dbo.retailhardwareprofile SET securemerchantproperties = NULL WHERE securemerchantproperties IS NOT NULL --BELOW code is used to handle FULLTEXT INDEX / FULLTEST STOPLIST. --Provided by <NAME> (Twitter - @braul) DECLARE @_SQL NVARCHAR(4000) ------------------------------------------------------------------------------------- -- ALTER FULLTEXT INDEX ON [TableName] SET STOPLIST = SYSTEM' IF Object_id('tempdb..#TMPSETSTOPLIST') IS NOT NULL DROP TABLE #tmpsetstoplist; CREATE TABLE #tmpsetstoplist ( tablename [NVARCHAR] (250) ); DECLARE cur CURSOR FOR SELECT Object_name(sys.fulltext_indexes.object_id) AS TableName FROM sys.fulltext_indexes WHERE stoplist_id != 0 OPEN cur; DECLARE @TableName [NVARCHAR](250); FETCH next FROM cur INTO @TableName; WHILE @@FETCH_STATUS = 0 BEGIN INSERT INTO #tmpsetstoplist (tablename) VALUES (@TableName); FETCH next FROM cur INTO @TableName; END; CLOSE cur; DEALLOCATE cur; DECLARE cur CURSOR FOR SELECT tablename FROM #tmpsetstoplist; OPEN cur; FETCH next FROM cur INTO @TableName; WHILE @@FETCH_STATUS = 0 BEGIN SET @_SQL = N'ALTER FULLTEXT INDEX ON ' + Quotename(@TableName) + ' SET STOPLIST = SYSTEM' PRINT ( @_SQL ) EXEC Sp_executesql @_SQL FETCH next FROM cur INTO @TableName; END; CLOSE cur; DEALLOCATE cur; ------------------------------------------------------------------------------------- -- DROP FULLTEXT STOPLIST [FullTextStopListName]; IF Object_id('tempdb..#DROPFULLTEXTSTOPLIST') IS NOT NULL DROP TABLE #dropfulltextstoplist; CREATE TABLE #dropfulltextstoplist ( stoplistname [NVARCHAR] (250) ); DECLARE cur CURSOR FOR SELECT NAME FROM sys.fulltext_stoplists OPEN cur; DECLARE @StopListName [NVARCHAR](250); FETCH next FROM cur INTO @StopListName; WHILE @@FETCH_STATUS = 0 BEGIN INSERT INTO #dropfulltextstoplist (stoplistname) VALUES (@StopListName); FETCH next FROM cur INTO @StopListName; END; CLOSE cur; DEALLOCATE cur; DECLARE cur CURSOR FOR SELECT stoplistname FROM #dropfulltextstoplist; OPEN cur; FETCH next FROM cur INTO @StopListName; WHILE @@FETCH_STATUS = 0 BEGIN SET @_SQL = N'DROP FULLTEXT STOPLIST ' + Quotename(@StopListName) + ';' PRINT ( @_SQL ) EXEC Sp_executesql @_SQL FETCH next FROM cur INTO @StopListName; END; CLOSE cur; DEALLOCATE cur;
<reponame>jveyes/ReservaME DROP TABLE IF EXISTS `plugin_stripe`; CREATE TABLE IF NOT EXISTS `plugin_stripe` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `foreign_id` int(10) unsigned DEFAULT NULL, `stripe_id` varchar(255) DEFAULT NULL, `token` varchar(255) DEFAULT NULL, `amount` decimal(9,2) unsigned DEFAULT NULL, `currency` varchar(3) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `created` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `foreign_id` (`foreign_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `plugin_payment_options` (`payment_method`) VALUES ('stripe'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`) VALUES (NULL, 'payment_methods_ARRAY_stripe', 'arrays', 'payment_methods_ARRAY_stripe', 'plugin'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Stripe', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`) VALUES (NULL, 'plugin_stripe_payment_title', 'frontend', 'Stripe plugin / Payment title', 'plugin'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Stripe payment', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`) VALUES (NULL, 'plugin_stripe_allow', 'backend', 'Stripe plugin / Allow Stripe Payments', 'plugin'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Allow Stripe payments', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`) VALUES (NULL, 'plugin_stripe_public_key', 'backend', 'Stripe plugin / Public Key', 'plugin'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Stripe public key:', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`) VALUES (NULL, 'plugin_stripe_public_key_text', 'backend', 'Stripe plugin / Public Key Text', 'plugin'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'This is your Stripe public key.', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`) VALUES (NULL, 'plugin_stripe_private_key', 'backend', 'Stripe plugin / Secret Key', 'plugin'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Stripe secret key:', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`) VALUES (NULL, 'plugin_stripe_private_key_text', 'backend', 'Stripe plugin / Secret Key Text', 'plugin'); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'This is your Stripe secret key.', 'plugin'); INSERT INTO `fields` VALUES (NULL, 'payment_plugin_messages_ARRAY_stripe', 'arrays', 'payment_plugin_messages_ARRAY_stripe', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Your order is saved. Redirecting to Stripe Checkout...', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_menu_payments', 'backend', 'Stripe plugin / Payments', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Payments', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_info_title', 'backend', 'Stripe plugin / Stripe payments', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Payment details', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_foreign_id', 'backend', 'Stripe plugin / Foreign ID', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Foreign ID', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_stripe_id', 'backend', 'Stripe plugin / Stripe ID', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Stripe ID', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_token', 'backend', 'Stripe plugin / Token', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Token', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_created', 'backend', 'Stripe plugin / Created', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Date / Time', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_amount', 'backend', 'Stripe plugin / Amount', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Amount', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_currency', 'backend', 'Stripe plugin / Currency', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Currency', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_btn_view', 'backend', 'Stripe plugin / Button view', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'View', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_btn_close', 'backend', 'Stripe plugin / Button close', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Close', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_description', 'backend', 'Stripe plugin / Description', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Description', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_msg', 'backend', 'Stripe plugin / Redirect message', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'If your browser does not redirects you in 3 seconds, please click the button below.', 'plugin'); INSERT INTO `fields` (`id`, `key`, `type`, `label`, `source`, `modified`) VALUES (NULL, 'plugin_stripe_submit', 'backend', 'Stripe plugin / Pay with Stripe', 'plugin', NULL); SET @id := (SELECT LAST_INSERT_ID()); INSERT INTO `multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Pay with Stripe', 'plugin');
CREATE TABLE IF NOT EXISTS `#__rsform_condition_details` ( `id` int(11) NOT NULL AUTO_INCREMENT, `condition_id` int(11) NOT NULL, `component_id` int(11) NOT NULL, `operator` varchar(16) NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `condition_id` (`condition_id`), KEY `component_id` (`component_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
<filename>db/ls20171205.sql /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50717 Source Host : localhost:3306 Source Database : ls Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-12-05 23:40:06 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for ls_admin -- ---------------------------- DROP TABLE IF EXISTS `ls_admin`; CREATE TABLE `ls_admin` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(255) NOT NULL DEFAULT '', `password` varchar(255) NOT NULL DEFAULT '', `addtime` int(10) unsigned NOT NULL DEFAULT '0', `lasttime` int(10) unsigned NOT NULL DEFAULT '0', `state` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0不可用,1可用,2屏蔽', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of ls_admin -- ---------------------------- INSERT INTO `ls_admin` VALUES ('1', 'admin', '52c69e3a57331081823331c4e69d3f2e', '0', '0', '1'); INSERT INTO `ls_admin` VALUES ('2', 'hflhfl', '<PASSWORD>', '0', '0', '1'); INSERT INTO `ls_admin` VALUES ('3', 'momo', '<PASSWORD>', '0', '0', '1'); -- ---------------------------- -- Table structure for ls_imgs -- ---------------------------- DROP TABLE IF EXISTS `ls_imgs`; CREATE TABLE `ls_imgs` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL DEFAULT '', `img` varchar(255) NOT NULL DEFAULT '', `imgname` varchar(255) NOT NULL DEFAULT '', `expire_time` int(10) unsigned NOT NULL DEFAULT '0', `adminid` int(10) unsigned NOT NULL DEFAULT '0', `addtime` int(10) unsigned NOT NULL DEFAULT '0', `edittime` int(10) unsigned NOT NULL DEFAULT '0', `t` tinyint(2) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=293 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of ls_imgs -- ---------------------------- INSERT INTO `ls_imgs` VALUES ('280', '1511866282', 'cache/151186627718235_show.jpg', '151186627718235', '1543402282', '2', '1511866282', '0', '0'); INSERT INTO `ls_imgs` VALUES ('281', '1511867281', 'cache/15118672765954_show.jpg', '15118672765954', '1543403281', '2', '1511867281', '0', '0'); INSERT INTO `ls_imgs` VALUES ('282', '1512039465', 'cache/15120394601946_show.jpg', '15120394601946', '1543575465', '2', '1512039465', '0', '0'); INSERT INTO `ls_imgs` VALUES ('283', '1512041419', 'cache/151204141428053_show.jpg', '151204141428053', '1543577419', '2', '1512041419', '0', '0'); INSERT INTO `ls_imgs` VALUES ('284', '1512041784', 'cache/1512041779207_show.jpg', '1512041779207', '1543577784', '2', '1512041784', '0', '0'); INSERT INTO `ls_imgs` VALUES ('286', '1512212671', 'cache/151221266624000_show.jpg', '151221266624000', '1543748671', '2', '1512212671', '0', '0'); INSERT INTO `ls_imgs` VALUES ('288', '1512472727', 'cache/15124727224348_show.jpg', '15124727224348', '1544008727', '2', '1512472727', '0', '0'); INSERT INTO `ls_imgs` VALUES ('290', '1512472863', 'cache/15124728593464_show.jpg', '15124728593464', '1544008863', '2', '1512472863', '0', '0'); INSERT INTO `ls_imgs` VALUES ('291', '1512480897', 'cache/151248089221432_show.jpg', '151248089221432', '1544016897', '2', '1512480897', '1512481852', '0'); -- ---------------------------- -- Table structure for ls_imgs_back -- ---------------------------- DROP TABLE IF EXISTS `ls_imgs_back`; CREATE TABLE `ls_imgs_back` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL DEFAULT '', `img` varchar(255) NOT NULL DEFAULT '', `imgname` varchar(255) NOT NULL DEFAULT '', `expire_time` int(10) unsigned NOT NULL DEFAULT '0', `adminid` int(10) unsigned NOT NULL DEFAULT '0', `addtime` int(10) unsigned NOT NULL DEFAULT '0', `edittime` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of ls_imgs_back -- ---------------------------- -- ---------------------------- -- Table structure for ls_ma -- ---------------------------- DROP TABLE IF EXISTS `ls_ma`; CREATE TABLE `ls_ma` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL DEFAULT '', `ma` varchar(255) NOT NULL DEFAULT '', `jia` varchar(255) NOT NULL DEFAULT '', `expire_time` int(10) unsigned NOT NULL DEFAULT '0', `adminid` int(10) unsigned NOT NULL DEFAULT '0', `addtime` int(10) unsigned NOT NULL DEFAULT '0', `edittime` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of ls_ma -- ---------------------------- INSERT INTO `ls_ma` VALUES ('1', '11111', '2\r\n232\r\n3\r\n23\r\n2\r\n32\r\n13\r\n4343', '', '0', '0', '1502977999', '1502978418'); INSERT INTO `ls_ma` VALUES ('2', '张三的码', '03.09.31.34各100元\r\n01.45。17.39.\r\n30.28.35.08.43各40元', '', '0', '0', '1502978734', '1505465839'); INSERT INTO `ls_ma` VALUES ('3', '107', '12.50、23.50.06.500.26.50、\r\n32.500、46.50、共1200元', '', '0', '0', '1504879695', '1505316756'); INSERT INTO `ls_ma` VALUES ('4', '78期', '12、500、23、25.23.25.26ee', '', '0', '0', '1504912598', '1505457842'); INSERT INTO `ls_ma` VALUES ('5', '19', '12/50..23/500..39/50..16/50..49/500..19/50..16、500..32/50..36/50..43/50..18/50..41/50......36/50..共2000', '', '0', '0', '1505312868', '1505318482'); INSERT INTO `ls_ma` VALUES ('6', '12', '1212323', '', '0', '0', '1505313078', '1505313078'); INSERT INTO `ls_ma` VALUES ('7', '12', '点', '', '0', '0', '1505313096', '1505322044'); INSERT INTO `ls_ma` VALUES ('8', '1', '125840', '', '0', '0', '1505314565', '1505314565'); INSERT INTO `ls_ma` VALUES ('9', '21', '12.50.23.50.25.500.13.50.45.50.26.500.26.50.18.50共130', '', '0', '0', '1505318662', '1505318905'); INSERT INTO `ls_ma` VALUES ('10', '试试', '13.09.31.34各200元\r\n01.23.33.39.\r\n30.28.38.08.43各400元', '', '0', '0', '1505319957', '1505324058'); INSERT INTO `ls_ma` VALUES ('11', '???', '20-50/32-50/49-500/46-50/41-50-08-500/09-50/36-50/19-5028-50/-35-50', '', '0', '0', '1505320381', '1505320505'); INSERT INTO `ls_ma` VALUES ('12', '⼀⼁:', '44.50,23、50,49,600.31、50,45、50133', '', '0', '0', '1505321084', '1505459358'); INSERT INTO `ls_ma` VALUES ('13', '。。。', '42,23,25,34/各5000', '', '0', '0', '1505323655', '1505323693'); INSERT INTO `ls_ma` VALUES ('14', '23', '13.50、23、50、36、50', '', '0', '0', '1505323789', '1505324385'); INSERT INTO `ls_ma` VALUES ('15', '。', '20.50/03.50/46.500/29.500/41.500/09.50/32.50共1250', '', '0', '0', '1505323926', '1505324076'); INSERT INTO `ls_ma` VALUES ('16', ';', '20.50/03.50/46.500/29.500/41.500/09.50/32.50共1250', '', '0', '0', '1505324637', '1505324637'); INSERT INTO `ls_ma` VALUES ('17', '2356', '25.50元12.50元36.500元45.50元05.50元31.500元23.50元11.500元108期', '', '0', '0', '1505472825', '1505488378'); INSERT INTO `ls_ma` VALUES ('18', '3333', '08.50/11.50/35.500/24.50/37.50/16.500/49.50/22.50/04.50/200', '', '0', '0', '1505474879', '1505489180'); INSERT INTO `ls_ma` VALUES ('19', '1', '23,400', '', '0', '0', '1505496781', '1505496849'); INSERT INTO `ls_ma` VALUES ('20', '34', '2345678944322567', '', '0', '0', '1507265810', '1507265810');
<filename>sql/5_advanced_join/1_sqlprojectplanning.sql Solution to [SQL Project Planning](https://www.hackerrank.com/challenges/sql-projects/problem)
<gh_stars>1-10 DROP TABLE "TEST_SETTING"; DROP TABLE "TEST_LOGGER"; DROP TABLE "TEST_ROLE_CORE_INFO"; DROP TABLE "TEST_USER_CORE_INFO"; DROP TABLE "TEST_USER_ROLE_REF"; DROP TABLE "TEST_DEPARTMENT_CORE_INFO"; CREATE TABLE TEST_SETTING ( ID VARCHAR(50) NOT NULL, NAME VARCHAR(30) NOT NULL, VALUE VARCHAR(50) NOT NULL, VERSION INTEGER(8) DEFAULT 1 NOT NULL, REMARK VARCHAR(200), STATE TINYINT(3) NOT NULL, CREATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, UPDATE_TIME TIMESTAMP, DATA_STATE INTEGER(10) DEFAULT 1 NOT NULL, CONSTRAINT TEST_SETTING_PK PRIMARY KEY (ID), CONSTRAINT TEST_SETTING_NAME UNIQUE (NAME,DATA_STATE) ); CREATE TABLE TEST_LOGGER ( ID VARCHAR(50) NOT NULL, NAME VARCHAR(30) NOT NULL, CONTENT VARCHAR(4000) NOT NULL, SORT_INDEX INTEGER(8) DEFAULT 1 NOT NULL, CREATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, DATA_STATE INTEGER(10) DEFAULT 1 NOT NULL, CONSTRAINT TEST_LOGGER_PK PRIMARY KEY (ID) ); CREATE TABLE "TEST_ROLE_CORE_INFO" ( "ID" VARCHAR(50) NOT NULL, "TENANT_CODE" VARCHAR(50) DEFAULT '0' NOT NULL, "USER_TYPE" TINYINT(3) DEFAULT 1 NOT NULL, "ROLE_NAME" VARCHAR(50) NOT NULL, "ROLE_DESC" VARCHAR(200), "SORT_INDEX" INTEGER(8), "CREATOR_ID" VARCHAR(50), "CREATE_TIME" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, "DEFAULTS" INTEGER(1) DEFAULT 0 NOT NULL, "OPTIONS" TEXT, "DATA_STATE" INTEGER(10) DEFAULT 1 NOT NULL, CONSTRAINT TEST_ROLE_CORE_PK PRIMARY KEY ("ID"), CONSTRAINT TEST_ROLE_CORE_NAME UNIQUE ("TENANT_CODE", "ROLE_NAME", "DATA_STATE") ); CREATE TABLE "TEST_USER_CORE_INFO" ( "ID" VARCHAR(50) NOT NULL, "TENANT_CODE" VARCHAR(50) DEFAULT '0' NOT NULL, "USER_TYPE" INTEGER(3) DEFAULT 1 NOT NULL, "DEPT_CODE" VARCHAR(50) DEFAULT '0' NOT NULL, "USER_CODE" VARCHAR(50), "USER_NAME" VARCHAR(50), "NICK_NAME" VARCHAR(50), "REAL_NAME" VARCHAR(20), "PHONE" VARCHAR(20), "EMAIL" VARCHAR(50), "GENDER" TINYINT(3) NOT NULL, "PHOTO" VARCHAR(120), "CITY" VARCHAR(50), "IDENTITY" VARCHAR(20), "PASSWORD" VARCHAR(120), "CREATE_TIME" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, "SUPERMAN" TINYINT(1) DEFAULT 0 NOT NULL, "USER_STATE" TINYINT(3) DEFAULT 0 NOT NULL, "USER_SOURCE" TINYINT(3) DEFAULT 0 NOT NULL, "OPTIONS" TEXT, "DATA_STATE" INTEGER(10) DEFAULT 1 NOT NULL, CONSTRAINT TEST_USER_CORE_PK PRIMARY KEY ("ID") ); CREATE TABLE "TEST_USER_ROLE_REF" ( "ID" VARCHAR(50) NOT NULL, "USER_ID" VARCHAR(50) NOT NULL, "ROLE_ID" VARCHAR(50) NOT NULL, "DATA_STATE" INTEGER(10) DEFAULT 1 NOT NULL, CONSTRAINT TEST_USER_ROLE_PK PRIMARY KEY ("ID"), CONSTRAINT TEST_USER_ROLE_REF UNIQUE ("USER_ID", "ROLE_ID", "DATA_STATE") ); CREATE INDEX "TEST_USER_ROLE_USER_ID" ON "TEST_USER_ROLE_REF" ( "USER_ID" ); CREATE INDEX "TEST_USER_ROLE_ROLE_ID" ON "TEST_USER_ROLE_REF" ( "ROLE_ID" ); CREATE TABLE "TEST_DEPARTMENT_CORE_INFO" ( "ID" VARCHAR(50) NOT NULL, "TENANT_CODE" VARCHAR(50) NOT NULL DEFAULT '0', "USER_TYPE" TINYINT(3) NOT NULL DEFAULT 1, "DEPT_CODE" VARCHAR(50) NOT NULL, "DEPT_NAME" VARCHAR(50) NOT NULL, "PARENT_CODE" VARCHAR(50) NOT NULL, "SORT_INDEX" INTEGER(8), "CREATOR_ID" VARCHAR(50), "CREATE_TIME" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, "DATA_STATE" INTEGER(10) NOT NULL DEFAULT 1, CONSTRAINT "TEST_DEPT_CORE_PK" PRIMARY KEY ("ID"), CONSTRAINT "TEST_DEPT_CORE_CODE" UNIQUE ("TENANT_CODE", "DEPT_CODE", "DATA_STATE"), CONSTRAINT "TEST_DEPT_CORE_NAME" UNIQUE ("TENANT_CODE", "PARENT_CODE", "DEPT_NAME", "DATA_STATE") );
alter table EMAILTEMPLATES_EMAIL_TEMPLATE add ( EMAIL_BODY_REPORT_ID varchar2(32) ) ^ alter table EMAILTEMPLATES_EMAIL_TEMPLATE add ( HTML clob ) ^ alter table EMAILTEMPLATES_EMAIL_TEMPLATE add ( REPORT_XML clob ) ^
<filename>src/main/sql/CollaborativeFiltering/ItemBasedCF/Calculate_Item_Item_Similarity.sql insert into ITEM_ITEM_SIMILARITY with target_log_data as ( select * from SHOPPING_LOG where LOG_DATE >= '${CALCULATE_START_DATE}' ), user_purchased_item_cnt as ( select USER_ID, count(distinct ITEM_ID) CNT from target_log_data group by USER_ID ), item_be_purchased_user_cnt as ( select ITEM_ID, count(distinct USER_ID) CNT from target_log_data group by ITEM_ID ), temp_similarity as ( select ITEM_ID, SIM_ITEM_ID, count(distinct USER_ID) as ITEM_COMMON_UU, sum(USER_LOG_VALUE) as TOTAL_USER_LOG_VALUE from ( select A.ITEM_ID, B.ITEM_ID as SIM_ITEM_ID, A.USER_ID, CAST(1 AS DECIMAL) / log(1 + CNT) as USER_LOG_VALUE from target_log_data as A join target_log_data as B on (A.ITEM_ID != B.ITEM_ID and A.USER_ID = B.USER_ID) join user_purchased_item_cnt upi_cnt on A.USER_ID = upi_cnt.USER_ID ) as item_log group by ITEM_ID, SIM_ITEM_ID ) select temp.ITEM_ID, SIM_ITEM_ID, item_cnt.CNT as ITEM_UU, sim_item_cnt.CNT as SIM_ITEM_UU, ITEM_COMMON_UU, CAST(ITEM_COMMON_UU AS DECIMAL) / (item_cnt.CNT + sim_item_cnt.CNT - ITEM_COMMON_UU) as JACCARD, CAST(ITEM_COMMON_UU AS DECIMAL) / sqrt(item_cnt.CNT * sim_item_cnt.CNT) as COSINE, CAST(ITEM_COMMON_UU AS DECIMAL) / case when item_cnt.CNT < sim_item_cnt.CNT then item_cnt.CNT else sim_item_cnt.CNT end as SIMPSON, CAST(ITEM_COMMON_UU AS DECIMAL) / item_cnt.CNT as CONFIDENCE, CAST(TOTAL_USER_LOG_VALUE as DECIMAL) / sqrt(item_cnt.CNT * sim_item_cnt.CNT) as IMPROVE from temp_similarity as temp join item_be_purchased_user_cnt as item_cnt on (temp.ITEM_ID = item_cnt.ITEM_ID) join item_be_purchased_user_cnt as sim_item_cnt on (temp.SIM_ITEM_ID = sim_item_cnt.ITEM_ID) order by ITEM_ID, SIM_ITEM_ID
ALTER TABLE `forms` CHANGE `sort_order` `sort_order` INT(11) NOT NULL DEFAULT '0';
CREATE INDEX author_addon_idx ON personas (author, addon_id);
-- @testpoint:opengauss关键字nologging(非保留),自定义数据类型名为explain --关键字explain作为数据类型不带引号,创建成功 drop type if exists nologging; CREATE TYPE nologging AS (f1 int, f2 text); select typname from pg_type where typname ='nologging'; drop type nologging; --关键字explain作为数据类型加双引号,创建成功 drop type if exists "nologging"; CREATE TYPE "nologging" AS (f1 int, f2 text); select typname from pg_type where typname ='nologging'; drop type "nologging"; --关键字explain作为数据类型加单引号,合理报错 drop type if exists 'nologging'; CREATE TYPE 'nologging' AS (f1 int, f2 text); select * from pg_type where typname ='nologging'; drop type 'nologging'; --关键字explain作为数据类型加反引号,合理报错 drop type if exists `nologging`; CREATE TYPE `nologging` AS (f1 int, f2 text); select * from pg_type where typname =`nologging`; drop type `nologging`;
<filename>openGaussBase/testcase/KEYWORDS/Current_Path/Opengauss_Function_Keyword_Current_Path_Case0029.sql<gh_stars>0 -- @testpoint:opengauss关键字current_path(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists current_path; CREATE TABLESPACE current_path RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; --关键字带双引号,创建成功 drop tablespace if exists "current_path"; CREATE TABLESPACE "current_path" RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace "current_path"; --关键字带单引号,合理报错 drop tablespace if exists 'current_path'; CREATE TABLESPACE 'current_path' RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; --关键字带反引号,合理报错 drop tablespace if exists `current_path`; CREATE TABLESPACE `current_path` RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1';
# # Lab 1 - DB Seed Script # use travelbuddy; DROP TABLE IF EXISTS `flightspecial`; CREATE TABLE `flightspecial` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `header` varchar(255) NOT NULL DEFAULT '', `body` varchar(255) DEFAULT NULL, `origin` varchar(255) DEFAULT NULL, `originCode` varchar(6) DEFAULT NULL, `destination` varchar(255) DEFAULT NULL, `destinationCode` varchar(6) DEFAULT NULL, `cost` int(11) NOT NULL, `expiryDate` bigint(16) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 200), 'London to Prague', 'Jewel of the East', 'London', 'LHR', 'Paris', 'CDG' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 200), 'Paris to London', 'Weekend getaway!', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 200), 'Dubai to Cairo', 'Middle East adventure', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 500), 'Melbourne to Hawaii', 'Escape to the sun this winter', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 200), 'Buenos Aires to Rio', 'Time to carnivale!', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 500), 'Sydney to Rome', 'An Italian classic', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 500), 'Melbourne to Sydney', 'Well trodden path', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 500), 'Hong Kong to Kuala Lumpur', 'Hop step and a jump', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 500), 'Lisbon to Madrid', 'Spanish adventure', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 500), 'Aswan to Cairo', 'An experience of a lifetime', 'Origin', 'ORG', 'Destination', 'DST' ); INSERT INTO `flightspecial` (`expiryDate`, `cost`, `header`, `body`, `origin`, `originCode`, `destination`, `destinationCode`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 500), 'New York to London', 'Trans-Atlantic', 'Origin', 'ORG', 'Destination', 'DST' ); #--------------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------- DROP TABLE IF EXISTS `hotelspecial`; CREATE TABLE `hotelspecial` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `hotel` varchar(255) NOT NULL DEFAULT '', `description` varchar(255) DEFAULT NULL, `location` varchar(255) DEFAULT NULL, `cost` int(11) NOT NULL, `expiryDate` bigint(16) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Sommerset Hotel', 'Minimum stay 3 nights', 'Sydney' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Freedmom Apartments', 'Pets allowed!', 'Sydney' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Studio City', 'Minimum stay one week', 'Los Angeles' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Le Fleur Hotel', 'Not available weekends', 'Los Angeles' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Classic Hotel', 'Includes breakfast', 'Dallas' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Groundhog Suites', 'Internet access included', 'Florida' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Sophmore Suites', 'Maximum 2 people per room', 'London' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Hotel Sandra', 'Minimum stay two nights', 'Cairo' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Apartamentos de Nestor', 'Pool and spa access included', 'Madrid' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'Kangaroo Hotel', 'Maximum 2 people per room', 'Manchester' ); INSERT INTO `hotelspecial` (`expiryDate`, `cost`, `hotel`, `description`, `location`) VALUES ( (SELECT (UNIX_TIMESTAMP() * 1000)) + 79200 + (RAND() * 20000000), (50 + RAND() * 1000), 'EasyStay Apartments', 'Minimum stay one week', 'Melbourne' );
SELECT lastName, party, votes FROM ge WHERE constituency = 'S14000024' AND yr = 2017 ORDER BY votes DESC; SELECT party, votes, RANK() OVER (ORDER BY votes DESC) as posn FROM ge WHERE constituency = 'S14000024' AND yr = 2017 ORDER BY party; SELECT yr,party, votes, RANK() OVER (PARTITION BY yr ORDER BY votes DESC) as posn FROM ge WHERE constituency = 'S14000021' ORDER BY party,yr; SELECT constituency,party, votes, RANK() OVER (PARTITION BY constituency ORDER BY votes DESC) as posn FROM ge WHERE constituency BETWEEN 'S14000021' AND 'S14000026' AND yr = 2017 ORDER BY posn, constituency, votes DESC; SELECT constituency,party FROM ge x WHERE constituency BETWEEN 'S14000021' AND 'S14000026' AND yr = 2017 AND votes >= ALL (SELECT votes FROM ge y WHERE x.constituency = y.constituency AND yr = 2017) ORDER BY constituency;
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 28 Bulan Mei 2020 pada 02.23 -- Versi server: 10.1.30-MariaDB -- Versi PHP: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `laporan_karyawan` -- -- -------------------------------------------------------- -- -- Struktur dari tabel `kota` -- CREATE TABLE `kota` ( `id_kota` int(11) NOT NULL, `nama_kota` varchar(100) NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `deleted_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `kota` -- INSERT INTO `kota` (`id_kota`, `nama_kota`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 'Purwokerto', '2020-05-13 01:03:35', '2020-05-13 01:42:08', NULL), (2, 'Ajibarang', '2020-05-13 01:03:35', '2020-05-13 01:06:31', NULL), (3, 'Banyumas', '2020-05-13 01:18:48', '2020-05-13 01:18:48', NULL), (4, 'Anjay', '2020-05-13 01:19:07', '2020-05-13 01:28:13', '2020-05-13 01:28:13'); -- -------------------------------------------------------- -- -- Struktur dari tabel `laporanbulanan` -- CREATE TABLE `laporanbulanan` ( `id_laporanbulanan` int(11) NOT NULL, `id_user` int(1) NOT NULL, `isi_laporanbulanan` text NOT NULL, `status_laporanbulanan` int(1) NOT NULL DEFAULT '1' COMMENT '1 = BELUM | 2 = DITERIMA | 3 = DITOLAK', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `deleted_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `laporanbulanan` -- INSERT INTO `laporanbulanan` (`id_laporanbulanan`, `id_user`, `isi_laporanbulanan`, `status_laporanbulanan`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 1, 'Mantap Mantap yuhuuu!!', 3, '2020-03-13 03:27:24', '2020-05-28 07:11:45', NULL), (2, 2, 'Mantap Mantap yuhuuu!!', 1, '2020-05-13 03:27:24', '2020-05-13 03:27:24', NULL), (3, 1, 'Mantap Mantap yuhuuu!!', 3, '2020-04-13 03:27:24', '2020-05-28 07:03:10', NULL), (4, 1, 'Laporan bulanan mantap mantappp aw', 3, '2020-05-28 07:03:40', '2020-05-28 07:11:54', NULL); -- -------------------------------------------------------- -- -- Struktur dari tabel `laporanharian` -- CREATE TABLE `laporanharian` ( `id_laporanharian` int(11) NOT NULL, `id_user` int(11) NOT NULL, `id_outlet` int(11) NOT NULL, `alamat_laporanharian` text NOT NULL, `latitude_laporanharian` double NOT NULL, `longitude_laporanharian` double NOT NULL, `keterangan_laporanharian` text NOT NULL, `bukti_laporanharian` text NOT NULL COMMENT 'Foto', `status_laporanharian` int(1) NOT NULL DEFAULT '1' COMMENT '1 = BELUM | 2 = DITERIMA | 3 = DITOLAK', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `deleted_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `laporanharian` -- INSERT INTO `laporanharian` (`id_laporanharian`, `id_user`, `id_outlet`, `alamat_laporanharian`, `latitude_laporanharian`, `longitude_laporanharian`, `keterangan_laporanharian`, `bukti_laporanharian`, `status_laporanharian`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 1, 1, 'Jalan Mantap Mantap', -7.446613, 109.313346, 'Laporan Mantap Mantap dong', 'rafly.jpg', 1, '2020-05-13 02:16:18', '2020-05-28 07:22:38', NULL), (2, 1, 5, 'Jalan Mantap Mantap Skuy', -7.446613, 109.313346, 'Laporan Mantap Mantap heheheheheh', 'rafly.jpg', 2, '2020-05-13 02:16:18', '2020-05-13 06:19:02', NULL), (3, 1, 1, 'Klahang mantap', 123, 321, 'Aw mantap mantapp', 'rafly.jpg', 3, '2020-05-13 03:02:24', '2020-05-13 06:19:50', NULL), (4, 2, 1, 'Klahang mantap', 123, 321, 'Aw mantap mantapp', 'rafly.jpg', 1, '2020-05-13 06:30:33', '2020-05-13 06:30:33', NULL); -- -------------------------------------------------------- -- -- Struktur dari tabel `outlet` -- CREATE TABLE `outlet` ( `id_outlet` int(11) NOT NULL, `id_kota` int(11) NOT NULL, `nama_outlet` varchar(100) NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `deleted_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `outlet` -- INSERT INTO `outlet` (`id_outlet`, `id_kota`, `nama_outlet`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 1, 'Outlet Rafli', '2020-05-13 01:31:55', '2020-05-13 01:31:55', NULL), (2, 1, 'Outlet Senia', '2020-05-13 01:31:55', '2020-05-13 01:31:55', NULL), (3, 2, 'Outlet Untung', '2020-05-13 01:32:27', '2020-05-13 01:32:27', NULL), (4, 2, 'Outlet Trian', '2020-05-13 01:32:27', '2020-05-13 01:32:27', NULL), (5, 1, 'Outlet Anjay', '2020-05-13 01:41:41', '2020-05-13 01:41:41', NULL), (6, 2, 'Outlet Keren aw', '2020-05-13 01:42:01', '2020-05-13 01:57:16', '2020-05-13 01:57:16'), (8, 2, 'Outlet Mantap', '2020-05-13 01:43:06', '2020-05-13 01:43:06', NULL); -- -------------------------------------------------------- -- -- Struktur dari tabel `rest_logs` -- CREATE TABLE `rest_logs` ( `id` int(11) NOT NULL, `uri` varchar(255) NOT NULL, `method` varchar(6) NOT NULL, `params` text, `api_key` varchar(40) NOT NULL, `ip_address` varchar(45) NOT NULL, `time` int(11) NOT NULL, `rtime` float DEFAULT NULL, `authorized` varchar(1) NOT NULL, `response_code` smallint(3) DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data untuk tabel `rest_logs` -- INSERT INTO `rest_logs` (`id`, `uri`, `method`, `params`, `api_key`, `ip_address`, `time`, `rtime`, `authorized`, `response_code`) VALUES (1, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"171\",\"Cookie\":\"ci_session=smdnt1lci2ikj28golducnodiu144cfr\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"123123123\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300299, 0.267672, '1', 0), (2, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"171\",\"Cookie\":\"ci_session=smdnt1lci2ikj28golducnodiu144cfr\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300344, 0.0384481, '1', 200), (3, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"171\",\"Cookie\":\"ci_session=smdnt1lci2ikj28golducnodiu144cfr\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300354, 0.043231, '1', 0), (4, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"e<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"171\",\"Cookie\":\"ci_session=smdnt1lci2ikj28golducnodiu144cfr\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300415, 0.0483, '1', 0), (5, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"171\",\"Cookie\":\"ci_session=i5o3tbs38bf7elu9uan8huiirgk2hfon\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300425, NULL, '1', 0), (6, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"171\",\"Cookie\":\"ci_session=i5o3tbs38bf7elu9uan8huiirgk2hfon\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300484, 0.0399439, '1', 200), (7, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"171\",\"Cookie\":\"ci_session=i5o3tbs38bf7elu9uan8huiirgk2hfon\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300590, 0.0413752, '1', 200), (8, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"177\",\"Cookie\":\"ci_session=i5o3tbs38bf7elu9uan8huiirgk2hfon\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"123<PASSWORD>3\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300896, NULL, '1', 0), (9, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"177\",\"Cookie\":\"ci_session=n2h1tc8sq316kab6m2l1ava9mema6497\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"1<PASSWORD>3\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300904, 0.0396991, '1', 200), (10, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"178\",\"Cookie\":\"ci_session=n2h1tc8sq316kab6m2l1ava9mema6497\",\"0\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"adminmantap1\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : 123123,\\n \\\"username_user\\\" : \\\"adminmantap1\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>23\\\",\\n \\\"nama_user\\\" : \\\"Admin Mantap\\\",\\n \\\"foto_user\\\" : \\\"rafly.jpg\\\",\\n \\\"level_user\\\" : 2\\n}\"}', '', '::1', 1589300974, 0.042697, '1', 200), (11, 'v1/auth/register', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"116\",\"Cookie\":\"ci_session=n2h1tc8sq316kab6m2l1ava9mema6497\",\"0\":\"{\\n \\\"username_user\\\" : \\\"user\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\",\\n \\\"nama_user\\\" : \\\"User Mantap\\\",\\n \\\"level_user\\\" : 1\\n}\",\"1\":\"{\\n \\\"username_user\\\" : \\\"user\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\",\\n \\\"nama_user\\\" : \\\"User Mantap\\\",\\n \\\"level_user\\\" : 1\\n}\"}', '', '::1', 1589301008, 0.0369768, '1', 200), (12, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"60\",\"Cookie\":\"ci_session=n2h1tc8sq316kab6m2l1ava9mema6497\",\"0\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301426, 0.125032, '1', 200), (13, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"60\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\"\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"1<PASSWORD>23\\\"\\n}\"}', '', '::1', 1589301444, 0.0384378, '1', 200), (14, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"61\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\"\\n}\"}', '', '::1', 1589301448, 0.0407259, '1', 200), (15, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"60\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301455, 0.036751, '1', 200), (16, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"60\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301470, 0.0346551, '1', 200), (17, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"61\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301479, 0.378984, '1', 200), (18, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"66\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\n \\\"username_user\\\" : \\\"admin\\\"\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\"\\n}\",\"1\":\"{\\n \\n \\\"username_user\\\" : \\\"admin\\\"\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301503, 0.0342009, '1', 200), (19, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"67\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"123123123\\\"\\n}\"}', '', '::1', 1589301517, 0.0394361, '1', 200), (20, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"67\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301543, 0.0448501, '1', 200), (21, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"67\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"123123123\\\"\\n}\"}', '', '::1', 1589301554, 0.037478, '1', 200), (22, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"64\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"username_user\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301564, 0.037915, '1', 200), (23, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\\"username_nip\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"username_nip\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301661, 0.034394, '1', 200), (24, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"64\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\\"username_nip\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\"\\n}\",\"1\":\"{\\n \\\"username_nip\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\"\\n}\"}', '', '::1', 1589301674, 0.038543, '1', 200), (25, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"38\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\"\\n}\"}', '', '::1', 1589301686, 0.0363779, '1', 200), (26, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=f8b3dje7g3lcl2tn41b421nm0cctp6aa\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589301785, 0.039305, '1', 200), (27, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589301793, 0.0406721, '1', 200), (28, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589301823, 0.036917, '1', 200), (29, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589301845, 0.0350671, '1', 200), (30, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"64\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\\"username_nip\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"123123123\\\"\\n}\",\"1\":\"{\\n \\\"username_nip\\\" : \\\"123456\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301863, 0.0415561, '1', 200), (31, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\\"username_nip\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"username_nip\\\" : \\\"admin\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>23123\\\"\\n}\"}', '', '::1', 1589301875, 0.0388708, '1', 200), (32, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"69\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\\"username_nip\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"username_nip\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\"}', '', '::1', 1589301895, 0.035737, '1', 200), (33, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"69\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\\"username_nip\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"username_nip\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"123123123\\\"\\n}\"}', '', '::1', 1589301912, 0.0405478, '1', 200), (34, 'v1/auth/login', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"69\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\\"username_nip\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>\\\"\\n}\",\"1\":\"{\\n \\\"username_nip\\\" : \\\"adminmantap\\\",\\n \\\"password_user\\\" : \\\"<PASSWORD>3\\\"\\n}\"}', '', '::1', 1589301965, 0.038717, '1', 200), (35, 'v1/user', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=no7r667a2kk8r39gfek1eisl1bofsbbn\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589304137, 0.039587, '1', 200), (36, 'v1/user', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=bfc94omctqr4iakp2hulmshbqq2klajm\",\"0\":\"{\\n \\\"id_user\\\" : 1\\n}\",\"1\":\"{\\n \\\"id_user\\\" : 1\\n}\"}', '', '::1', 1589304155, NULL, '1', 0), (37, 'v1/user', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=bfc94omctqr4iakp2hulmshbqq2klajm\",\"0\":\"{\\n \\\"id_user\\\" : 1\\n}\",\"1\":\"{\\n \\\"id_user\\\" : 1\\n}\"}', '', '::1', 1589304191, 0.0343192, '1', 200), (38, 'v1/user', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=bfc94omctqr4iakp2hulmshbqq2klajm\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589304213, 0.036679, '1', 200), (39, 'v1/user', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=bfc94omctqr4iakp2hulmshbqq2klajm\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589304300, 0.0365431, '1', 200), (40, 'v1/user', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=bfc94omctqr4iakp2hulmshbqq2klajm\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589304330, 0.0344031, '1', 200), (41, 'v1/user', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=bfc94omctqr4iakp2hulmshbqq2klajm\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589304348, 0.0316961, '1', 200), (42, 'v1/user', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=bfc94omctqr4iakp2hulmshbqq2klajm\",\"0\":\"{\\n \\n}\",\"1\":\"{\\n \\n}\"}', '', '::1', 1589304360, 0.038281, '1', 200), (43, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=bfc94omctqr4iakp2hulmshbqq2klajm\",\"0\":\"{\\n\\t\\\"id_user\\\" : 1\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"nama_user\\\" : \\\"<NAME>eng\\\",\\n \\\"foto_user\\\" : \\\"aw.jpg\\\"\\n}\",\"1\":\"{\\n\\t\\\"id_user\\\" : 1\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"nama_user\\\" : \\\"R<NAME>anteng\\\",\\n \\\"foto_user\\\" : \\\"aw.jpg\\\"\\n}\"}', '', '::1', 1589305231, 0.0411868, '1', 200), (44, 'v1/user/update_profile', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"cf<PASSWORD>-ba<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=h4vgs0h2knsctmcq5qu2bq8pt38kp4gp\",\"0\":\"{\\n\\t\\\"id_user\\\" : 1\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"nama_user\\\" : \\\"<NAME>\\\",\\n \\\"foto_user\\\" : \\\"aw.jpg\\\"\\n}\",\"1\":\"{\\n\\t\\\"id_user\\\" : 1\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"nama_user\\\" : \\\"R<NAME>\\\",\\n \\\"foto_user\\\" : \\\"aw.jpg\\\"\\n}\"}', '', '::1', 1589305264, 0.039947, '1', 200), (45, 'v1/user/update_profile', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=h4vgs0h2knsctmcq5qu2bq8pt38kp4gp\",\"0\":\"{\\n\\t\\\"id_user\\\" : 1\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"nama_user\\\" : \\\"Rafli ganteng\\\",\\n \\\"foto_user\\\" : \\\"aw.jpg\\\"\\n}\",\"1\":\"{\\n\\t\\\"id_user\\\" : 1\\n \\\"nip_user\\\" : \\\"123456\\\",\\n \\\"nama_user\\\" : \\\"Rafli ganteng\\\",\\n \\\"foto_user\\\" : \\\"aw.jpg\\\"\\n}\"}', '', '::1', 1589305286, 0.0398951, '1', 200), (46, 'v1/user/update_profile', 'post', '{\"Authorization\":\"Basic <KEY>5YXdhbk1hbnRhcA==\",\"Content-Type\":\"text\\/plain\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"102\",\"Cookie\":\"ci_session=h4vgs0h2knsctmcq5qu2bq8pt38kp4gp\",\"0\":\"{\\n\\t\\\"id_user\\\" : \\\"1\\\"\\n\\t\\\"nip_user\\\" : \\\"123456\\\",\\n\\t\\\"nama_user\\\" : \\\"Rafli ganteng\\\",\\n\\t\\\"foto_user\\\" : \\\"aw.jpg\\\"\\n}\",\"1\":\"{\\n\\t\\\"id_user\\\" : \\\"1\\\"\\n\\t\\\"nip_user\\\" : \\\"123456\\\",\\n\\t\\\"nama_user\\\" : \\\"Rafli ganteng\\\",\\n\\t\\\"foto_user\\\" : \\\"aw.jpg\\\"\\n}\"}', '', '::1', 1589305329, 0.0378871, '1', 200), (47, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"102\",\"Cookie\":\"ci_session=h4vgs0h2knsctmcq5qu2bq8pt38kp4gp\"}', '', '::1', 1589305427, 0.039221, '1', 200), (48, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"102\",\"Cookie\":\"ci_session=h4vgs0h2knsctmcq5qu2bq8pt38kp4gp\"}', '', '::1', 1589305453, 0.0460289, '1', 0), (49, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"102\",\"Cookie\":\"ci_session=h4vgs0h2knsctmcq5qu2bq8pt38kp4gp\"}', '', '::1', 1589305467, 0.0387111, '1', 0), (50, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"87\",\"Cookie\":\"ci_session=h4vgs0h2knsctmcq5qu2bq8pt38kp4gp\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305481, 0.0404091, '1', 0), (51, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>feee-6765-4c0e-b301-0116b72ed175\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"102\",\"Cookie\":\"ci_session=h4vgs0h2knsctmcq5qu2bq8pt38kp4gp\"}', '', '::1', 1589305547, 0.0297589, '1', 200), (52, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"102\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\"}', '', '::1', 1589305561, 0.0365019, '1', 200), (53, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"102\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\"}', '', '::1', 1589305579, 0.033747, '1', 200), (54, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"102\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\"}', '', '::1', 1589305585, 0.0373631, '1', 200), (55, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305614, 0.047868, '1', 0), (56, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305645, 0.04092, '1', 0), (57, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305655, 0.0372369, '1', 200), (58, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305672, 0.052052, '1', 200), (59, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305688, 0.0409172, '1', 200), (60, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123123\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305696, 0.0427592, '1', 200), (61, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>3790a\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305703, 0.042551, '1', 200), (62, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305739, 0.0411558, '1', 200), (63, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>-c317-439b-bf77-474d684ba840\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305740, 0.039175, '1', 200), (64, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305746, 0.0404792, '1', 200), (65, 'v1/user/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589305758, 0.0340469, '1', 200), (66, 'v1/user/password', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"87\",\"Cookie\":\"ci_session=u3gftl94rumgoqngeno7okbqn8lv781o\"}', '', '::1', 1589306198, 0.0389841, '1', 200), (67, 'v1/user/update_password', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"87\",\"Cookie\":\"ci_session=uk0d8bq4thirucmle75ltalml7s014ld\"}', '', '::1', 1589306232, 0.0380449, '1', 200), (68, 'v1/user/update_password', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"87\",\"Cookie\":\"ci_session=uk0d8bq4thirucmle75ltalml7s014ld\"}', '', '::1', 1589306269, 0.039377, '1', 200), (69, 'v1/user/update_password', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=uk0d8bq4thirucmle75ltalml7s014ld\",\"id_user\":1,\"password_lama\":\"<PASSWORD>\",\"password_baru\":\"<PASSWORD>\"}', '', '::1', 1589306327, 0.0391619, '1', 200); INSERT INTO `rest_logs` (`id`, `uri`, `method`, `params`, `api_key`, `ip_address`, `time`, `rtime`, `authorized`, `response_code`) VALUES (70, 'v1/user/update_password', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=uk0d8bq4thirucmle75ltalml7s014ld\",\"id_user\":1,\"password_lama\":\"<PASSWORD>\",\"password_baru\":\"<PASSWORD>\"}', '', '::1', 1589306337, 0.0265, '1', 200), (71, 'v1/user/update_password', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=uk0d8bq4thirucmle75ltalml7s014ld\",\"id_user\":1,\"password_lama\":\"<PASSWORD>\",\"password_<PASSWORD>u\":\"<PASSWORD>\"}', '', '::1', 1589306347, 0.037004, '1', 200), (72, 'v1/user/update_password', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=uk0d8bq4thirucmle75ltalml7s014ld\",\"id_user\":1,\"password_lama\":\"<PASSWORD>\",\"password_<PASSWORD>u\":\"<PASSWORD>\"}', '', '::1', 1589306354, 0.036777, '1', 200), (73, 'v1/user/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=uk0d8bq4thirucmle75ltalml7s014ld\"}', '', '::1', 1589306507, 0.0430989, '1', 200), (74, 'v1/user/update_data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"103\",\"Cookie\":\"ci_session=o4t2hht8u6tbo6lpd04qdd8cpbc38o8e\",\"id_user\":\"1\",\"nip_user\":\"123456\",\"nama_user\":\"<NAME>\",\"foto_user\":\"aw.jpg\"}', '', '::1', 1589306545, 0.038892, '1', 200), (75, 'v1/kota/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=o4t2hht8u6tbo6lpd04qdd8cpbc38o8e\"}', '', '::1', 1589306758, 0.0481238, '1', 200), (76, 'v1/kota/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=o4t2hht8u6tbo6lpd04qdd8cpbc38o8e\"}', '', '::1', 1589306774, 0.0358372, '1', 200), (77, 'v1/kota/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>-fef4a1c7539e\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=o4t2hht8u6tbo6lpd04qdd8cpbc38o8e\"}', '', '::1', 1589306785, 0.0426171, '1', 200), (78, 'v1/kota/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"3<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=o4t2hht8u6tbo6lpd04qdd8cpbc38o8e\"}', '', '::1', 1589306795, 0.0338151, '1', 200), (79, 'v1/kota/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"9<PASSWORD>-<PASSWORD>-<PASSWORD>-<PASSWORD>-<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=o4t2hht8u6tbo6lpd04qdd8cpbc38o8e\"}', '', '::1', 1589306853, 0.0453229, '1', 200), (80, 'v1/kota/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=0291n2m7dkboinleie61dcu1vadbv6jm\",\"id_kota\":1}', '', '::1', 1589306862, 0.0346441, '1', 200), (81, 'v1/user/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"5\",\"Cookie\":\"ci_session=0291n2m7dkboinleie61dcu1vadbv6jm\"}', '', '::1', 1589307184, 0.040962, '1', 200), (82, 'v1/user/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"5\",\"Cookie\":\"ci_session=m4iat8meptqf62srr96c4ls6oc4fqsbd\"}', '', '::1', 1589307224, 0.0383158, '1', 200), (83, 'v1/user/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=m4iat8meptqf62srr96c4ls6oc4fqsbd\"}', '', '::1', 1589307228, 0.03702, '1', 200), (84, 'v1/user/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=m4iat8meptqf62srr96c4ls6oc4fqsbd\",\"id_user\":1}', '', '::1', 1589307241, 0.036773, '1', 200), (85, 'v1/user/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=m4iat8meptqf62srr96c4ls6oc4fqsbd\",\"id_user\":1}', '', '::1', 1589307251, 0.0417061, '1', 200), (86, 'v1/user/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=m4iat8meptqf62srr96c4ls6oc4fqsbd\",\"id_user\":3}', '', '::1', 1589307263, 0.0345149, '1', 200), (87, 'v1/user/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=m4iat8meptqf62srr96c4ls6oc4fqsbd\",\"id_user\":1}', '', '::1', 1589307268, 0.0299401, '1', 200), (88, 'v1/kota/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>5e6-9aab-91d5cefb2819\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=m4iat8meptqf62srr96c4ls6oc4fqsbd\"}', '', '::1', 1589307515, 0.0487952, '1', 200), (89, 'v1/kota/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"30\",\"Cookie\":\"ci_session=37lu1ft417tvsvidj8qor5h0f288s6r1\",\"nama_kota\":\"Banyumas\"}', '', '::1', 1589307528, NULL, '1', 0), (90, 'v1/kota/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"292ccec9-e4f4-4141-be2b-7935f74cdb7e\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"30\",\"Cookie\":\"ci_session=37lu1ft417tvsvidj8qor5h0f288s6r1\",\"nama_kota\":\"Banyumas\"}', '', '::1', 1589307547, 0.034961, '1', 200), (91, 'v1/kota/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"50\",\"Cookie\":\"ci_session=37lu1ft417tvsvidj8qor5h0f288s6r1\",\"id_kota\":4,\"nama_kota\":\"Banyumasssss\"}', '', '::1', 1589307760, 0.042887, '1', 200), (92, 'v1/kota/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"51\",\"Cookie\":\"ci_session=37lu1ft417tvsvidj8qor5h0f288s6r1\",\"id_kota\":41,\"nama_kota\":\"Banyumasssss\"}', '', '::1', 1589307773, 0.0384111, '1', 200), (93, 'v1/kota/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"43\",\"Cookie\":\"ci_session=37lu1ft417tvsvidj8qor5h0f288s6r1\",\"id_kota\":4,\"nama_kota\":\"Anjay\"}', '', '::1', 1589307938, 0.0468791, '1', 200), (94, 'v1/kota/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"44\",\"Cookie\":\"ci_session=mbtppl9mevuf9tvgc3ur8gebg1ens6in\",\"id_kota\":42,\"nama_kota\":\"Anjay\"}', '', '::1', 1589307945, 0.038311, '1', 200), (95, 'v1/kota/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"43\",\"Cookie\":\"ci_session=mbtppl9mevuf9tvgc3ur8gebg1ens6in\",\"id_kota\":4,\"nama_kota\":\"Anjay\"}', '', '::1', 1589307954, 0.040813, '1', 200), (96, 'v1/kota/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=mbtppl9mevuf9tvgc3ur8gebg1ens6in\",\"id_kota\":4}', '', '::1', 1589308093, 0.0422361, '1', 200), (97, 'v1/kota/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=mbtppl9mevuf9tvgc3ur8gebg1ens6in\",\"id_kota\":4}', '', '::1', 1589308102, 0.0491252, '1', 200), (98, 'v1/kota/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=mbtppl9mevuf9tvgc3ur8gebg1ens6in\",\"id_kota\":1}', '', '::1', 1589308172, 0.0285809, '1', 200), (99, 'v1/kota/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=mbtppl9mevuf9tvgc3ur8gebg1ens6in\"}', '', '::1', 1589308177, 0.0469568, '1', 200), (100, 'v1/outlet/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=mbtppl9mevuf9tvgc3ur8gebg1ens6in\"}', '', '::1', 1589308623, 0.488968, '1', 200), (101, 'v1/outlet/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>4-4872-40fd-acd1-cdec3dbe2a47\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=44v8hcjb0a8ed1d1kl9npglmoandvfkp\",\"id_kota\":1}', '', '::1', 1589308648, 0.0441048, '1', 200), (102, 'v1/outlet/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"21\",\"Cookie\":\"ci_session=44v8hcjb0a8ed1d1kl9npglmoandvfkp\",\"id_outlet\":1}', '', '::1', 1589308659, 0.0482409, '1', 200), (103, 'v1/outlet/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"21\",\"Cookie\":\"ci_session=44v8hcjb0a8ed1d1kl9npglmoandvfkp\",\"id_outlet\":1}', '', '::1', 1589308676, 0.0526741, '1', 200), (104, 'v1/outlet/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"3<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"21\",\"Cookie\":\"ci_session=44v8hcjb0a8ed1d1kl9npglmoandvfkp\",\"id_outlet\":1}', '', '::1', 1589308689, 0.0429289, '1', 200), (105, 'v1/outlet/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"6<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=44v8hcjb0a8ed1d1kl9npglmoandvfkp\",\"id_kota\":5}', '', '::1', 1589308718, 0.038614, '1', 200), (106, 'v1/outlet/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"53\",\"Cookie\":\"ci_session=44v8hcjb0a8ed1d1kl9npglmoandvfkp\",\"id_kota\":1,\"nama_outlet\":\"Outlet Anjay\"}', '', '::1', 1589308901, 0.040848, '1', 200), (107, 'v1/outlet/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"53\",\"Cookie\":\"ci_session=44v8hcjb0a8ed1d1kl9npglmoandvfkp\",\"id_kota\":1,\"nama_outlet\":\"Outlet Anjay\"}', '', '::1', 1589308921, 0.042953, '1', 200), (108, 'v1/outlet/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"54\",\"Cookie\":\"ci_session=44v8hcjb0a8ed1d1kl9npglmoandvfkp\",\"id_kota\":20,\"nama_outlet\":\"Outlet Anjay\"}', '', '::1', 1589308953, 0.146985, '1', 200), (109, 'v1/outlet/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"39\",\"Cookie\":\"ci_session=ienl4r246sc3rhscpl6i2b9muo2p501o\",\"nama_outlet\":\"Outlet Anjay\"}', '', '::1', 1589308973, 0.025929, '1', 200), (110, 'v1/outlet/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"54\",\"Cookie\":\"ci_session=ienl4r246sc3rhscpl6i2b9muo2p501o\",\"id_kota\":2,\"nama_outlet\":\"Outlet Mantap\"}', '', '::1', 1589308985, 0.0434921, '1', 200), (111, 'v1/outlet/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=ienl4r246sc3rhscpl6i2b9muo2p501o\",\"id_kota\":1}', '', '::1', 1589309596, 0.0418048, '1', 200), (112, 'v1/outlet/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"76\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":6,\"id_kota\":1,\"nama_outlet\":\"Outlet Keren hehe\"}', '', '::1', 1589309628, 0.037761, '1', 200), (113, 'v1/outlet/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"76\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":6,\"id_kota\":1,\"nama_outlet\":\"Outlet Keren hehe\"}', '', '::1', 1589309642, 0.0486701, '1', 200), (114, 'v1/outlet/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"76\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":7,\"id_kota\":1,\"nama_outlet\":\"Outlet Keren hehe\"}', '', '::1', 1589309657, 0.034997, '1', 200), (115, 'v1/outlet/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"76\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":7,\"id_kota\":5,\"nama_outlet\":\"Outlet Keren hehe\"}', '', '::1', 1589309666, 0.038161, '1', 200), (116, 'v1/outlet/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"76\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":6,\"id_kota\":5,\"nama_outlet\":\"Outlet Keren hehe\"}', '', '::1', 1589309671, 0.0427101, '1', 200), (117, 'v1/outlet/update', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"74\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":6,\"id_kota\":2,\"nama_outlet\":\"Outlet Keren aw\"}', '', '::1', 1589309685, 0.399874, '1', 200), (118, 'v1/outlet/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"74\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":6,\"id_kota\":2,\"nama_outlet\":\"Outlet Keren aw\"}', '', '::1', 1589309805, 0.04164, '1', 200), (119, 'v1/outlet/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":7}', '', '::1', 1589309830, 0.037282, '1', 200), (120, 'v1/outlet/delete', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\",\"id_outlet\":6}', '', '::1', 1589309836, 0.031786, '1', 200), (121, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=glvsce2p8nnqp6ndm204bdfsclh87fm8\"}', '', '::1', 1589312753, 0.394243, '1', 200), (122, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\"}', '', '::1', 1589312759, 0.0447171, '1', 200), (123, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5}', '', '::1', 1589312789, 0.443139, '1', 200), (124, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>6a-4313-b853-aef4258f2277\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"89\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_laporanharian\":1}', '', '::1', 1589312820, 0.438547, '1', 200), (125, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_user\":1}', '', '::1', 1589312837, 0.0807459, '1', 200), (126, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_user\":2}', '', '::1', 1589312886, 0.0513771, '1', 200), (127, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_user\":1}', '', '::1', 1589312891, 0.087224, '1', 200), (128, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":4,\"id_user\":1}', '', '::1', 1589312897, 0.045887, '1', 200), (129, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":4,\"id_user\":1}', '', '::1', 1589312904, 0.0672691, '1', 200), (130, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":4,\"id_user\":1}', '', '::1', 1589312914, 0.0431371, '1', 200), (131, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_outlet\":1}', '', '::1', 1589312935, 0.0777152, '1', 200), (132, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_outlet\":5}', '', '::1', 1589312944, 0.438163, '1', 200), (133, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_outlet\":1}', '', '::1', 1589312956, 0.387307, '1', 200), (134, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_outlet\":1}', '', '::1', 1589312986, 0.0751519, '1', 200), (135, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=1h9v4b422m8pr97bmdc77c4ip1cg69dn\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_outlet\":1}', '', '::1', 1589313118, 0.094795, '1', 200), (136, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"82\",\"Cookie\":\"ci_session=l8uaemo0h5lv2oc0dctc2gnmf58ffbud\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_outlet\":1}', '', '::1', 1589313586, 0.049541, '1', 200), (137, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=48njot5vbuled4qh37jv18skc0vcnrlf\"}', '', '::1', 1589313596, 0.0682778, '1', 200), (138, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=48njot5vbuled4qh37jv18skc0vcnrlf\",\"id_user\":1}', '', '::1', 1589313640, 0.045501, '1', 200), (139, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"38\",\"Cookie\":\"ci_session=48njot5vbuled4qh37jv18skc0vcnrlf\",\"id_user\":1,\"id_outlet\":1}', '', '::1', 1589313654, 0.0375841, '1', 200), (140, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"84\",\"Cookie\":\"ci_session=48njot5vbuled4qh37jv18skc0vcnrlf\"}', '', '::1', 1589313677, 0.0437171, '1', 200), (141, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"83\",\"Cookie\":\"ci_session=48njot5vbuled4qh37jv18skc0vcnrlf\",\"id_user\":1,\"id_outlet\":1,\"alamat_laporanharian\":\"Klahang mantap\"}', '', '::1', 1589313688, 0.0328131, '1', 200), (142, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"243\",\"Cookie\":\"ci_session=48njot5vbuled4qh37jv18skc0vcnrlf\",\"id_user\":1,\"id_outlet\":1,\"alamat_laporanharian\":\"Klahang mantap\",\"latitude_laporanharian\":123,\"longitude_laporanharian\":321,\"keterangan_laporanharian\":\"Aw mantap mantapp\",\"bukti_laporanharian\":\"rafly.jpg\"}', '', '::1', 1589313744, 0.080183, '1', 200), (143, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"28\",\"Cookie\":\"ci_session=48njot5vbuled4qh37jv18skc0vcnrlf\",\"id_laporanharian\":1}', '', '::1', 1589314289, 0.0478981, '1', 200), (144, 'v1/laporanharian/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"28\",\"Cookie\":\"ci_session=pf30758ad22jvbt9e5ud7o1pp4cfj0t7\",\"id_laporanharian\":1}', '', '::1', 1589314296, 0.040091, '1', 200), (145, 'v1/laporanharian/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=pf30758ad22jvbt9e5ud7o1pp4cfj0t7\",\"id_laporanharian\":1,\"status_laporanharian\":3}', '', '::1', 1589314313, 0.05233, '1', 200), (146, 'v1/laporanharian/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=pf30758ad22jvbt9e5ud7o1pp4cfj0t7\",\"id_laporanharian\":4,\"status_laporanharian\":3}', '', '::1', 1589314324, 0.038703, '1', 200), (147, 'v1/laporanharian/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=pf30758ad22jvbt9e5ud7o1pp4cfj0t7\",\"id_laporanharian\":4,\"status_laporanharian\":1}', '', '::1', 1589314332, 0.0480781, '1', 200), (148, 'v1/laporanharian/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=pf30758ad22jvbt9e5ud7o1pp4cfj0t7\",\"id_laporanharian\":1,\"status_laporanharian\":1}', '', '::1', 1589314339, 0.0942459, '1', 200), (149, 'v1/outlet/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"19\",\"Cookie\":\"ci_session=pf30758ad22jvbt9e5ud7o1pp4cfj0t7\",\"id_kota\":5}', '', '::1', 1589315276, 0.0618062, '1', 200), (150, 'v1/outlet/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"6\",\"Cookie\":\"ci_session=uup8m8am0svkt882cq505c9hbi42tv19\"}', '', '::1', 1589315285, 0.0701389, '1', 200), (151, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"112\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"id_outlet\":1,\"status_laporanharian\":0}', '', '::1', 1589325057, 0.184084, '1', 200), (152, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"96\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"status_laporanharian\":0}', '', '::1', 1589325070, 0.11875, '1', 200), (153, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"96\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":5,\"status_laporanharian\":1}', '', '::1', 1589325087, 0.086503, '1', 200), (154, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":5}', '', '::1', 1589325113, 0.0439918, '1', 200); INSERT INTO `rest_logs` (`id`, `uri`, `method`, `params`, `api_key`, `ip_address`, `time`, `rtime`, `authorized`, `response_code`) VALUES (155, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":1}', '', '::1', 1589325120, 0.0651419, '1', 200), (156, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":0}', '', '::1', 1589325132, 0.0340362, '1', 200), (157, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":0}', '', '::1', 1589325139, 0.0712709, '1', 200), (158, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":0}', '', '::1', 1589325149, 0.0363541, '1', 200), (159, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":1}', '', '::1', 1589325163, 0.073144, '1', 200), (160, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>-bc04-df64ca4680c2\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"34\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":\"0\"}', '', '::1', 1589325181, 0.133544, '1', 200), (161, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"34\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":\"0\"}', '', '::1', 1589325199, 0.0973642, '1', 200), (162, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"34\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":\"0\"}', '', '::1', 1589325205, 0.550718, '1', 200), (163, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":2}', '', '::1', 1589325224, 0.05053, '1', 200), (164, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"113a0572-f779-4daa-85d0-9b7733053664\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":2}', '', '::1', 1589325229, 0.141636, '1', 200), (165, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"32\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":0}', '', '::1', 1589325240, 0.085855, '1', 200), (166, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"f<PASSWORD>-c<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"34\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":\"0\"}', '', '::1', 1589325246, 0.0430939, '1', 200), (167, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"34\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":\"1\"}', '', '::1', 1589325255, 0.0822852, '1', 200), (168, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"64\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\"}', '', '::1', 1589325293, 0.038044, '1', 200), (169, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":4}', '', '::1', 1589325304, 0.0400538, '1', 200), (170, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":4}', '', '::1', 1589325311, 0.0555639, '1', 200), (171, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"b34cd58c-8f33-4431-8777-0058120bb479\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"tahun_laporanharian\":2020,\"bulan_laporanharian\":4}', '', '::1', 1589325314, 0.0419161, '1', 200), (172, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"27\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"id_laporanharian\":1}', '', '::1', 1589325334, 0.116961, '1', 200), (173, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"27\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"id_laporanharian\":4}', '', '::1', 1589325339, 0.0368781, '1', 200), (174, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=88d363qq5pcrib174visu9ppik03ostk\",\"status_laporanharian\":0}', '', '::1', 1589325361, 0.146298, '1', 200), (175, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":0}', '', '::1', 1589325372, 0.0273509, '1', 200), (176, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":1}', '', '::1', 1589325415, 0.072315, '1', 200), (177, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":2}', '', '::1', 1589325465, 0.0417261, '1', 200), (178, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":2}', '', '::1', 1589325470, 0.162115, '1', 200), (179, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":0}', '', '::1', 1589325483, 0.058064, '1', 200), (180, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":1}', '', '::1', 1589325526, 0.0977612, '1', 200), (181, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":1}', '', '::1', 1589325536, 0.0657058, '1', 200), (182, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":1}', '', '::1', 1589325592, 0.0693929, '1', 200), (183, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"a97d6ed7-8034-43cf-b545-55be34c37396\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":2}', '', '::1', 1589325598, 0.202432, '1', 200), (184, 'v1/laporanharian/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"31\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"status_laporanharian\":3}', '', '::1', 1589325606, 0.0702579, '1', 200), (185, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>4155d3ddd\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"243\",\"Cookie\":\"ci_session=ftcf5i0116ma7p3f8ggo1ui8a363gvqu\",\"id_user\":1,\"id_outlet\":1,\"alamat_laporanharian\":\"Klahang mantap\",\"latitude_laporanharian\":123,\"longitude_laporanharian\":321,\"keterangan_laporanharian\":\"Aw mantap mantapp\",\"bukti_laporanharian\":\"rafly.jpg\"}', '', '::1', 1589326224, 0.102641, '1', 200), (186, 'v1/laporanharian/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"243\",\"Cookie\":\"ci_session=o8p72a9lndbp7dgsj24pg9k0kti9tatp\",\"id_user\":2,\"id_outlet\":1,\"alamat_laporanharian\":\"Klahang mantap\",\"latitude_laporanharian\":123,\"longitude_laporanharian\":321,\"keterangan_laporanharian\":\"Aw mantap mantapp\",\"bukti_laporanharian\":\"rafly.jpg\"}', '', '::1', 1589326233, 0.125725, '1', 200), (187, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=o8p72a9lndbp7dgsj24pg9k0kti9tatp\",\"id_outlet\":6}', '', '::1', 1589327286, 0.0291321, '1', 200), (188, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"28\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"id_laporanbulanan\":1}', '', '::1', 1589327301, 0.0408561, '1', 200), (189, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"id_user\":1}', '', '::1', 1589327371, 0.0553401, '1', 200), (190, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"id_user\":2}', '', '::1', 1589327378, 0.0265839, '1', 200), (191, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"id_user\":1}', '', '::1', 1589327382, 0.0444601, '1', 200), (192, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"18\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"id_user\":1}', '', '::1', 1589327404, 0.0451968, '1', 200), (193, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>1-469f-800b-a034a28d4fd2\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"bulan_laporanbulanan\":4,\"tahun_laporanbulanan\":2020}', '', '::1', 1589327463, 0.034111, '1', 200), (194, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"bulan_laporanbulanan\":5,\"tahun_laporanbulanan\":2020}', '', '::1', 1589327477, 0.158154, '1', 200), (195, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>30-30095c3c705f\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"63\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"bulan_laporanbulanan\":5,\"tahun_laporanbulanan\":2020}', '', '::1', 1589327568, 0.382796, '1', 200), (196, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"id_user\":1,\"bulan_laporanbulanan\":5,\"tahun_laporanbulanan\":2020}', '', '::1', 1589327585, 0.065294, '1', 200), (197, 'v1/laporanbulanan/data', 'post', '{\"Authorization\":\"Basic bGF<KEY>2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=qeldgmtlpnl1ik0dl5on5cppsb71i6bg\",\"id_user\":2,\"bulan_laporanbulanan\":5,\"tahun_laporanbulanan\":2020}', '', '::1', 1589327594, 0.038311, '1', 200), (198, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=lgl2lkdd0355idu7fihfvsv4hcu17edg\",\"id_outlet\":6}', '', '::1', 1589328061, 0.087992, '1', 200), (199, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>8\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"id_outlet\":6}', '', '::1', 1590624085, 0.19927, '1', 200), (200, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"21\"}', '', '::1', 1590624129, 0.074033, '1', 200), (201, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=lciahl3rjnopd3h5ev9qjt3g4qglrmd7\",\"id_user\":1}', '', '::1', 1590624135, 0.0522599, '1', 200), (202, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=lciahl3rjnopd3h5ev9qjt3g4qglrmd7\",\"id_user\":1}', '', '::1', 1590624148, 0.178561, '1', 200), (203, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=lciahl3rjnopd3h5ev9qjt3g4qglrmd7\",\"id_user\":1}', '', '::1', 1590624156, 0.120878, '1', 200), (204, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=lciahl3rjnopd3h5ev9qjt3g4qglrmd7\",\"id_user\":1}', '', '::1', 1590624158, 0.13572, '1', 200), (205, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=lciahl3rjnopd3h5ev9qjt3g4qglrmd7\",\"id_user\":1}', '', '::1', 1590624191, 0.205219, '1', 200), (206, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"79\",\"Cookie\":\"ci_session=lciahl3rjnopd3h5ev9qjt3g4qglrmd7\"}', '', '::1', 1590624212, 0.0392151, '1', 200), (207, 'v1/laporanbulanan/add', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"80\",\"Cookie\":\"ci_session=lciahl3rjnopd3h5ev9qjt3g4qglrmd7\",\"id_user\":1,\"isi_laporanbulanan\":\"Laporan bulanan mantap mantappp aw\"}', '', '::1', 1590624219, 0.0946469, '1', 200), (208, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"5\",\"Cookie\":\"ci_session=lciahl3rjnopd3h5ev9qjt3g4qglrmd7\"}', '', '::1', 1590624617, 0.1075, '1', 200), (209, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":1,\"status_laporanbulanan\":2}', '', '::1', 1590624643, 0.112989, '1', 200), (210, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"b788207c-235b-46ce-8303-b15a652c9016\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":1,\"status_laporanbulanan\":1}', '', '::1', 1590624651, 0.100096, '1', 200), (211, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":1,\"status_laporanbulanan\":0}', '', '::1', 1590624657, 0.043005, '1', 200), (212, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"a660111f-2181-4e33-86a4-7768a83fc86d\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":1,\"status_laporanbulanan\":0}', '', '::1', 1590624660, 0.118386, '1', 200), (213, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":1,\"status_laporanbulanan\":4}', '', '::1', 1590624666, 0.041878, '1', 200), (214, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"87fe7911-68d4-4efa-a844-766bd36155d2\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":1,\"status_laporanbulanan\":1}', '', '::1', 1590624673, 0.060153, '1', 200), (215, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":1,\"status_laporanbulanan\":2}', '', '::1', 1590624685, 0.137699, '1', 200), (216, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>586-4512-8c93-6bc181f3da07\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":1,\"status_laporanbulanan\":3}', '', '::1', 1590624705, 0.0564771, '1', 200), (217, 'v1/laporanbulanan/proses', 'post', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"58\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\",\"id_laporanbulanan\":4,\"status_laporanbulanan\":3}', '', '::1', 1590624714, 0.115717, '1', 200), (218, 'v1/dashboard/data', 'get', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>05-b119-8d7b866f2632\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=3gu41cbmlj3v8d62khmtq005es86ua7p\"}', '', '::1', 1590625303, 0.121719, '1', 200), (219, 'v1/dashboard/data', 'get', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=ncca6q1re5tn33kjvd3dqrc6t0fc927j\"}', '', '::1', 1590625335, 0.121868, '1', 200), (220, 'v1/dashboard/data', 'get', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"de<PASSWORD>-1<PASSWORD>-<PASSWORD>-8<PASSWORD>1\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=ncca6q1re5tn33kjvd3dqrc6t0fc927j\"}', '', '::1', 1590625353, 0.062819, '1', 200), (221, 'v1/dashboard/data', 'get', '{\"Authorization\":\"Basic bGFwb3Jhbkthcnlhd2FuTWFudGFwOmxhcG9yYW5LYXJ5YXdhbk1hbnRhcA==\",\"Content-Type\":\"application\\/json\",\"User-Agent\":\"PostmanRuntime\\/7.24.1\",\"Accept\":\"*\\/*\",\"Cache-Control\":\"no-cache\",\"Postman-Token\":\"<PASSWORD>\",\"Host\":\"localhost\",\"Accept-Encoding\":\"gzip, deflate, br\",\"Connection\":\"keep-alive\",\"Content-Length\":\"20\",\"Cookie\":\"ci_session=ncca6q1re5tn33kjvd3dqrc6t0fc927j\"}', '', '::1', 1590625360, 0.082108, '1', 200); -- -------------------------------------------------------- -- -- Struktur dari tabel `user` -- CREATE TABLE `user` ( `id_user` int(11) NOT NULL, `nip_user` varchar(50) DEFAULT NULL, `username_user` varchar(100) DEFAULT NULL, `password_user` text NOT NULL, `nama_user` varchar(100) NOT NULL, `foto_user` text, `level_user` int(1) NOT NULL DEFAULT '1' COMMENT '1 = KARYAWAN | 2 = ADMIN', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `deleted_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data untuk tabel `user` -- INSERT INTO `user` (`id_user`, `nip_user`, `username_user`, `password_user`, `nama_user`, `foto_user`, `level_user`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, '123456', NULL, 'f5bb0c8de146c67b44babbf4e6584cc0', 'Rafli ganteng', 'aw.jpg', 1, '2020-05-12 22:59:10', '2020-05-13 01:14:35', NULL), (2, NULL, 'admin', '<PASSWORD>', 'Admin Ganteng', NULL, 2, '2020-05-12 23:00:21', '2020-05-13 00:25:44', NULL), (10, '123123', 'adminmantap', '<PASSWORD>', 'Admin Mantap', 'rafly.jpg', 2, '2020-05-12 23:28:24', '2020-05-13 00:25:42', NULL), (12, NULL, 'user', '<PASSWORD>', 'User Mantap', NULL, 1, '2020-05-12 23:30:08', '2020-05-13 00:25:46', NULL); -- -- Indexes for dumped tables -- -- -- Indeks untuk tabel `kota` -- ALTER TABLE `kota` ADD PRIMARY KEY (`id_kota`); -- -- Indeks untuk tabel `laporanbulanan` -- ALTER TABLE `laporanbulanan` ADD PRIMARY KEY (`id_laporanbulanan`), ADD KEY `user_laporanbulanan` (`id_user`); -- -- Indeks untuk tabel `laporanharian` -- ALTER TABLE `laporanharian` ADD PRIMARY KEY (`id_laporanharian`), ADD KEY `user_laporanharian` (`id_user`), ADD KEY `outlet_laporanharian` (`id_outlet`); -- -- Indeks untuk tabel `outlet` -- ALTER TABLE `outlet` ADD PRIMARY KEY (`id_outlet`), ADD KEY `outlet_kota` (`id_kota`); -- -- Indeks untuk tabel `rest_logs` -- ALTER TABLE `rest_logs` ADD PRIMARY KEY (`id`); -- -- Indeks untuk tabel `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id_user`), ADD UNIQUE KEY `email_user` (`username_user`), ADD UNIQUE KEY `nip_user` (`nip_user`); -- -- AUTO_INCREMENT untuk tabel yang dibuang -- -- -- AUTO_INCREMENT untuk tabel `kota` -- ALTER TABLE `kota` MODIFY `id_kota` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT untuk tabel `laporanbulanan` -- ALTER TABLE `laporanbulanan` MODIFY `id_laporanbulanan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT untuk tabel `laporanharian` -- ALTER TABLE `laporanharian` MODIFY `id_laporanharian` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT untuk tabel `outlet` -- ALTER TABLE `outlet` MODIFY `id_outlet` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT untuk tabel `rest_logs` -- ALTER TABLE `rest_logs` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=222; -- -- AUTO_INCREMENT untuk tabel `user` -- ALTER TABLE `user` MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables) -- -- -- Ketidakleluasaan untuk tabel `laporanbulanan` -- ALTER TABLE `laporanbulanan` ADD CONSTRAINT `user_laporanbulanan` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`); -- -- Ketidakleluasaan untuk tabel `laporanharian` -- ALTER TABLE `laporanharian` ADD CONSTRAINT `outlet_laporanharian` FOREIGN KEY (`id_outlet`) REFERENCES `outlet` (`id_outlet`), ADD CONSTRAINT `user_laporanharian` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`); -- -- Ketidakleluasaan untuk tabel `outlet` -- ALTER TABLE `outlet` ADD CONSTRAINT `outlet_kota` FOREIGN KEY (`id_kota`) REFERENCES `kota` (`id_kota`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2017-09-30',@EPS = N'0.29',@EPSDeduct = N'0',@Revenue = N'55.88亿',@RevenueYoy = N'25.27',@RevenueQoq = N'-',@Profit = N'3697.31万',@ProfitYoy = N'718.40',@ProfiltQoq = N'-',@NAVPerUnit = N'7.1102',@ROE = N'5.11',@CashPerUnit = N'-1.6815',@GrossProfitRate = N'11.25',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2017-10-31' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2017-06-30',@EPS = N'0.23',@EPSDeduct = N'0.25',@Revenue = N'35.10亿',@RevenueYoy = N'20.72',@RevenueQoq = N'-',@Profit = N'2741.59万',@ProfitYoy = N'2857.41',@ProfiltQoq = N'-',@NAVPerUnit = N'5.0290',@ROE = N'4.20',@CashPerUnit = N'1.3138',@GrossProfitRate = N'11.22',@Distribution = N'不分配不转增',@DividenRate = N'-',@AnnounceDate = N'2017-08-29' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2015-12-31',@EPS = N'0.65',@EPSDeduct = N'0.4',@Revenue = N'51.81亿',@RevenueYoy = N'71.38',@RevenueQoq = N'-',@Profit = N'7792.30万',@ProfitYoy = N'-14.64',@ProfiltQoq = N'-',@NAVPerUnit = N'5.1093',@ROE = N'15.41',@CashPerUnit = N'-1.9817',@GrossProfitRate = N'12.30',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2017-07-13' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2015-06-30',@EPS = N'0.12',@EPSDeduct = N'0.12',@Revenue = N'18.69亿',@RevenueYoy = N'-',@RevenueQoq = N'-',@Profit = N'1047.26万',@ProfitYoy = N'-',@ProfiltQoq = N'-',@NAVPerUnit = N'4.2633',@ROE = N'2.13',@CashPerUnit = N'-0.1191',@GrossProfitRate = N'13.54',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2015-12-22' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2014-12-31',@EPS = N'0.76',@EPSDeduct = N'0.44',@Revenue = N'30.23亿',@RevenueYoy = N'33.72',@RevenueQoq = N'-',@Profit = N'9128.41万',@ProfitYoy = N'10.84',@ProfiltQoq = N'-',@NAVPerUnit = N'3.8888',@ROE = N'21.23',@CashPerUnit = N'0.8548',@GrossProfitRate = N'16.11',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2017-07-13' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2013-12-31',@EPS = N'1.37',@EPSDeduct = N'1.34',@Revenue = N'22.61亿',@RevenueYoy = N'34.59',@RevenueQoq = N'-',@Profit = N'8235.75万',@ProfitYoy = N'23.46',@ProfiltQoq = N'-',@NAVPerUnit = N'7.0531',@ROE = N'20.85',@CashPerUnit = N'0.1979',@GrossProfitRate = N'17.68',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2014-05-19' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2012-12-31',@EPS = N'1.11',@EPSDeduct = N'1.19',@Revenue = N'16.80亿',@RevenueYoy = N'54.46',@RevenueQoq = N'-',@Profit = N'6670.63万',@ProfitYoy = N'23.81',@ProfiltQoq = N'-',@NAVPerUnit = N'5.8976',@ROE = N'20.21',@CashPerUnit = N'-0.1497',@GrossProfitRate = N'17.61',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2014-05-19' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2011-12-31',@EPS = N'0.9',@EPSDeduct = N'0.97',@Revenue = N'10.87亿',@RevenueYoy = N'-',@RevenueQoq = N'-',@Profit = N'5387.83万',@ProfitYoy = N'-',@ProfiltQoq = N'-',@NAVPerUnit = N'4.9440',@ROE = N'20.88',@CashPerUnit = N'-1.7855',@GrossProfitRate = N'17.99',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2014-05-19' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2016-12-31',@EPS = N'0.86',@EPSDeduct = N'0.85',@Revenue = N'66.39亿',@RevenueYoy = N'28.14',@RevenueQoq = N'40.24',@Profit = N'1.03亿',@ProfitYoy = N'31.76',@ProfiltQoq = N'2633.59',@NAVPerUnit = N'5.3194',@ROE = N'15.45',@CashPerUnit = N'-1.4606',@GrossProfitRate = N'11.94',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2017-07-13' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2016-09-30',@EPS = N'0.04',@EPSDeduct = N'0',@Revenue = N'44.61亿',@RevenueYoy = N'-',@RevenueQoq = N'-',@Profit = N'451.77万',@ProfitYoy = N'-',@ProfiltQoq = N'-',@NAVPerUnit = N'0.0000',@ROE = N'0.84',@CashPerUnit = N'0.0000',@GrossProfitRate = N'10.43',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2017-10-31' EXEC [EST].[Proc_yjbb_Ins] @Code = N'603825',@CutoffDate = N'2016-06-30',@EPS = N'0.01',@EPSDeduct = N'-0.02',@Revenue = N'29.08亿',@RevenueYoy = N'55.53',@RevenueQoq = N'-',@Profit = N'92.70万',@ProfitYoy = N'-91.15',@ProfiltQoq = N'-',@NAVPerUnit = N'0.0000',@ROE = N'0.15',@CashPerUnit = N'0.0000',@GrossProfitRate = N'10.79',@Distribution = N'-',@DividenRate = N'-',@AnnounceDate = N'2017-08-29'
<reponame>HigorSnt/odbm<gh_stars>0 CREATE OR REPLACE PROCEDURE hello_world () AS BEGIN dbms_output.put_line('Hello World!'); END hello_world; CREATE PROCEDURE dashboard.insert_user (id IN NUMBER, user_name IN VARCHAR2) IS BEGIN INSERT INTO dashboard.user VALUES (id, user_name); END dashboard.insert_user; GRANT EXECUTE ON dashboard.insert_user TO PUBLIC;
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 23, 2019 at 10:39 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `hci` -- -- -------------------------------------------------------- -- -- Table structure for table `book_companies` -- CREATE TABLE `book_companies` ( `book_company_id` int(10) UNSIGNED NOT NULL COMMENT 'id công ty sách', `book_company_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'tên công ty sách', `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'ngày tạo', `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'ngày cập nhật', `deleted_at` timestamp NULL DEFAULT NULL COMMENT 'ngày xóa tạm' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='công ty sách'; -- -- Dumping data for table `book_companies` -- INSERT INTO `book_companies` (`book_company_id`, `book_company_name`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, '<NAME>', '2019-09-08 07:45:05', '2019-09-08 07:45:05', NULL), (2, 'FirstNews', '2019-09-08 07:46:35', '2019-09-08 07:46:35', NULL), (3, 'AZ Việt Nam', '2019-10-23 08:21:41', '2019-10-23 08:21:41', NULL), (4, 'Cty TGM', '2019-10-23 08:27:35', '2019-10-23 08:27:35', NULL); -- -- Indexes for dumped tables -- -- -- Indexes for table `book_companies` -- ALTER TABLE `book_companies` ADD PRIMARY KEY (`book_company_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `book_companies` -- ALTER TABLE `book_companies` MODIFY `book_company_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id công ty sách', AUTO_INCREMENT=5; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
CREATE function RangeExecuteSuccess (@Uname nvarchar(20)) returns table as return select case when ExecUsedTime < 6 then ExecUsedTime when cast(ExecUsedTime/10 as int)*10 > 50 then 9999 else (cast(ExecUsedTime/10 as int)*10)+10 end as xRange, 1 as SuccessCount, 0 as ErrorCount from plannings.dbo.tbl_101userExecMyProg where Uname like @Uname + '%'
<reponame>rafasousa0321/exercicio -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 12-Nov-2020 às 10:19 -- Versão do servidor: 10.1.38-MariaDB -- versão do PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `teams` -- -- -------------------------------------------------------- -- -- Estrutura da tabela `equipas` -- CREATE TABLE `equipas` ( `id_equipa` int(11) NOT NULL, `designacao` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `designacao_curta` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `localidade` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Extraindo dados da tabela `equipas` -- INSERT INTO `equipas` (`id_equipa`, `designacao`, `designacao_curta`, `localidade`) VALUES (1, 'Futebol Clube do Porto', 'FCP', 'Porto'), (2, 'Futbol Club Barcelona', 'FCB', 'Barcelona'), (3, 'Manchester United Football Club', 'MUN', 'Manchester'); -- -------------------------------------------------------- -- -- Estrutura da tabela `jogadores` -- CREATE TABLE `jogadores` ( `id_jogador` int(11) NOT NULL, `Nome` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `Nacionalidade` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `data_nascimento` date NOT NULL, `id_equipa` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Extraindo dados da tabela `jogadores` -- INSERT INTO `jogadores` (`id_jogador`, `Nome`, `Nacionalidade`, `data_nascimento`, `id_equipa`) VALUES (1, '<NAME>', 'Portuguesa', '1986-11-15', 1), (2, '<NAME>', 'Portuguesa', '1996-04-21', 1), (3, '<NAME>', 'Portuguesa', '2000-01-14', 1), (4, '<NAME>', 'Portuguesa', '1993-09-07', 1), (5, '<NAME>', 'Portuguesa', '1995-03-18', 1), (6, '<NAME>', 'Portuguesa', '1999-12-16', 2), (7, '<NAME>', 'Portuguesa', '1989-07-13', 2), (8, '<NAME>', 'Portuguesa', '2020-09-13', 2), (9, '<NAME>', 'Portuguesa', '1991-01-08', 2), (10, '<NAME>', 'Portuguesa', '1992-11-09', 2), (11, '<NAME>', 'Portuguesa', '1999-12-25', 3), (12, '<NAME>', 'Portuguesa', '2001-07-20', 3), (13, '<NAME>', 'Portuguesa', '1990-08-02', 3), (14, '<NAME>', 'Portuguesa', '1998-04-22', 3), (15, '<NAME>', 'Portuguesa', '1997-09-28', 3); -- -- Indexes for dumped tables -- -- -- Indexes for table `equipas` -- ALTER TABLE `equipas` ADD PRIMARY KEY (`id_equipa`); -- -- Indexes for table `jogadores` -- ALTER TABLE `jogadores` ADD PRIMARY KEY (`id_jogador`), ADD KEY `id_equipa` (`id_equipa`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `equipas` -- ALTER TABLE `equipas` MODIFY `id_equipa` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `jogadores` -- ALTER TABLE `jogadores` MODIFY `id_jogador` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
INSERT INTO categories ( name ) VALUES( 'Fruit' ); INSERT INTO categories ( name ) VALUES( 'Vegetable' ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Apple' , 'Its an apple!' , 1.0 , 1 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Banana', 'B A N A N A S' , 134.50, 1 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Mango' , 'This is a sample descript', 34.23 , 1 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Pear' , 'And heres another one' , 65.87 , 1 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Potato' , 'Standard potato' , 56.23 , 2 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Broccoli' , 'Green plant' , 23.45 , 2 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Leek' , 'A form of onion' , 23.45 , 2 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Brussel Sprout', 'Small cabbage' , 12.50 , 2 ); INSERT INTO products ( name, description, price, category_id ) VALUES( 'Cabbage' , 'Big brussel sprout!', 320.49, 2 );
<filename>queries/stackoverflow/q16/e01c1f367c2f3fe1912a9b1a70190574c2f444d5.sql<gh_stars>0 SELECT COUNT(*) FROM site AS s, so_user AS u1, tag AS t1, tag_question AS tq1, question AS q1, badge AS b1, account AS acc WHERE s.site_id = u1.site_id AND s.site_id = b1.site_id AND s.site_id = t1.site_id AND s.site_id = tq1.site_id AND s.site_id = q1.site_id AND t1.id = tq1.tag_id AND q1.id = tq1.question_id AND q1.owner_user_id = u1.id AND acc.id = u1.account_id AND b1.user_id = u1.id AND (q1.view_count >= 0) AND (q1.view_count <= 100) AND s.site_name = 'stackoverflow' AND (t1.name in ('adapter', 'android-room', 'declaration', 'ef-migrations', 'internet-explorer-8', 'ionic4', 'nsstring', 'parse-platform', 'primefaces', 'recursive-query', 'scheme', 'static-methods', 'webhooks', 'wildfly', 'xpages')) AND (LOWER(acc.website_url) LIKE ('%en'))
<filename>db.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 27, 2020 at 05:59 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `pharmacy_kids1` -- DELIMITER $$ -- -- Procedures -- CREATE DEFINER=`root`@`localhost` PROCEDURE `lihat_keranjang` (IN `id` INT(3)) NO SQL BEGIN SELECT id_keranjang,id_obat,nama_obat,harga_obat,quantity,pengiriman, harga(id_keranjang) AS 'total_harga' FROM keranjang2 WHERE id_keranjang = id; END$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `lihat_obat` (IN `id` INT(3)) NO SQL BEGIN SELECT * FROM obat WHERE id_obat = id; END$$ -- -- Functions -- CREATE DEFINER=`root`@`localhost` FUNCTION `harga` (`id` INT) RETURNS VARCHAR(15) CHARSET latin1 NO SQL begin declare total varchar(15); set total = (select concat(pengiriman+(harga_obat*quantity)) as 'total1' from keranjang2 where id_keranjang = id ); return(total); end$$ DELIMITER ; -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE `admin` ( `id_admin` int(20) NOT NULL, `email` varchar(30) NOT NULL, `password` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`id_admin`, `email`, `password`) VALUES (1, '<EMAIL>', '<PASSWORD>'); -- -------------------------------------------------------- -- -- Table structure for table `artikel` -- CREATE TABLE `artikel` ( `id_artikel` int(20) NOT NULL, `judul` varchar(100) NOT NULL, `foto` text NOT NULL, `isi` text NOT NULL, `tgl_buat` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `artikel` -- INSERT INTO `artikel` (`id_artikel`, `judul`, `foto`, `isi`, `tgl_buat`) VALUES (6, 'Usia Berapa Anak Boleh Minum Jus?', '2953180962.jpg', 'Memenuhi kebutuhan gizi anak sudah menjadi kewajiban orangtua, dan salah satu nutrisi yang bisa didapat adalah dari buah-buahan dan sayuran segar. Buah bisa diolah menjadi berbagai macam menu makanan, salah satunya adalah jus. Meski sehat tapi bukan berarti jus bisa dikonsumsi siapa saja, apalagi anak-anak. untuk anak usia dini, tentu perlu waktu yang tepat kapan mereka bisa mengonsumsinya. Dilansir dari Kids Health.org, paling baik menunggu bayi berusia paling tidak enam bulan untuk bisa minum jus. Namun beberapa dokter anak mungkin tidak menyarankan bayi diberikan jus dulu, baik itu kemasan maupun yang segar dan terbuat dari buah dan sayur segar. Tunggu hingga anak berusia satu tahun. Jus kemasan memiliki kalori tinggi yang bisa menyebabkan anak kegemukan karena terlalu banyak gula. Sedangkan jus segar kemungkinan membawa bakteri dan virus penyebab penyakit. Apalagi imunitas bayi yang masih rentan dan lemah menahan infeksi bakteri dan virus. Bisa disimpulkan bahwa sebaiknya tidak begitu saja memberi jus pada bayi, bahkan jika itu adalah mengenalkan MPASI pada bayi. Pastikan semua makanan yang diberikan pada bayi sudah dimasak dengan benar dan matang sehingg bisa memberi nutrisi tanpa membahayakan kesehatannya. Jadi, jangan sembarangan memberikan makanan dan minuman pada anak-anak meski sehat. Kenali dulu kapan tubuh anak bisa menoleransi kandungan sayur dan buah segar.', '2020-06-17'), (10, '5 Cara Membiasakan Anak Makan Buah di Rumah', '2620937_6e92faf6-3ad4-11e3-8182-d61d3384bbc6.jpg', 'Beberapa anak sulit disuruh makan buah. Bukan hanya menolak, anak bisa jadi memuntahkan dan membuang makanan jika dipaksa. Jika terus dipaksa, bisa-bisa kenangan makan buah tak akan pernah baik di pikirannya dan justru ia akan trauma dan semakin membenci buah.\r\n\r\nDaripada terus memaksa anak untuk makan buah, ada baiknya membiasakan anak makan buah perlahan di mulai dari rumah. Ini yang bisa dilakukan orangtua agar si kecil mau makan buah.\r\n\r\n1. Makan bersama\r\n\r\nLebih sering makan bersama keluarga. Jika tidak memungkinkan, paling tidak selalu temani si kecil makan. Makan bersama akan membuat anak merasa lebih dekat dengan orangtuanya dan menuruti apa yang dikatakan orangtuanya.\r\n\r\n2. Menjadi contoh untuk anak\r\n\r\nTentu untuk mendorong anak makan sehat, orangtua harus jadi contoh teladan yang baik. Ibu dan ayah harus rajin dulu makan buah. Dengan sering melihat orangtuanya makan buah, anak akan terdorong ingin makan buah.\r\n\r\n3. Menyimpan banyak variasi buah di rumah\r\n\r\nBahkan jika pada awalnya sering menolak makan buah, lama-lama anak akan ingin makan buah, tinggal memilih mana buah yang paling ia suka. Jika tak suka pada satu buah, belum tentu ia tidak suka buah lainnya.\r\n\r\n4. Selalu sediakan di meja makan\r\n\r\nUntuk membuatnya terbiasa, selalu kupas dan sediakan buah di meja untuk dimakan. Bahkan jika awalnya menolak, lama-lama ia akan mau mencoba satu dua potong buah.\r\n\r\n5. Dorong anak lebih banyak minum air putih\r\n\r\nJika masih tak mau makan buah, cara terbaik adalah mendorongnya lebih banyak minum air putih. Jangan turuti anak minum soda atau minuman manis lainnya. Ini yang akan membuat anak lebih familiar dengan rasa manis tak alami dan semakin menolak buah. Jika anak suka minum air putih, lidahnya akan lebih familiar dengan rasa hambar dan menerima rasa manis yang lebih alami.\r\n\r\nItu dia sekian cara membiasakan anak makan buah di rumah. Jangan lelah mengenalkan berbagai variasi buah pada anak.', '2020-06-18'), (11, 'Begini Cara Atasi Radang Tenggorokan Anak dalam Semalam', 'download.jpg', '-Minum air hangat\r\n-Minum madu hangat\r\n-Berkumur air garam\r\n-Makan makanan berkuah dan hangat seperti sup dan bubur\r\n-Pastikan si kecil banyak minum air\r\n-Minum obat ibuprofen atau asetaminofen untuk anak-anak usia di atas 2 tahun\r\nJika memungkinkan ada humidifier, gunakan di dalam kamar anak. Pastikan anak makan dan minum dengan baik serta mendapat waktu istirahat yang cukup. Karena kemungkinan ia akan merasakan tidak nyaman sepanjang malam, ia akan agak rewel. Tenangkan anak dengan cara menemaninya tidur dan selalu ada air hangat di sisi tempat tidur, Moms.', '2020-06-18'); -- -------------------------------------------------------- -- -- Table structure for table `favorite` -- CREATE TABLE `favorite` ( `id_favorite` int(11) NOT NULL, `id_obat` int(11) NOT NULL, `nama_obat` varchar(255) NOT NULL, `harga_obat` int(11) NOT NULL, `id_user` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `favorite` -- INSERT INTO `favorite` (`id_favorite`, `id_obat`, `nama_obat`, `harga_obat`, `id_user`) VALUES (1, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 7), (2, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 9), (3, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 9), (4, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 10), (5, 26, 'HOLISTICARE ESTER C KIDS 30 KA', 50000, 8), (6, 26, 'HOLISTICARE ESTER C KIDS 30 KA', 50000, 8), (7, 32, 'ACTIFED PLUS COUGH SUPRESSANT ', 80000, 8), (8, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 8), (9, 25, 'DUMIN SIRUP 60 ML', 43000, 8), (10, 19, 'TEMPRA FORTE SIRUP 60 ML', 50000, 10), (11, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 12); -- -------------------------------------------------------- -- -- Table structure for table `keranjang` -- CREATE TABLE `keranjang` ( `db_keranjang` int(11) NOT NULL, `id_keranjang` int(20) NOT NULL, `id_obat` int(20) NOT NULL, `nama_obat` varchar(30) NOT NULL, `harga_obat` int(30) NOT NULL, `quantity` int(11) NOT NULL, `id_user` int(10) NOT NULL, `id_pemesanan` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `keranjang` -- INSERT INTO `keranjang` (`db_keranjang`, `id_keranjang`, `id_obat`, `nama_obat`, `harga_obat`, `quantity`, `id_user`, `id_pemesanan`) VALUES (1, 1, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 1, 7, 1), (2, 6, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 1, 8, 2), (3, 7, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 1, 8, 3), (4, 1, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 1, 8, 4), (5, 13, 20, 'PANADOL ANAK-ANAK 1-6 SIRUP 30', 35000, 2, 8, 5), (6, 14, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 2, 10, 6), (7, 7, 19, 'TEMPRA FORTE SIRUP 60 ML', 50000, 1, 10, 7), (8, 8, 27, 'APIALYS SIRUP 100 ML', 60000, 1, 10, 7), (9, 9, 35, 'DULCOLAX 5 MG 10 TABLET', 32000, 1, 11, 8), (10, 10, 18, 'BYE BYE FEVER ANAK 1 LEMBAR', 10000, 1, 11, 9), (11, 11, 26, 'HOLISTICARE ESTER C KIDS 30 KA', 50000, 1, 11, 9), (12, 12, 18, '<NAME> 1 LEMBAR', 10000, 2, 12, 10), (13, 13, 19, 'TEMPRA FORTE SIRUP 60 ML', 50000, 2, 12, 11), (14, 1, 32, 'ACTIFED PLUS COUGH SUPRESSANT ', 80000, 1, 13, 12); -- -------------------------------------------------------- -- -- Table structure for table `keranjang2` -- CREATE TABLE `keranjang2` ( `id_keranjang` int(10) NOT NULL, `id_obat` int(10) NOT NULL, `nama_obat` varchar(30) NOT NULL, `harga_obat` int(15) NOT NULL, `quantity` int(10) NOT NULL, `id_user` int(11) NOT NULL, `id_pemesanan` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `login_user` -- CREATE TABLE `login_user` ( `id_user` int(10) NOT NULL, `email` varchar(35) NOT NULL, `password` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `login_user` -- INSERT INTO `login_user` (`id_user`, `email`, `password`) VALUES (7, '<EMAIL>', '<PASSWORD>'), (8, '<EMAIL>', '<PASSWORD>59075b964b07152d234b70'), (9, '<EMAIL>', 'c6f057b86584942e415435ffb1fa93d4'), (10, '<EMAIL>', '<PASSWORD>'), (11, '<EMAIL>', '<PASSWORD>'), (12, '<EMAIL>', '<PASSWORD>'), (13, '<EMAIL>', '202cb962ac59075b964b07152d234b70'); -- -------------------------------------------------------- -- -- Table structure for table `metode_pengiriman` -- CREATE TABLE `metode_pengiriman` ( `id_m_p` int(11) NOT NULL, `nama_metode` varchar(255) NOT NULL, `harga_metode` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `metode_pengiriman` -- INSERT INTO `metode_pengiriman` (`id_m_p`, `nama_metode`, `harga_metode`) VALUES (1, 'Pengiriman Besok', 25000), (2, 'Pengiriman Normal', 20000), (3, 'Pengiriman Sekarang', 30000); -- -------------------------------------------------------- -- -- Table structure for table `obat` -- CREATE TABLE `obat` ( `id_obat` int(10) NOT NULL, `nama_obat` varchar(30) NOT NULL, `foto` text NOT NULL, `kategori` varchar(30) NOT NULL, `merek` varchar(30) NOT NULL, `jenis_obat` varchar(30) NOT NULL, `aturan_pakai` text NOT NULL, `komposisi` text NOT NULL, `deskripsi` text NOT NULL, `kemasan` varchar(30) NOT NULL, `indikasi_umum` text NOT NULL, `manufaktur` text NOT NULL, `segmentasi` text NOT NULL, `harga_obat` int(6) NOT NULL, `efek_samping` varchar(100) NOT NULL, `stock` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `obat` -- INSERT INTO `obat` (`id_obat`, `nama_obat`, `foto`, `kategori`, `merek`, `jenis_obat`, `aturan_pakai`, `komposisi`, `deskripsi`, `kemasan`, `indikasi_umum`, `manufaktur`, `segmentasi`, `harga_obat`, `efek_samping`, `stock`) VALUES (18, 'BYE BYE FEVER ANAK 1 LEMBAR', 'byebye_fever.jpg', 'demam ', 'Setiap 10 jam, bila perlu', '-', 'Lepaskan lapisan transparan dan tempelkan permukaan yang melekat pada daerah dahi/pipi/punggung/bagian yang nyeri. Patch diganti setiap 10 jam.', '-', 'BYE BYE FEVER ANAK merupakan plester yang digunakan pada anak diatas 2 tahun untuk membantu meredakan demam, sakit kepala dan sakit gigi. Plester ini memberikan efek dingin bekerja sampai 10 jam. Plester BYE BYE FEVER ANAK memiliki daya lekat yang kuat dan aman digunakan bersama dengan obat lain. ', 'Pack @ 1 piece', 'Membantu menurunkan demam dan menghilangkan sakit kepala pada anak di atas usia 2 tahun.', 'HISAMITSU', 'Medical Device & Consumable', 10000, '-', 0), (19, 'TEMPRA FORTE SIRUP 60 ML', 'tempra_paracetamol.jpg', 'demam ', 'Anak di atas 12 tahun : 2-2.5 ', 'Sirup', 'Dikonsumsi sebelum atau sesudah makan.', 'Tiap 5 ml mengandung : Paracetamol 250 mg\r\nDosis', 'TEMPRA FORTE merupakan obat sirup dengan rasa jeruk yang mengandung Paracetamol 250 mg tiap 5 ml sirup. Paracetamol bekerja sebagai antipiretik pada pusat pengaturan suhu di otak dan analgetika dengan meningkatkan ambang rasa sakit. Obat ini digunakan untuk menurunkan demam, rasa sakit dan nyeri ringan seperti sakit kepala dan sakit gigi. ', 'Dus, Botol @ 60 ml ', 'Obat ini dapat digunakan untuk meredakan sakit kepala, sakit gigi, sakit pada otot, nyeri yang mengganggu dan menurunkan demam yang menyertai flu/influensa serta demam sesudah vaksinasi. ', 'Taisho Pharmaceutical', 'Green', 50000, '-', 0), (20, 'PANADOL ANAK-ANAK 1-6 SIRUP 30', 'panadol_panadol-anak-anak-paracetamol-obat-sirup-pereda-demam--60-ml-_full02.jpg', 'demam ', '- Anak usia 1-2 tahun: 3.75 ml', 'Sirup', 'Dikonsumsi sebelum atau sesudah makan.', 'Tiap 5 ml mengandung : Paracetamol 160 mg', 'PANADOL ANAK 1-6 TAHUN SIRUP merupakan obat dengan kandungan Paracetamol. Paracetamol bekerja sebagai antipiretik pada pusat pengaturan suhu di otak dan analgetika dengan meningkatkan ambang rasa sakit. Obat ini digunakan untuk meredakan demam, rasa sakit dan nyeri ringan seperti sakit kepala, sakit gigi; dan menurunkan demam yang menyertai flu; dan demam sesudah imunisasi atau vaksinasi pada anak usia 1-6 tahun. ', 'Dus, Botol @ 30 ml', 'Obat ini dapat digunakan untuk meredakan sakit kepala, sakit gigi, sakit pada otot, nyeri yang mengganggu dan menurunkan demam yang menyertai flu/influensa serta demam sesudah vaksinasi. ', 'Sterling', 'Green', 35000, '-', 0), (21, 'PRORIS SIRUP 60 ML', '84e8a05ebf87dadbcd0045242917b35d.jpg', 'demam ', 'Dewasa : 3-4 kali/hari, 2 send', 'Sirup', 'Berikan segera sesudah makan', 'Tiap 5 ml mengandung : Ibuprofen 100 mg', 'PRORIS SIRUP merupakan obat dengan kandungan Ibuprofen 100 mg tiap 5 ml. Obat ini digunakan untuk menurunkan demam, meredakan nyeri ringan sampai sedang, dan sakit kepala. Kategori', 'Dus, Botol @ 60 ml ', 'Meredakan demam, nyeri pada sakit gigi, sakit kepala, nyeri otot, nyeri pada paska operasi cabut gigi ', 'Pharos', 'Green', 40000, 'Hati-hati pemberian pada penderita tukak lambung atau mempunyai riwayat tukak lambung dan penderita ', 0), (22, 'PRAXION SIRUP 60 ML', 'PRAXION_SIRUP_60_ML.jpg', 'demam ', 'Anak usia 0 - 1 tahun : 0.5 se', 'Sirup', 'Dapat dikonsumsi sebelum atau sesudah makan.', 'Tiap 5 ml mengandung : Paracetamol 120 mg (micronized)', 'PRAXION SIRUP merupakan obat yang mengandung Paracetamol yang berfungsi sebagai analgesik dan antipiretik. Paracetamol bekerja sebagai antipiretik pada pusat pengaturan suhu di otak dan analgetika dengan meningkatkan ambang rasa sakit. Obat ini digunakan untuk menurunkan demam, serta meringankan rasa sakit kepala dan gigi. ', 'Dus, Botol @ 60 ml ', 'Menurunkan demam, meredakan nyeri seperti pada sakit kepala dan sakit gigi.', 'Pharos', 'Green', 50000, 'Hati-hati penggunaan obat ini pada penderita peyakit ginjal. - Bila setelah 2 hari demam tidak menur', 0), (23, 'HUFAGRIP TMP SIRUP 60 ML', 'HUFAGRIP_TMP_SIRUP_60_ML.jpg', 'demam ', 'Anak 1-12 th temperatur <39>39', 'Sirup', 'Sesudah makan', 'ibuprofen', 'HUFAGRIP TMP SIRUP mengandung zat aktif Ibuprofen. Kandungan obat ini termasuk Nonsteroidal anti Inflamatory Drug (NSAID). Obat ini digunakan untuk meredakan demam, sakit kepala, sakit gigi, sakit pada telinga, dan nyeri ringan lainnya. ', 'Dus, Botol @ 60 ml ', 'Penurun panas, pusing, nyeri, sakit kepala', '<NAME>', 'Blue', 30000, 'Peptic ulcer, pasien yang mengkonsumsi aspirin, asma, rhinitis dan urtikaria', 0), (24, 'PANADOL ANAK-ANAK 120 MG 10 CH', 'PANADOL_ANAK-ANAK_120_MG_10_CHEWABLE_TABLET.jpg', 'demam ', 'Anak 6-12 tahun : 3-4 x sehari', 'Tablet', 'Sebelum atau sesudah makan', 'Paracetamol 120 mg', 'PANADOL ANAK CHEWABLE merupakan obat dengan kandungan Paracetamol. Obat ini digunakan untuk meredakan demam dan nyeri secara efektif bagi anak usia 2-12 tahun. ', 'Dus, 10 Blister @ 10 Tablet Ku', 'Meredakan sakit Kepala, sakit Gigi, nyeri Otot, menurunkan demam yang menyertai Flu & paska vaksinasi ', 'Sterling', 'Green', 25000, 'Penderita gangguan fungsi hati berat.', 0), (25, 'DUMIN SIRUP 60 ML', 'DUMIN_SIRUP_60_ML.jpg', 'demam ', 'Anak 7-12 tahun : 3-4 x sehari', 'Sirup', 'Sebelum atau sesudah makan', 'Per-5 mL : Paracetamol 120 mg', 'DUMIN SIRUP merupakan obat dengan kandungan Paracetamol 500 mg. Obat ini dapat digunakan untuk meredakan nyeri seperti sakit kepala, sakit gigi, nyeri otot dan demam. ', 'Botol 60 ml Dalam Dus', 'Meredakan sakit/nyeri pada sakit Kepala, sakit Gigi, nyeri Haid, nyeri Otot & Sendi, Batuk-pilek/Flu, menurunkan Demam ', 'Actavis', 'Green', 43000, 'Penggunaan bersama obat lain yang mempengaruhi hati. Gagal hati dan ginjal', 0), (26, 'HOLISTICARE ESTER C KIDS 30 KA', 'HOLISTICARE_ESTER_C_KIDS_30_KAPSUL.jpg', 'vitamin', '1 tablet sehari, dapat ditingk', 'Kapsul', 'Dikunyah atau dihisap.', 'Ester-C 100 mg, Kalsium 10 mg, Hesperidin 5 mg', 'HOLISTICARE ESTER C KIDS merupakan suplemen dengan kandungan non-acidic vitamin c, hesperidin (ekstrak bioflavonoid), dan kalsium yang bermanfaat untuk memelihara kesehatan anak. Suplemen ini tidak bersifat asam sehingga aman bagi lambung, mengandung pemanis Xylitol dari bahan alam yang dapat memelihara kesehatan gigi, dilengkapi Hesperidin untuk membantu penyerapan, serta membantu memenuhi kebutuhan vitamin c. ', 'Dus, Botol @ 30 Kapsul ', 'Membantu mencukupi vitamin c dan menjaga daya tahan tubuh', 'Holisticare', 'Vitamin & Supplement ', 50000, 'hipersensitivitas', 0), (27, 'APIALYS SIRUP 100 ML', 'APIALYS_SIRUP_100_ML.jpg', 'vitamin', 'Dewasa dan anak > 5 tahun : 1-', 'Sirup', 'Sebelum atau sesudah makan, dapat bersama makanan untuk absorpsi yang lebih baik atau jika timbul ketidak-nyamanan pada saluran cerna.', 'Tiap 5 ml mengandung : Vitamin A 5000 IU, Vitamin B1 3 mg, Vitamin B2 2 mg, Vitamin B6 6 mg, Vitamin B12 5 mcg, Vitamin C 50 mg, Vitamin D 400 IU, Nicotinamide 20 mg, Lysine HCl 250 mg, Pantothenol 5 mg, Asam glutamat 25 mg.', 'APIALYS SIRUP merupakan multivitamin yang digunakan untuk memenuhi kebutuhan vitamin pada anak. ', 'Dus, Botol @ 100 ml', 'Meningkatkan nafsu makan dan stamina tubuh pada anak2 yang bertumbuh, sebagai suplemen vitamin ', 'Lapi', 'Vitamin & Supplement ', 60000, 'hentikan jika terjadi reaksi alergi', 0), (28, 'ENERVON C PLUS SIRUP 120 ML', 'ENERVON_C_PLUS_SIRUP_120_ML.jpg', 'vitamin', 'Anak usia 1 - 6 tahun : 1 send', 'sirup', 'Dikonsumsi sesudah makan.', 'Tiap 5 ml mengandung : Vitamin A 1.500 SI, Vitamin B1 8.33 mg, Vitamin B2 4.16 mg, Vitamin B6 1.67 mg,Vitamin B12 8.33 mcg, Vitamin C 83.33 mg, Vitamin D 100 SI, Niacinamide 8.33 mg, d-Panthenol 3.33 mg.\r\n', 'ENERVON C PLUS merupakan suplemen dengan kandungan Vit A , Vitamin B kompleks (Vit B1, Vit B2, Vit B6, Vit B12), Vit C, Vit D, Niacinamide, Panthenol dalam bentuk sirup. ENERVON C PLUS digunakan untuk memenuhi kebutuhan Vitamin B Kompleks, Vitamn C, A & D serta memelihara kesehatan anak pada masa pertumbuhan anak. ', 'Dus, Botol @ 120 ml', 'Suplemen untuk membantu memenuhi kebutuhan Vitamin B kompleks, Vitamin C, Vitamin A, dan Vitamin D pada masa pertumbuhan anak. ', 'Medifarma', 'Vitamin & Supplement ', 40000, 'Hipersensitif atau alergi terhadap salah satu komponen suplemen ini. - Hipervitaminosis. ', 0), (29, 'IMUNPED SIRUP 60 ML', 'IMUNPED-SIRUP-BOTOL-60-ML-1.jpg', 'vitamin', 'Anak 9-13 tahun: 5-10 ml (1-2 ', 'Sirup', 'Dapat diberikan bersama atau tanpa makanan', 'Zinc 5 Mg, Vitamin C 40 Mg.', 'IMUNPED SIRUP merupakan suplemen yang mengandung vitamin c dan zinc sulfat. Suplemen ini digunakan untuk membantu memelihara kesehatan tubuh pada bayi ', 'Dus, Botol @ 60 ml ', 'Untuk pencegahan dan pengobatan defisiensi zinc dan vitamin C', 'Darya Varia Laboratoria', 'Vitamin & Supplement ', 50000, '-', 0), (30, 'ELKANA SIRUP 60 ML', 'ELKANA_SIRUP_60_ML.jpg', 'vitamin', 'Dewasa dan anak-anak > 6 tahun', 'Sirup', 'Sebelum atau sesudah makan, dapat bersama makanan untuk absorpsi yang lebih baik atau jika timbul ketidak-nyamanan pada saluran cerna.', 'Tiap 5 ml mengandung : Vitamin A 2400 iu, Vitamin B1 4 mg, Vitamin B2 1.2 mg, Vitamin B6 1.2 mg, Vitamin B12 4 mcg, Vitamin C 60 mg, Vitamin D 400 IU, Nicotinamide 16 mg, Choline 12 mg, Inositol 12 mg, Ca 33.1 mg, Na 5.2 mg, L-Lysine HCl 200 mg.', 'ELKANA merupakan suplemen makanan dengan kandungan multivitamin dan mineral yang berfungsi sebagai pelengkap selama masa kehamilan, menyusui dan pertumbuhan. ', 'Dus, Botol @ 60 ml ', 'Defisiensi vitamin dan mineral', '<NAME>', 'Vitamin & Supplement ', 52000, 'Hentikan penggunaan jika terjadi reaksi alergi.', 0), (31, 'SCOTT\'S EMULSION VITA ORANGE 4', 'SCOTTS_EMULSION_VITA_ORANGE_400_ML.jpg', 'vitamin', '> 12 th : 3 x sehari 1 sendok ', 'Sirup', 'Sebelum / sesudah makan', 'Dalam setiap 15 mL : Cod Liver Oil ,Vit A 850 IU ,Vit D 85 IU ,Ca Hypophosphite 414 mg ,Orange juice\r\n', 'SCOTT\'S EMULSION VITA ORANGE mengandung minyak ikan cod, asam lemak omega 3 (DHA+EPA), Vitamin A, dan Vitamin D. Suplemen ini digunakan untuk mendukung fungsi kekebalan tubuh dan penglihatan normal, menjaga kesehatan tulang dan gigi serta bermanfaat untuk pembentukan tulang dan gigi. ', 'Dus, Botol @ 400 ml', 'Membantu membangun ketahanan alamiah tubuh dan mencegah kekurangan vitamin A dan D. Pertumbuhan dan perkembangan tulang dan gigi. ', 'GlaxoSmithKline Indonesia', 'Vitamin & Supplement ', 70000, '-', 0), (32, 'ACTIFED PLUS COUGH SUPRESSANT ', 'ACTIFED_PLUS_COUGH_SUPRESSANT_SIRUP_60_ML.jpg', 'FluBatuk', 'Dewasa dan anak diatas 12 tahu', 'Sirup', 'Sebelum atau sesudah makan\r\n', 'Tiap 5 ml sirup mengandung: Dextromethorphan HBr 10 mg, Pseudoephedrine HCl 30 mg, Triprolidine HCl 1.25 mg', ' ACTIFED PLUS COUGH SUPPRESANT merupakan obat dengan kandungan Dextromethorphan HBr, Pseudoephedrine HCl, dan Triprolidine HCl. Obat ini dapat digunakan untuk meringankan gejala flu serta batuk kering dan gatal tenggorokan. ', 'Dus, Botol @ 60 ml ', 'Meredakan gejala flu pilek dan batuk kering, serta gatal tenggorokan.', 'GlaxoSmithKline Indonesia', 'Blue', 80000, 'Hipertensi, kelebihan berat badan (overweight), gangguan fungsi hati, gangguan fungsi ginjal, glauko', 1), (33, 'HUFAGRIP FLU & BATUK SIRUP 60 ', 'HUFAGRIP_FLU_BATUK_SIRUP_60_ML.jpg', 'FluBatuk', 'Anak (6-12 tahun) : 3 kali seh', 'Sirup', 'Dikonsumsi sesudah makan', 'Paracetamol 120 mg, Pseudoephedrine HCL 7.5 mg, Chlorpheniramine maleate 0.5 mg, dan Gliceryl Guaiacolate 50 mg.', 'HUFAGRIP FLU & BATUK merupakan obat yang mengandung Paracetamol, Chlorpeniramin Maleat, Pseudoefedrin HCl dan Guaifenesin digunakan untuk mengobati gejala flu seperti demam, sakit kepala, hidung tersumbat disertai bersin. ', 'Dus, Botol @ 60 ml ', 'Untuk meringankan gejala- gejala flu seperti demam, sakit kepala, hidung tersumbat, dan bersin-bersin disertai batuk berdahak.', 'Gratia Husada Farma', 'Blue', 30000, 'Penderita dengan riwayat hipersensitif Paracetamol, Pseudoephedrine HCl,Chlorpheniramine Maleate dan', 0), (34, 'TRIAMINIC EKSPEKTORAN & PILEK ', 'TRIAMINIC_EKSPEKTORAN_PILEK_SIRUP_60_ML.jpg', 'FluBatuk', 'Anak 2-6 tahun : 3 x sehari 1/', 'Sirup', 'Dikonsumsi sebelum atau sesudah makan', 'Per 5 mL: Pseudoephedrine HCl 15 mg, guaifenesin 50 mg', 'TRIAMINIC EKSPEKTORAN & PILEK SIRUP adalah obat yang mengandung Pseudoefedrin dan Guaifenesin, digunakan untuk meringankan gejala pilek seperti bersin-bersin dan hidung tersumbat serta batuk berdahak.', 'Dus, Botol @ 60 ml ', 'Meringankan bersin-bersin, meringankan batuk berdahak, dan melegakan hidung tersumbat karena pilek. ', 'Novartis Indonesia', 'Blue', 70000, 'Gangguan ginjal dan hati, glaukoma, hipertrofi prostat, hipertiroidisme, hipertensi, wanita hamil da', 0), (35, 'DULCOLAX 5 MG 10 TABLET', 'DULCOLAX_5_MG_10_TABLET.jpg', 'SaluranPencernaan', 'Dewasa dan anak di atas usia 1', 'Tablet', 'Tablet dianjurkan untuk diminum pada malam hari (waktu kerja obat 6-12 jam) untuk mendapatkan buang air besar keesokan harinya.\r\n', 'Bisacodyl 5 mg\r\n', 'DULCOLAX TABLET merupakan obat dengan kandungan Bisacodyl dalam bentuk tablet salut enterik. Obat ini digunakan untuk untuk mengatasi masalah sembelit/susah BAB/konstipasi. Selain itu obat ini juga digunakan sebagai salah satu persiapan prosedur terapi diagnostic, terapi sebelum dan sesudah operasi dan dalam kondisi untuk mempercepat defekasi. DULCOLAX 5 MG TABLET bekerja dengan cara merangsang pergerakan pada usus besar dan membantu jalan keluar nya feses. ', 'Dus, 1 Blister @ 10 Tablet sal', 'Untuk mengatasi masalah sembelit/ susah BAB/ konstipasi. Untuk persiapan prosedur terapi diagnostic, terapi sebelum dan sesudah operasi dan dalam kondisi untuk mempercepat defekasi. ', 'Boehringer InGelheim', 'Blue', 32000, 'hipersensitif, pasien dengan ileus, obstruksi usus, kondisi perut akut termasuk radang usus buntu, p', 0), (36, 'LACTO-B SACHET 1 GR', 'LACTO-B_SACHET_1_GR.jpg', 'SaluranPencernaan', 'Anak 1-12 tahun : 3 sachet/har', 'Serbuk', 'Dapat dikonsumsi langsung dengan melarutkannya bersama air putih atau dikonsumsi bersama makanan untuk mengurangi ketidak-nyamanan pencernaan.\r\n', 'Serbuk krim nabati, Dekstrosa, Campuran bakteri laktat (Lactobacillus Acidophilus, Bifidobacterium Longum, Streptococcus Thermophillus), Vitamin C, Vitamin B1, Vitamin B2, Vitamin B6, Niacin, Zinc', 'LACTO-B merupakan suplemen dengan kandungan probiotik yang membantu fungsi saluran pencernaan. LACTO-B dapat digunakan untuk mengobati diare dan pencegahan intoleransi laktosa pada anak 1-12 tahun. ', 'Dus, 4 Pack @ 10 sachet', 'Diare dan pencegahan intoleransi laktosa', 'Novell Pharmaceutical Laboratories', 'Vitamin & Supplement ', 19000, '-', 0), (37, 'STIMUNO SIRUP RASA ANGGUR 100 ', '364441_stimuno_syrup_grape_100ml.jpg', 'CegahKorona', 'Anak-anak >1 tahun : 3 kali se', 'Sirup', 'setelah makan', 'Tiap 5 ml: Ekstrak tanaman Phyllanthus niruri 25 mg', 'STIMUNO SIRUP RASA ANGGUR SIRUP merupakan fitofarmaka yang mengandng ekstrak daun Meniran. Obat ini gunakan untuk membantu memperbaiki sistem imun, Suplemen ini mengandung bahan aktif dari ekstrak tanaman Phyllanthus niruri L yang digunakan untuk membantu memperbaiki sistem imun dan mempercepat proses penyembuhan dari sakit. ', 'Dus, Botol @ 100 ml', 'Membantu memperbaiki sistem imun (kekebalan tubuh), membantu merangsang tubuh memproduksi lebih banyak antibodi dan mengaktifkan sistem kekebalan tubuh agar daya tahan tubuh bekerja secara optimal ', 'Dexa Medica', 'Herbal', 40000, '-', 0), (38, 'IMBOOST KIDS SIRUP 120 ML', '37e924cea8419389043a3274f2bc7349.jpg', 'CegahKorona', 'Anak di atas usia 6 tahun : 5 ', 'Sirup', 'Dikonsumsi sesudah makan', 'Tiap 5 ml mengandung : Echinacea Purpurea extract 250 mg, Zn Picolinate 5 mg\r\n', 'IMBOOST KIDS SIRUP merupakan suplemen daya tahan tubuh yang bersifat Imunostimulan yang berfungsi untuk menjaga kesehatan tubuh agar tidak mudah sakit. Suplemen ini mengandung Echinacea purpurea herb dry extract dan Zn Piccolinate yang bekerja cepat mengaktifkan sistem daya tahan tubuh namun tetap aman untuk dikonsumsi. Imboost akan bekerja langsung di sistem pertahanan tubuh kita dengan memperbanyak antibodi sehingga daya tahan tubuh lebih kuat melawan serangan virus. ', 'Dus, Botol @ 120 ml', 'Meningkatkan kekebalan tubuh. Sebagai terapi tambahan untuk menstimulasi/meningkatkan sistem imun pada pasien infeksi akut atau kronik.', 'Soho Industri Pharmasi', 'Vitamin & Supplement ', 50000, 'Hentikan pemakaian jika terjadi reaksi alergi. - Tidak dianjurkan untuk digunakan lebih dari 8 mingg', 0); -- -------------------------------------------------------- -- -- Table structure for table `pemesanan` -- CREATE TABLE `pemesanan` ( `id_pemesanan` int(11) NOT NULL, `nama_lengkap` varchar(255) NOT NULL, `telepon` varchar(255) NOT NULL, `alamat` varchar(255) NOT NULL, `tanggal` date NOT NULL, `kota` varchar(255) NOT NULL, `kode_pos` varchar(255) NOT NULL, `kecamatan` varchar(255) NOT NULL, `kelurahan` varchar(255) NOT NULL, `provinsi` varchar(255) NOT NULL, `metode_pembayaran` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `id_user` int(11) NOT NULL, `quantity` int(11) NOT NULL, `total_harga` int(11) NOT NULL, `proses` int(11) NOT NULL, `id_m_p` int(11) NOT NULL, `harga_pengiriman` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `pemesanan` -- INSERT INTO `pemesanan` (`id_pemesanan`, `nama_lengkap`, `telepon`, `alamat`, `tanggal`, `kota`, `kode_pos`, `kecamatan`, `kelurahan`, `provinsi`, `metode_pembayaran`, `email`, `id_user`, `quantity`, `total_harga`, `proses`, `id_m_p`, `harga_pengiriman`) VALUES (1, 'rey', '895446454', 'kjgk', '2020-06-13', 'kjhk', '5466', '', 'pondok cabe', 'Jakarta', 'Treansfer Bank', '<EMAIL>', 7, 1, 10000, 1, 3, 30000), (2, '<NAME>', '895446454', 'kjgk', '2020-06-15', 'tangsel', '657', 'pamulang', 'pondok cabe', 'banten', 'Treansfer Bank', '<EMAIL>', 8, 1, 10000, 1, 2, 20000), (3, '<NAME>', '895446454', 'kjgk', '2020-06-15', 'tangsel', '5466', 'pamulang', 'pondok cabe', 'Jakarta', 'Treansfer Bank', '<EMAIL>', 8, 1, 10000, 1, 2, 20000), (4, '<NAME>', '895446454', 'pondok cabe udik ', '2020-06-16', '', '', '', '', '', 'Treansfer Bank', '<EMAIL>', 8, 1, 10000, 1, 1, 25000), (5, '<NAME>', '895446454', 'pondok cabe udik ', '2020-06-17', '', '', '', '', '', 'Treansfer Bank', '<EMAIL>', 8, 2, 70000, 0, 2, 20000), (6, '<NAME>', '86753735', 'jl. serua rt. 06 rw.01 pondok cabe udik, pamulang.', '2020-06-17', 'Tangerang Selatan', '15418', 'Pamulang', 'Pondok Cabe', 'Banten', 'Treansfer Bank', '<EMAIL>', 10, 2, 20000, 1, 2, 20000), (7, '<NAME>', '86753735', 'jl. serua rt. 06 rw.01 pondok cabe udik, pamulang.', '2020-06-19', '', '', '', '', '', 'Treansfer Bank', '<EMAIL>', 10, 2, 110000, 1, 3, 30000), (8, 'Anwar', '895446454', 'bojonsoang no 4', '2020-06-19', '', '', '', '', '', 'Treansfer Bank', '<EMAIL>', 11, 1, 32000, 1, 2, 20000), (9, 'Anwar', '895446454', 'bojonsoang no 4', '2020-06-19', '', '', '', '', '', 'Treansfer Bank', '<EMAIL>', 11, 2, 60000, 1, 2, 20000), (10, 'Dwi', '2147483647', 'Jl. kayu putih no.9 rt 06 rw 01 pondok cabe udik, ', '2020-06-19', 'Tangerang Selatan', '154186', 'Pamulang', 'Pondok Cabe', 'Banten', 'Treansfer Bank', '<EMAIL>', 12, 2, 20000, 1, 2, 20000), (11, 'Dwi', '2147483647', 'Jl. kayu putih no.9 rt 06 rw 01 pondok cabe udik, ', '2020-06-19', 'Tangerang Selatan', '154186', 'Pamulang', 'pondok cabe', '', 'Treansfer Bank', '<EMAIL>', 12, 2, 100000, 1, 2, 20000), (12, 'qwe', '<NAME>', '<NAME>, Pga, Jalan Telekomunikasi, Bojongsoang', '2020-06-25', 'Bojongsoang', '40288', 'dyk', 'bjs', 'bdg', 'Treansfer Bank', '<EMAIL>', 13, 1, 80000, 0, 1, 25000); -- -------------------------------------------------------- -- -- Table structure for table `rating` -- CREATE TABLE `rating` ( `id_rating` int(11) NOT NULL, `rating` float NOT NULL, `id_obat` int(11) NOT NULL, `tgl_rating` date NOT NULL, `id_user` int(11) NOT NULL, `id_transaksi` int(11) NOT NULL, `comment` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `rating` -- INSERT INTO `rating` (`id_rating`, `rating`, `id_obat`, `tgl_rating`, `id_user`, `id_transaksi`, `comment`) VALUES (1, 5, 18, '2020-06-13', 7, 1, 'mantappp'), (2, 4, 18, '2020-06-16', 8, 3, 'mantap bgt'), (3, 4, 18, '2020-06-17', 10, 5, 'sudah sampai'), (4, 3, 19, '2020-06-19', 10, 6, 'bagus'), (5, 5, 35, '2020-06-19', 11, 7, 'mantappp'), (6, 2, 18, '2020-06-19', 11, 8, 'good'), (7, 4, 18, '2020-06-19', 11, 8, 'guud'), (8, 3, 18, '2020-06-19', 12, 9, 'Bagus'), (9, 5, 19, '2020-06-26', 10, 6, 'bagus'), (10, 5, 18, '2020-06-26', 10, 5, 'BAGUS'); -- -------------------------------------------------------- -- -- Table structure for table `report` -- CREATE TABLE `report` ( `id_report` int(11) NOT NULL, `pesan` varchar(255) NOT NULL, `foto` varchar(255) NOT NULL, `id_transaksi` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `transaksi` -- CREATE TABLE `transaksi` ( `id_transaksi` int(11) NOT NULL, `id_pemesanan` int(11) NOT NULL, `tanggal` date NOT NULL, `status` int(11) NOT NULL, `bukti` varchar(255) NOT NULL, `resi` varchar(255) NOT NULL, `bank` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `transaksi` -- INSERT INTO `transaksi` (`id_transaksi`, `id_pemesanan`, `tanggal`, `status`, `bukti`, `resi`, `bank`) VALUES (1, 1, '2020-06-13', 3, '8d3341c1498f7ee96db415b4713a78b1.jpg', '6586', 'BRI'), (2, 3, '2020-06-15', 3, 'bukti-transfer-ranto-jasa-skripsi-5-WA0011.jpg', '35454', 'BRI'), (3, 2, '2020-06-16', 3, 'bukti-transfer-ranto-jasa-skripsi-5-WA0011.jpg', '35454', 'BCA'), (4, 4, '2020-06-16', 1, 'bukti-transfer-ranto-jasa-skripsi-5-WA0011.jpg', '', 'BRI'), (5, 6, '2020-06-17', 3, 'bukti-transfer-ranto-jasa-skripsi-5-WA0011.jpg', '645879', 'BCA'), (6, 7, '2020-06-19', 3, 'a487ec0f54c94492d5b57c1ad5e2c985--transfer.jpg', '786456', 'BRI'), (7, 8, '2020-06-19', 3, 'a487ec0f54c94492d5b57c1ad5e2c985--transfer.jpg', '645879', 'BRI'), (8, 9, '2020-06-19', 3, 'a487ec0f54c94492d5b57c1ad5e2c985--transfer.jpg', '35454', 'BRI'), (9, 10, '2020-06-19', 3, 'a487ec0f54c94492d5b57c1ad5e2c985--transfer.jpg', '8776876', 'BRI'), (10, 11, '2020-06-19', 0, '', '', ''); -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE `user` ( `id_user` int(10) NOT NULL, `nama_lengkap` varchar(40) NOT NULL, `alamat` varchar(50) NOT NULL, `telepon` int(12) NOT NULL, `email` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`id_user`, `nama_lengkap`, `alamat`, `telepon`, `email`) VALUES (7, 'rey', 'kayu utih rt 04', 895446454, '<EMAIL>'), (8, '<NAME>', 'pondok cabe udik ', 895446454, '<EMAIL>'), (9, '<NAME>', 'jl kayu putih no 9, Pondok Cabe Udik, Pamulang', 876534257, '<EMAIL>'), (10, '<NAME>', 'jl. serua rt. 06 rw.01 pondok cabe udik, pamulang.', 86753735, '<EMAIL>'), (11, 'Anwar', 'bojonsoang no 4', 895446454, '<EMAIL>'), (12, 'Dwi', 'Jl. kayu putih no.9 rt 06 rw 01 pondok cabe udik, ', 2147483647, '<EMAIL>'), (13, 'qwe', 'qwe', 2147483647, '<EMAIL>'); -- -- Indexes for dumped tables -- -- -- Indexes for table `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id_admin`); -- -- Indexes for table `artikel` -- ALTER TABLE `artikel` ADD PRIMARY KEY (`id_artikel`); -- -- Indexes for table `favorite` -- ALTER TABLE `favorite` ADD PRIMARY KEY (`id_favorite`), ADD KEY `id_user` (`id_user`); -- -- Indexes for table `keranjang` -- ALTER TABLE `keranjang` ADD PRIMARY KEY (`db_keranjang`), ADD KEY `id_user` (`id_user`), ADD KEY `id_transaksi` (`id_pemesanan`); -- -- Indexes for table `keranjang2` -- ALTER TABLE `keranjang2` ADD PRIMARY KEY (`id_keranjang`), ADD KEY `id_transaksi` (`id_pemesanan`), ADD KEY `id_user` (`id_user`); -- -- Indexes for table `login_user` -- ALTER TABLE `login_user` ADD PRIMARY KEY (`id_user`); -- -- Indexes for table `metode_pengiriman` -- ALTER TABLE `metode_pengiriman` ADD PRIMARY KEY (`id_m_p`); -- -- Indexes for table `obat` -- ALTER TABLE `obat` ADD PRIMARY KEY (`id_obat`); -- -- Indexes for table `pemesanan` -- ALTER TABLE `pemesanan` ADD PRIMARY KEY (`id_pemesanan`), ADD KEY `id_user` (`id_user`); -- -- Indexes for table `rating` -- ALTER TABLE `rating` ADD PRIMARY KEY (`id_rating`), ADD KEY `id_obat` (`id_obat`), ADD KEY `id_user` (`id_user`), ADD KEY `id_transaksi` (`id_transaksi`); -- -- Indexes for table `report` -- ALTER TABLE `report` ADD PRIMARY KEY (`id_report`), ADD KEY `id_transaksi` (`id_transaksi`); -- -- Indexes for table `transaksi` -- ALTER TABLE `transaksi` ADD PRIMARY KEY (`id_transaksi`), ADD KEY `id_pemesanan` (`id_pemesanan`); -- -- Indexes for table `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id_user`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `admin` -- ALTER TABLE `admin` MODIFY `id_admin` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `artikel` -- ALTER TABLE `artikel` MODIFY `id_artikel` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `favorite` -- ALTER TABLE `favorite` MODIFY `id_favorite` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `keranjang` -- ALTER TABLE `keranjang` MODIFY `db_keranjang` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- -- AUTO_INCREMENT for table `keranjang2` -- ALTER TABLE `keranjang2` MODIFY `id_keranjang` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `login_user` -- ALTER TABLE `login_user` MODIFY `id_user` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `metode_pengiriman` -- ALTER TABLE `metode_pengiriman` MODIFY `id_m_p` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `obat` -- ALTER TABLE `obat` MODIFY `id_obat` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39; -- -- AUTO_INCREMENT for table `pemesanan` -- ALTER TABLE `pemesanan` MODIFY `id_pemesanan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT for table `rating` -- ALTER TABLE `rating` MODIFY `id_rating` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `report` -- ALTER TABLE `report` MODIFY `id_report` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `transaksi` -- ALTER TABLE `transaksi` MODIFY `id_transaksi` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `user` -- ALTER TABLE `user` MODIFY `id_user` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- Constraints for dumped tables -- -- -- Constraints for table `favorite` -- ALTER TABLE `favorite` ADD CONSTRAINT `favorite_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`); -- -- Constraints for table `keranjang` -- ALTER TABLE `keranjang` ADD CONSTRAINT `keranjang_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`); -- -- Constraints for table `keranjang2` -- ALTER TABLE `keranjang2` ADD CONSTRAINT `keranjang2_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`); -- -- Constraints for table `rating` -- ALTER TABLE `rating` ADD CONSTRAINT `rating_ibfk_1` FOREIGN KEY (`id_obat`) REFERENCES `obat` (`id_obat`), ADD CONSTRAINT `rating_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`), ADD CONSTRAINT `rating_ibfk_3` FOREIGN KEY (`id_transaksi`) REFERENCES `transaksi` (`id_transaksi`); -- -- Constraints for table `report` -- ALTER TABLE `report` ADD CONSTRAINT `report_ibfk_1` FOREIGN KEY (`id_transaksi`) REFERENCES `transaksi` (`id_transaksi`); -- -- Constraints for table `transaksi` -- ALTER TABLE `transaksi` ADD CONSTRAINT `transaksi_ibfk_1` FOREIGN KEY (`id_pemesanan`) REFERENCES `pemesanan` (`id_pemesanan`) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<reponame>shafly96/rehabilitasi -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 23, 2018 at 07:38 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `rehabilitasi` -- -- -------------------------------------------------------- -- -- Table structure for table `gerak` -- CREATE TABLE `gerak` ( `id` int(11) NOT NULL, `nama_gerak` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gerak` -- INSERT INTO `gerak` (`id`, `nama_gerak`) VALUES (1, 'Menekan tombol'), (2, 'Memegang benda'), (3, 'Mengangkat benda'), (4, 'Mengayunkan benda'), (5, 'Memencet remote tv'), (6, 'Makan dengan sendok'), (7, 'Memilih barang di rak'), (8, 'Minum dari gelas'), (9, 'Memutar kran air'), (10, 'Membuka ganggang pintu'), (11, 'Menyikat gigi'); -- -------------------------------------------------------- -- -- Table structure for table `report` -- CREATE TABLE `report` ( `id` int(11) NOT NULL, `id_user` int(11) NOT NULL, `tanggal` datetime DEFAULT CURRENT_TIMESTAMP, `gerak` int(11) NOT NULL, `value` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `report` -- INSERT INTO `report` (`id`, `id_user`, `tanggal`, `gerak`, `value`) VALUES (1, 1, '2018-05-18 10:08:46', 1, 7), (2, 1, '2018-05-18 10:08:47', 1, 9); -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE `user` ( `id` int(11) NOT NULL, `user` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`id`, `user`) VALUES (1, 'Bambang'), (2, 'Winda'); -- -- Indexes for dumped tables -- -- -- Indexes for table `gerak` -- ALTER TABLE `gerak` ADD PRIMARY KEY (`id`); -- -- Indexes for table `report` -- ALTER TABLE `report` ADD PRIMARY KEY (`id`), ADD KEY `user` (`id_user`), ADD KEY `gerak` (`gerak`); -- -- Indexes for table `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `gerak` -- ALTER TABLE `gerak` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `report` -- ALTER TABLE `report` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `user` -- ALTER TABLE `user` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- Constraints for dumped tables -- -- -- Constraints for table `report` -- ALTER TABLE `report` ADD CONSTRAINT `report_ibfk_1` FOREIGN KEY (`gerak`) REFERENCES `gerak` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `user` FOREIGN KEY (`id_user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- phpMyAdmin SQL Dump -- version 4.0.10.14 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Nov 05, 2018 at 06:49 PM -- Server version: 5.5.52-cll -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `admin_myvidster` -- -- -------------------------------------------------------- -- -- Table structure for table `aro_payments` -- CREATE TABLE IF NOT EXISTS `aro_payments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `aro_address` varchar(100) NOT NULL, `aro_amount` decimal(16,8) NOT NULL, `message` varchar(56) NOT NULL, `posted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `status` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `aro_address` (`aro_address`), KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
{{ config(schema="test_normalization", tags=["nested-intermediate"]) }} -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select {{ quote('_AIRBYTE_PARTITION_HASHID') }}, cast(currency as {{ dbt_utils.type_string() }}) as currency, {{ quote('_AIRBYTE_EMITTED_AT') }} from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1') }} -- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes
--highest profit earning promos on the web create or replace function bestPromoWeb() returns TABLE(promo_sk int, profit_store decimal) language plpgsql as $$ begin return query select ws_promo_sk, sum(ws_net_profit) as posProfit from web_sales_history where ws_net_profit>0 and ws_promo_sk is not NULL group by ws_promo_sk order by posProfit desc limit 5; end; $$
INSERT INTO department(name) values ("Finance"),("Human Resources"),("IT"); INSERT INTO role(title,salary,department_id) values ("Accountant",40000,1),("Hiring Manager",50000,2), ("Programmer",45000,3); INSERT INTO employee(firstname,lastname,role_id) values ("Justin","Pinero",3), ("David","Gate",1),("Alex","Caruso",2);