Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7450388
053.sql
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
905 B
Subscribers
None
053.sql
View Options
-- SWH DB schema upgrade
-- from_version: 52
-- to_version: 53
-- description: Uniformize tmp_release and tmp_release_get tables to tmp_release
insert
into
dbversion
(
version
,
release
,
description
)
values
(
53
,
now
(),
'Work In Progress'
);
CREATE
OR
REPLACE
FUNCTION
swh_mktemp_release_get
()
RETURNS
void
LANGUAGE
sql
AS
$$
create
temporary
table
tmp_release
(
id
sha1_git
primary
key
)
on
commit
drop
;
$$
;
CREATE
OR
REPLACE
FUNCTION
swh_release_get
()
RETURNS
SETOF
release_entry
LANGUAGE
plpgsql
AS
$$
begin
return
query
select
r
.
id
,
r
.
target
,
r
.
target_type
,
r
.
date
,
r
.
date_offset
,
r
.
date_neg_utc_offset
,
r
.
name
,
r
.
comment
,
r
.
synthetic
,
p
.
id
as
author_id
,
p
.
name
as
author_name
,
p
.
email
as
author_email
from
tmp_release
t
inner
join
release
r
on
t
.
id
=
r
.
id
inner
join
person
p
on
p
.
id
=
r
.
author
;
return
;
end
$$
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 17, 7:22 AM (5 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3283530
Attached To
rDSTOC swh-storage-cassandra
Event Timeline
Log In to Comment