2024年3月12日

摘要: 背景 Oracle 的 timestamp_to_scn 函数能根据时间戳返回一个 SCN(System Change Number). scn 与事务有关,当系统有事务提交后,最新的 scn 就会变更成一个更大的值。 ORA_ROWSCN 在 Oracle 中记录了每一行提交后的 scn. 在 L 阅读全文
posted @ 2024-03-12 16:17 winter-loo 阅读(42) 评论(0) 推荐(0)

2024年3月8日

摘要: The SQL select xmin::text::int8; grammar a_expr: a_expr TYPECAST Typename { $$ = makeTypeCast($1, $3, @2); } static Node * makeTypeCast(Node *arg, Typ 阅读全文
posted @ 2024-03-08 09:20 winter-loo 阅读(19) 评论(0) 推荐(0)

2024年3月6日

摘要: 开启行级别改变记录 create table foo3(a int) rowdependencies; 插入数据 insert into foo3 values (1); insert into foo3 values (2); -- 结果为 null select ora_rowscn from 阅读全文
posted @ 2024-03-06 15:42 winter-loo 阅读(33) 评论(0) 推荐(0)

2024年2月29日

摘要: ![image](https://img2024.cnblogs.com/blog/731236/202402/731236-20240229204346235-1972136754.png) 阅读全文
posted @ 2024-02-29 20:44 winter-loo 阅读(7) 评论(0) 推荐(0)

2024年2月22日

摘要: 背景 Oracle 的 create view 语句可以带有 WITH READ ONLY 选项。为了使 Oracle 的 sql 代码更方便迁移到 LightDB 中,24.1 版本中新增了 WITH READ ONLY 语法。目前用户不能在只读视图上执行 update/insert 操作更新基表 阅读全文
posted @ 2024-02-22 15:58 winter-loo 阅读(43) 评论(0) 推荐(0)

2024年2月21日

摘要: 背景 lightdb 为兼容 Oracle 的存储过程创建了 plorsql 核心插件。在 lightdb 23.4 及之前版本,plorasql 存储过程只支持基本的语法校验(check_function_bodies = on 时)。从 lightdb 24.1 版本开始,lightdb 新增 阅读全文
posted @ 2024-02-21 18:11 winter-loo 阅读(17) 评论(0) 推荐(0)

2024年2月6日

摘要: based on postgres commit b96115acb8a0e08a46877c2b8ef2a7b5560b371b The SQL CREATE OR REPLACE FUNCTION demo_fors() RETURNS VOID AS $$ DECLARE a RECORD; 阅读全文
posted @ 2024-02-06 12:10 winter-loo 阅读(50) 评论(0) 推荐(0)

2024年1月30日

摘要: postgre version 17(commit hash: a17aa50d67bad4ee39a94988c679d2c2fed0e934) The SQL CREATE FUNCTION process_orders() RETURNS void AS $$ DECLARE c record 阅读全文
posted @ 2024-01-30 20:06 winter-loo 阅读(35) 评论(0) 推荐(0)

2024年1月22日

摘要: 背景 在 Mysql 的建表语法中,用户可以使用 index 关键字指定列名作为索引。在 LightDB 24.1 中支持了该语法的部分特性。 用例 -- use default index name create table foo(a int, index (a)); -- create uni 阅读全文
posted @ 2024-01-22 11:58 winter-loo 阅读(26) 评论(0) 推荐(0)
摘要: 背景 在 Oracle 中,>=, <=, !=, <> 操作符字符之间允许存在空格。为兼容这种特性,LightDB 24.1 中对这些比较操作符作了特殊处理。 用例 select count(*) from dual where 1 > = 1; select count(*) from dual 阅读全文
posted @ 2024-01-22 11:43 winter-loo 阅读(11) 评论(0) 推荐(0)

导航