File: unit--3--4.sql.in

package info (click to toggle)
postgresql-unit 7.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,540 kB
  • sloc: sql: 1,768; ansic: 1,334; lex: 358; yacc: 140; perl: 100; makefile: 40; sh: 25
file content (16 lines) | stat: -rw-r--r-- 352 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- convert @ from (unit, cstring) to (unit, text)

DROP OPERATOR @ (unit, cstring);
DROP FUNCTION unit_at(unit, cstring);

CREATE FUNCTION unit_at(unit, text)
	RETURNS cstring
	SET search_path = @extschema@
	AS '$libdir/unit', 'unit_at_text'
	LANGUAGE C IMMUTABLE STRICT;

CREATE OPERATOR @ (
	leftarg = unit,
	rightarg = text,
	procedure = unit_at
);