Search Postgresql Archives

tracking errors in psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've just gotten a dump from pgMyAdmin for a production database that i wanted to update the dev db with. However, i'm seeing a multitude of errors. From what i can see, the columns are mixed up in the COPY block for a particular table. My guess is that a tab character has thrown everything into disaray. The dump is structure & data, using COPY FROM STDIN.

I have two questions:

1) What is the best way to track these errors? They pile up on each other, so i can't just scroll back in the terminal (I could set the buffer higher but i'd be scrolling all day).

2) Does anyone have any suggestions for removing the tabs in this table's column? There's no good reason for them there (it's all HTML) so i don't mind just removing them altogether. Do i need to use regexp_replace(), or would replace() do the job? And are there any quoting specifics required in order that the tab character is recognised?

Is this fine as is?

UPDATE member SET bio = replace(bio, '\t', '');

brian


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux