Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8392378
public.swh_skipped_content_add.sql
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
public.swh_skipped_content_add.sql
View Options
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.2
-- Dumped by pg_dump version 9.6.2
SET
statement_timeout
=
0
;
SET
lock_timeout
=
0
;
SET
idle_in_transaction_session_timeout
=
0
;
SET
client_encoding
=
'UTF8'
;
SET
standard_conforming_strings
=
on
;
SET
check_function_bodies
=
false
;
SET
client_min_messages
=
warning
;
SET
row_security
=
off
;
SET
search_path
=
public
,
pg_catalog
;
--
-- Name: swh_skipped_content_add(); Type: FUNCTION; Schema: public; Owner: ndandrim
--
CREATE
FUNCTION
swh_skipped_content_add
()
RETURNS
void
LANGUAGE
plpgsql
AS
$$
begin
insert
into
skipped_content
(
sha1
,
sha1_git
,
sha256
,
blake2s256
,
length
,
status
,
reason
,
origin
)
select
distinct
sha1
,
sha1_git
,
sha256
,
blake2s256
,
length
,
status
,
reason
,
origin
from
tmp_skipped_content
where
(
coalesce
(
sha1
,
''
),
coalesce
(
sha1_git
,
''
),
coalesce
(
sha256
,
''
))
in
(
select
coalesce
(
sha1
,
''
),
coalesce
(
sha1_git
,
''
),
coalesce
(
sha256
,
''
)
from
swh_skipped_content_missing
()
);
-- TODO XXX use postgres 9.5 "UPSERT" support here, when available.
-- Specifically, using "INSERT .. ON CONFLICT IGNORE" we can avoid
-- the extra swh_content_missing() query here.
return
;
end
$$
;
ALTER
FUNCTION
public
.
swh_skipped_content_add
()
OWNER
TO
ndandrim
;
--
-- PostgreSQL database dump complete
--
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 6:58 PM (11 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398881
Attached To
rDDBA Live Database Audit
Event Timeline
Log In to Comment