It doesn't throw an error because you're not actually sending a command yet. You are right, I was missing the semicolon, but why wouldn't it throw an error for that? It didn't say anything after I entered that command. My new question is how would I tell it to automatically edit the column on initial creation, instead of having it throw an error and then fixing that after the fact? I'm not quite sure this why this is the correct syntax, but it worked! When I saved it, it showed in a SQL Preview window that the correct syntax is:ĪLTER TABLE public.newtable_1 ALTER COLUMN TYPE varchar(512) USING ::varchar What am I doing wrong? Is there a way to do this in DBeaver? Or is there another way to get the data from the csv into postgres without running into this problem?ĮDIT- Nevermind guys, I figured it out! I just went into the column settings in DBeaver and edited the data type of that column. \d newtable_1 shows no change in the character length of that column. Now I am trying to increase the size of the problem column like this:ĪLTER TABLE newtable_1 ALTER COLUMN TYPE varchar(512)īut it's not doing anything. Which I take it means one of the columns doesn't have enough allowable character length for the data. `ERROR: value too long for type character varying(128)` I was able to create tables with other csv files no problem, but this one in particular gives me an error message whenever I try to import the data. The table has about 30 columns and 100k rows. I am trying to populate a table in postgres with a.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |