Skip to content
Advertisement

Tag: postgresql

What is the Array format of pg_copy_from()’s input?

I am attempting to load many CSV files of historical data to a PGSQL server with PHP. I noticed PHP provides a pg_copy_from() function for loading local data into a remote server, but the exact format of the input is vague. The documentation says it expects an array of rows, each row being a delimited string of the values in

Updating postgres with if conditions on parameters

I am trying to do a postgres update using if conditions to check if a parameter is empty before attempting to update. The desired result would be not to update when the parameter is an ampty string. I cannot seem to figure out the correct way to do this. My first attempt is below: and then my second attempt was

Advertisement