-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpg_fastbcp--1.0.sql
More file actions
57 lines (53 loc) · 1.72 KB
/
pg_fastbcp--1.0.sql
File metadata and controls
57 lines (53 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- Safe version of pg_fastbcp function with full parameter support
CREATE OR REPLACE FUNCTION xp_RunFastBcp_secure(
connectiontype text DEFAULT NULL,
sourceconnectstring text DEFAULT NULL,
dsn text DEFAULT NULL,
provider text DEFAULT NULL,
server text DEFAULT NULL,
user_ text DEFAULT NULL,
password text DEFAULT NULL,
trusted boolean DEFAULT NULL,
database_name text DEFAULT NULL,
applicationintent text DEFAULT NULL,
fileinput text DEFAULT NULL,
query text DEFAULT NULL,
sourceschema text DEFAULT NULL,
sourcetable text DEFAULT NULL,
fileoutput text DEFAULT NULL,
directory text DEFAULT NULL,
timestamped boolean DEFAULT NULL,
encoding text DEFAULT NULL,
delimiter text DEFAULT NULL,
usequotes boolean DEFAULT NULL,
dateformat text DEFAULT NULL,
decimalseparator text DEFAULT NULL,
boolformat text DEFAULT NULL,
noheader boolean DEFAULT NULL,
parquetcompression text DEFAULT NULL,
cloudprofile text DEFAULT NULL,
parallelmethod text DEFAULT NULL,
paralleldegree integer DEFAULT NULL,
distributekeycolumn text DEFAULT NULL,
datadrivenquery text DEFAULT NULL,
merge boolean DEFAULT NULL,
loglevel text DEFAULT NULL,
runid text DEFAULT NULL,
settingsfile text DEFAULT NULL,
config text DEFAULT NULL,
nobanner boolean DEFAULT NULL,
license text DEFAULT NULL,
fastbcp_path text DEFAULT NULL
)
RETURNS TABLE (
exit_code integer,
output text,
total_rows bigint,
total_columns integer,
total_time bigint
) AS 'pg_fastbcp','xp_RunFastBcp_secure'
LANGUAGE C;
CREATE OR REPLACE FUNCTION pg_fastbcp_encrypt(password text)
RETURNS text
AS 'pg_fastbcp', 'pg_fastbcp_encrypt'
LANGUAGE C STRICT;