File: prefix.sql

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

SELECT
  p, (p||'m/m')::unit AS factor,
  ('0.001 '||p||'m')::unit AS "0.001 m",
  (p||'m')::unit AS "meter",
  ('1000 '||p||'m')::unit AS "1000 m",
  ('0.001 '||p||'g')::unit AS "0.001 g",
  (p||'g')::unit AS "gram",
  ('1000 '||p||'g')::unit AS "1000 g"
FROM
  prefixes;