Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
ref-language
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
ref-language
Commits
8353a2b4
Commit
8353a2b4
authored
Mar 22, 2011
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed creation with already existing ref_languages table
parent
83b73085
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
8 deletions
+28
-8
ref-language-create.sql
sql/postgresql/ref-language-create.sql
+28
-8
No files found.
sql/postgresql/ref-language-create.sql
View file @
8353a2b4
...
...
@@ -7,14 +7,34 @@
-- ISO 639
create
table
language_codes
(
language_id
char
(
2
)
constraint
language_codes_language_id_pk
primary
key
,
name
varchar
(
100
)
constraint
language_codes_name_nn
not
null
);
-- fraber 110322: language_codes already existed in ]po[ V3.4,
-- so we have to put a "v_count" around this creation here.
create
or
replace
function
inline_0
()
returns
integer
as
'
declare
v_count integer;
begin
select count(*) into v_count from user_tab_columns
where lower(table_name) =
''
language_codes
''
;
IF v_count > 0 THEN return 1; END IF;
create table language_codes (
language_id char(2)
constraint language_codes_language_id_pk
primary key,
name varchar(100)
constraint language_codes_name_nn
not null
);
RETURN 0;
end;'
language
'plpgsql'
;
select
inline_0
();
drop
function
inline_0
();
comment
on
table
language_codes
is
'
This is data from the ISO 639-1 standard on language codes.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment