doc/development/postgresql_vfs_testdata.sql

Sun, 27 Nov 2022 10:20:10 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 27 Nov 2022 10:20:10 +0100
changeset 442
05c2b62448b1
parent 283
25e5b771677d
permissions
-rw-r--r--

fix stdout log message duplicates

278
38bf7b42b58c implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1
281
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
2 do $$
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
3 declare
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
4 res_id int;
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
5 begin
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
6 insert into Resource (nodename, iscollection) values ('', true);
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
7 res_id := lastval();
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
8
283
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
9 insert into Resource(parent_id, nodename, resoid) values
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
10 (res_id, 'file1.txt', (select lo_create(0))),
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
11 (res_id, 'file2.txt', (select lo_create(0))),
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
12 (res_id, 'file3.txt', (select lo_create(0))),
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
13 (res_id, 'file4.txt', (select lo_create(0)));
281
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
14
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
15 insert into Resource(parent_id, nodename, iscollection) values
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
16 (res_id, 'dir1', true);
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
17 res_id := lastval();
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
18
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
19 insert into Resource(parent_id, nodename, iscollection) values
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
20 (res_id, 'dir2', true);
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
21 res_id := lastval();
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
22
283
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
23 insert into Resource(parent_id, nodename, resoid) values
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
24 (res_id, 'd1file1.txt', (select lo_create(0))),
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
25 (res_id, 'd2file1.txt', (select lo_create(0))),
25e5b771677d minimal working send_file with postgresql vfs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 281
diff changeset
26 (res_id, 'd2file2.txt', (select lo_create(0)));
278
38bf7b42b58c implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27
281
e9dc53661df4 add pg vfs stat/fstat implementation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 278
diff changeset
28 end $$;
278
38bf7b42b58c implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29

mercurial