You need to import data into a textarea column, and the database is a postgresql (version 9.4 or higher)
You are working with the table grid editor to collect data around how IP routing should be modified. The table grid is a very simple one detailing out
- type of operation
The grid configuration is as follows
When accessing the data in psql (or any other sql client), you find out that the data is not what you expect
Textarea columns are created as large objects allowing to store huge amount of data (the exact size depends a bit on the database - in case of postgresql, you can store up to 1 GB).
In postgresql, large objects are stored in a separate table, pg_largeobject, and the number is the id of that large object. More information on this subject can be found in the postgresql documentation:
Assume that you plan to migrate the table grid tables from mysql to postgresql, you need to make sure that the content of the textarea attributes are stored in the pg_largeobject table (and not in the grid table itself). If you would store the text information directly in the table you bump into mystical error messages such as
The proper way of storing this data is by using the lo_ functions as documented on
To store data into the example table grid, you would do compose following insert query
The lo_from_bytea function will do all the hard work
- Create a large object
- write the content of the large object in the pg_largeobject table
- Return the id of the large object
Of course, when you write data, you would also like to read data (else it is not very useful, is it). Here you need to use the lo_get function to retrieve the content of the large object
This results in a hexadecimal notation
So, you need to do some extra conversion using the convert_from function
In case all this stuff looks a bit complicated, you are right, it is.
Just let us know and we'll try to help. Check our support options here.