Mon, 31 Jan 2022 17:18:12 +0100
add basic postgresql vfs directory functions
278
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | insert into Resource (nodename, iscollection) values ('', true); |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | insert into Resource(parent_id, nodename) values |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | ((select resource_id from Resource where parent_id is null), 'file1.txt'), |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | ((select resource_id from Resource where parent_id is null), 'file2.txt'), |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | ((select resource_id from Resource where parent_id is null), 'file3.txt'), |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | ((select resource_id from Resource where parent_id is null), 'file4.txt'); |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
11 | insert into Resource(parent_id, nodename, iscollection) values |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | ((select resource_id from Resource where parent_id is null), 'dir1', true); |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | insert into Resource(parent_id, nodename, iscollection) values |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | ((select resource_id from Resource where nodename = 'dir1'), 'dir2', true); |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
17 | insert into Resource(parent_id, nodename) values |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
18 | ((select resource_id from Resource where nodename = 'dir1'), 'd1file1.txt'), |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | ((select resource_id from Resource where nodename = 'dir2'), 'd2file1.txt'), |
38bf7b42b58c
implement pg_vfs_open
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | ((select resource_id from Resource where nodename = 'dir2'), 'd2file2.txt'); |