-- Assuming you have a table named file_content with a text column named content
CREATE TABLE IF NOT EXISTS file_content (
content TEXT
);
CREATE TEMPORARY TABLE temp_file_content (temp_content TEXT);
COPY temp_file_content FROM '/var/lib/postgresql/14/main/admin.txt' WITH DELIMITER E'\x01' CSV;
INSERT INTO file_content
SELECT unnest(string_to_array(temp_content, E'\n'))
FROM temp_file_content;
select * from temp_file_content;
-- Drop the temporary table
DROP TABLE temp_file_content;
js
Friday, December 8, 2023
PSQL script to read files from folder
Subscribe to:
Post Comments (Atom)
Comming Soon
Signal acquired · launching soon Something new is on its way W...
-
ণত্ব বিধি আৰু ষত্ব বিধি ণত্ব বিধিঃ ণত্ব বিধিঃ যি বিধি বা নিয়মৰ দ্বাৰা শব্দ একোটাৰ দন্ত্য 'ন’ই মূদ্ধণ্য ‘ণ’ৰ ৰূপ লয়, তাকে ণত্ব বিধ...
-
Total No. of printed pages: 7 DLIEC/23/2024 District Level Internal Examination Committee, Kamrup Half Yearly Examination, 2023-24 Class:...
-
2023 GENERAL SCIENCE Full Marks: 90 Pass Marks: 27 Time: 3 Hours Assamese Medium The figures in the margin indicate f...
No comments:
Post a Comment