File: paths.out

package info (click to toggle)
postgresql-pllua 1%3A2.0.10-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,316 kB
  • sloc: ansic: 14,369; sql: 2,181; makefile: 163; sh: 59; javascript: 38
file content (26 lines) | stat: -rw-r--r-- 754 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--
\set VERBOSITY terse
--
create function pg_temp.tmp1(n text) returns text
  language plluau immutable strict
  as $$ return (require "pllua.paths")[n]() $$;
-- some of the dirs might not actually exist, so we test only the
-- important ones. We can't actually test that the dir exists or what
-- the contents are, since many pg versions reject pg_stat_file on
-- absolute paths; so just check that we got some string that looks
-- like a path.
select u.n, f.path ~ '^(?:[[:alpha:]]:)?/'
  from unnest(array['bin','lib','libdir','pkglib','share'])
         with ordinality as u(n,ord),
       pg_temp.tmp1(u.n) f(path)
 order by u.ord;
   n    | ?column? 
--------+----------
 bin    | t
 lib    | t
 libdir | t
 pkglib | t
 share  | t
(5 rows)

--end