Need some one help with this node


the problem indicate while adding data to PostgreSQL

Hi, you would surely need a way to escape the special characters correctly before trying to insert them. there are specialized libraries for this. it depends whether you are self-hosted or not if you are able to use them. another option would be to regex in a code node or something similar

1 Like

yeah I think so but I’m not that PostgreSQL expert only 2 days with it hope someone can help
maybe clean it first? but what special chars should it be?

I’ve setup 2 instance (docker compose) one on ec2 (aws) this one is on my local machine but use https via Cloudflare tunnel

Hi, I think the URI / URL characters pose a problem like ‘/’ etc. Just to confirm my hunch, try to manually edit the values to contain only non-special characters. like (test1, test2, etc) to confirm everything else is working. then you might want to lookup what the special characters are and/or ask chatgpt to create/build an example function for a regex in js that can escape special characters for SQL. but the first thing is to confirm whether the problem is what we think the problem is. just try with test values.

2 Likes

that’s the plan thank you very much mate have a good day

1 Like

no problem.

I used this one before sqlstring - npm.

but it requires specific installation and env variables etc. if you plan to use it often, give it a try.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.