[GENERAL] How to store text files in the postgresql?

2009-06-06 Thread DimitryASuplatov
Hello, I am very new to postgresql database. I`ve used a little of MySql previously. My task is to store a lot (10^5) of small ( <10 MB) text files in the database with the ability to restore them back to the hard drive on demand. That means that I need two functions. First - grab file from the

Re: [GENERAL] How to store text files in the postgresql?

2009-06-06 Thread DimitryASuplatov
Thank you very much. I`ve also worked out how to do this simply from bash ./bin/psql mypdb < On 06/06/2009 14:37, DimitryASuplatov wrote: > > But then comes the problem because the only command I found to read in > > the file content is COPY but the following command would no

Re: [GENERAL] How to store text files in the postgresql?

2009-06-06 Thread DimitryASuplatov
Thank you for answering. I`ve read a manual and now I have a more advanced question. 1/ I`ve created a table in the database mypdb=# create table pdb( index int, filename text, filecontent text ); 2/ Then I want to read a file into it First I insert metainfo mypdb=# insert into pdb (index , f

[GENERAL] ERROR: row is too big: size 8176, maximum size 8160

2010-03-04 Thread DimitryASuplatov
Hello, I am using postgresql-8.3.7 and have recently got this error: org.postgresql.util.PSQLException: ERROR: row is too big: size 8168, maximum size 8160 How is that possible in version 8+? I`ve found some old version 7 manuals that suggest editing /src/include/config.h file but I did not