]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/dev/benchmarking/ddl/1_06_table_public_language_implementation_version.sql
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / dev / benchmarking / ddl / 1_06_table_public_language_implementation_version.sql
1 /*
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"); you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 */
19
20
21 -- LANGUAGE_IMPLEMENTATION_VERSION
22 CREATE TABLE IF NOT EXISTS public.language_implementation_version
23 (
24 language_implementation_version_id SERIAL
25 , language_implementation_version citext NOT NULL DEFAULT ''
26 , benchmark_language_id integer NOT NULL
27 , PRIMARY KEY (language_implementation_version_id, benchmark_language_id)
28 , FOREIGN KEY (benchmark_language_id) REFERENCES public.benchmark_language
29 );
30 COMMENT ON TABLE public.language_implementation_version
31 IS 'The benchmark language implementation or compiler version, e.g. '
32 '''CPython 2.7'' or ''PyPy x.y'' or ''gcc 7.3.0'' or '
33 '''gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0''.';
34 COMMENT ON COLUMN public.language_implementation_version.language_implementation_version
35 IS 'The version number used in the benchmark environment (e.g. ''2.7'').';
36
37 -- CONSTRAINTS
38 ALTER TABLE public.language_implementation_version
39 ADD CONSTRAINT language_implementation_version_check_version_length
40 CHECK (char_length(language_implementation_version) < 255);
41
42 CREATE UNIQUE INDEX language_implementation_version_unique_index
43 ON public.language_implementation_version
44 (benchmark_language_id, language_implementation_version);
45 COMMENT ON INDEX language_implementation_version_unique_index
46 IS 'Enforce unique implementation versions for the languages.';