How to insert very big XML data file to PostgreSQLHow to insert (file) data into a PostgreSQL bytea...
What happened to Hermione’s clothing and other possessions after she wiped her parents’ memories of her?
Is it possible to detect 100% of SQLi with a simple regex?
Are there historical references that show that "diatonic" is a version of 'di-tonic' meaning 'two tonics'?
How do I add a strong "onion flavor" to the biryani (in restaurant style)?
Process substitution inside a subshell to set a variable
Is "accuse people to be racist" grammatical?
Is it really OK to use "because of"?
How can I keep my gold safe from other PCs?
Is it possible to set values for a list of variables using a for loop?
Did ancient Germans take pride in leaving the land untouched?
Disk space full during insert, what happens?
Do the speed limit reductions due to pollution also apply to electric cars in France?
Is layered encryption more secure than long passwords?
Lubuntu 18.10 File Manager: How to view directory tree structure?
What could cause an entire planet of humans to become aphasic?
Why did Ylvis use "go" instead of "say" in phrases like "Dog goes 'woof'"?
show notifications of new e-mails without displaying the content
How can I put a period right after the algorithm's number in the algorithm's title?
Taking an academic pseudonym?
Isn't a semicolon (';') needed after a function declaration in C++?
In a post-apocalypse world, with no power and few survivors, would Satnav still work?
Players preemptively rolling, even though their rolls are useless or are checking the wrong skills
Crack the bank account's password!
Sing Baby Shark
How to insert very big XML data file to PostgreSQL
How to insert (file) data into a PostgreSQL bytea column?How to insert (file) data into a PostgreSQL bytea column?SQL to read XML from file into PostgreSQL databaseLoading XML documents to Oracle 11g DB with control fileRETURN NEXT in Postgres FunctionHow to Insert records from remote database to local database using dblink in postgresql 9.3mysql to postgresql, migrate files directly ( longblob > pg_largeobject )Selecting from a table contains a XML columnHow can I import data from a NetCDF file into SQL Server?Use non-printable characters in SQL Server BCP xml format file as TERMINATORPostgresql - Large object exists in pg_largeobject table but cannot open with lo_open?
I'm using PostgreSQL 9.5 and trying to import XML data file to database.
To load the XML I use this function from here
CREATE OR REPLACE FUNCTION bytea_import(p_path text, p_result out bytea) as
$$
DECLARE
l_oid oid;
BEGIN
SELECT lo_import(p_path) INTO l_oid;
SELECT lo_get(l_oid) INTO p_result;
PERFORM lo_unlink(l_oid);
END;
$$
LANGUAGE plpgsql;
I successfully load data from a small XML file, but when I try a 4GB XML file,
it returns error:
SQL Error [54000]: ERROR: large object read request is too large
Where: SQL statement "SELECT lo_get(l_oid)" PL/pgSQL function
bytea_import(text) line 6 at SQL statement.
It seems lo_get cannot read/extract very large data.
It's said that since version 9.4, PostgreSQL can handle up to 4TB, so how can I import very large XML data file to PostgreSQL 9.5?
Thanks in advance
postgresql import xml plpgsql blob
New contributor
add a comment |
I'm using PostgreSQL 9.5 and trying to import XML data file to database.
To load the XML I use this function from here
CREATE OR REPLACE FUNCTION bytea_import(p_path text, p_result out bytea) as
$$
DECLARE
l_oid oid;
BEGIN
SELECT lo_import(p_path) INTO l_oid;
SELECT lo_get(l_oid) INTO p_result;
PERFORM lo_unlink(l_oid);
END;
$$
LANGUAGE plpgsql;
I successfully load data from a small XML file, but when I try a 4GB XML file,
it returns error:
SQL Error [54000]: ERROR: large object read request is too large
Where: SQL statement "SELECT lo_get(l_oid)" PL/pgSQL function
bytea_import(text) line 6 at SQL statement.
It seems lo_get cannot read/extract very large data.
It's said that since version 9.4, PostgreSQL can handle up to 4TB, so how can I import very large XML data file to PostgreSQL 9.5?
Thanks in advance
postgresql import xml plpgsql blob
New contributor
add a comment |
I'm using PostgreSQL 9.5 and trying to import XML data file to database.
To load the XML I use this function from here
CREATE OR REPLACE FUNCTION bytea_import(p_path text, p_result out bytea) as
$$
DECLARE
l_oid oid;
BEGIN
SELECT lo_import(p_path) INTO l_oid;
SELECT lo_get(l_oid) INTO p_result;
PERFORM lo_unlink(l_oid);
END;
$$
LANGUAGE plpgsql;
I successfully load data from a small XML file, but when I try a 4GB XML file,
it returns error:
SQL Error [54000]: ERROR: large object read request is too large
Where: SQL statement "SELECT lo_get(l_oid)" PL/pgSQL function
bytea_import(text) line 6 at SQL statement.
It seems lo_get cannot read/extract very large data.
It's said that since version 9.4, PostgreSQL can handle up to 4TB, so how can I import very large XML data file to PostgreSQL 9.5?
Thanks in advance
postgresql import xml plpgsql blob
New contributor
I'm using PostgreSQL 9.5 and trying to import XML data file to database.
To load the XML I use this function from here
CREATE OR REPLACE FUNCTION bytea_import(p_path text, p_result out bytea) as
$$
DECLARE
l_oid oid;
BEGIN
SELECT lo_import(p_path) INTO l_oid;
SELECT lo_get(l_oid) INTO p_result;
PERFORM lo_unlink(l_oid);
END;
$$
LANGUAGE plpgsql;
I successfully load data from a small XML file, but when I try a 4GB XML file,
it returns error:
SQL Error [54000]: ERROR: large object read request is too large
Where: SQL statement "SELECT lo_get(l_oid)" PL/pgSQL function
bytea_import(text) line 6 at SQL statement.
It seems lo_get cannot read/extract very large data.
It's said that since version 9.4, PostgreSQL can handle up to 4TB, so how can I import very large XML data file to PostgreSQL 9.5?
Thanks in advance
postgresql import xml plpgsql blob
postgresql import xml plpgsql blob
New contributor
New contributor
New contributor
asked 2 mins ago
BonZBonZ
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
BonZ is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230591%2fhow-to-insert-very-big-xml-data-file-to-postgresql%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
BonZ is a new contributor. Be nice, and check out our Code of Conduct.
BonZ is a new contributor. Be nice, and check out our Code of Conduct.
BonZ is a new contributor. Be nice, and check out our Code of Conduct.
BonZ is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230591%2fhow-to-insert-very-big-xml-data-file-to-postgresql%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown