I write function which will add new version of file to the table. The user of function should be call update_file(path_to_file). I need load all content from file and store it to the table like:
insert into file(new_version, new_content);
Now I could find a way to read all content and put it to the table. The COPY command allows me get the file concatenate as sequence of lines. I see only way to contact the lines, but I don't like this approach.
Is there some good solution?
Thanks.