-- 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)
CBSE Class VII English (Poorvi) Unit 5: Bravehearts — Rani Abbakka Questions and Answers
Let us do these activities before we read I. Solve the riddle given below and share your answer with your classmates and the...
-
Total No. of printed pages: 7 DLIEC/23/2024 District Level Internal Examination Committee, Kamrup Half Yearly Examination, 2023-24 Class:...
-
To check whether Apache is installed on an Ubuntu system, you can use the following methods: 1. Check Apache Service Status Run the f...
-
CBSE Class VIII Mathematics (Ganita Prakash) — 160-Day Lesson Plan A comprehensive, day-to-day instructional p...
No comments:
Post a Comment