问题
I have a function parse_sdf(text)
.
When I call the function like this:
INSERT INTO test.table("Id", "Test")
(SELECT props -> 'Id', props -> 'Test' FROM parse_sdf());
When I execute the INSERT
with pgsql
I want to pass as a parameter a text file which I download via curl
.
Like this:
INSERT INTO test.table("Id", "Test")
(SELECT props -> 'Id', props -> 'Test' FROM parse_sdf('curl http://test/Files/text.txt'));
But it doesn't work. Is there a way to accomplish this?
UPDATE:
Postgres version: 10
Command will be executed with ExecuteSqlCommand command from Npgsql package for EF Core.
来源:https://stackoverflow.com/questions/50004712/postgresql-how-to-use-curl-with-function