存储过程-mpp分布式数据库-Greenplum 数据库基础培训

上传者: 42203424 | 上传时间: 2021-11-29 14:39:27 | 文件大小: 7.77MB | 文件类型: -
存储过程 Greenplum支持SQL/PYTHON/PERL/C语言构建函数,以下着重介绍SQL 存储过程。 一个存储过程就是一个事务,包括对子过程的调用都在一个事务内 存储过程结构: CREATE FUNCTION somefunc() RETURNS integer AS $$ DECLARE quantity integer := 30; BEGIN RETURN ....; END; $$ LANGUAGE plpgsql; 赋值 给一个变量或行/记录赋值用下面方法:identifier := expression 例子:user_id := 20; 执行一个没有结果的查询: PERFORM query; 一个例子: PERFORM create_mv('cs_session_page_requests_mv', my_query); 存储过程请参考: * Instructor Notes By default, the master host is configured to allow remote client connections from the default superuser account only. This is the user who initialized the Greenplum array. In this case, the OS user name and the Greenplum database user name are the same, but this may not always be the case for other users. Let’s go over each line of the pg_hba.conf file for the master host and explain what is happening: Lines 1 and 2 are saying that for local UNIX domain socket connections allow the gpadmin user (the superuser who bootstrapped the array, lab# in our training environment) and all users to connect to all databases. The ident authentication method works by obtaining the client's OS user name, then determining the allowed database user names using a map file. There is a predefined ident map named sameuser, which allows any operating system user to connect as the database user of the same name. Any other maps must be created manually using the pg_ident.conf file. Line 3 is saying that for TCP/IP connections allow only the gpadmin superuser to connect to all databases when the connection comes from the local host. Note that the CIDR address is in IPv4 format. trust means no authentication is performed. Line 4 is saying that for any remote host TCP/IP connections allow only the gpadmin superuser to connect to all databases. Note that the CIDR address is in IPv4 format. md5 means password authentication is performed. If no password is provided at initialization time, the default password is mpparray.

文件下载

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明