<< Click to Display Table of Contents >> Navigation: Supported database systems > PostgreSQL > Troubleshooting |
If the Microsoft Visual Studio C++ Redistributable run-time library has not been installed you will get the following warning:
If the correct version of the run-time library has not been installed you will get this notification:
Dispatch automatically installs all of the necessary PostgreSQL library files. This situation only occurs when Dispatch can't load libpq.dll because it cannot find files from the Visual Studio run-time that it depends on.
While it's possible that we could, we have decided not to include or attempt to install the Visual Studio run-time with the Dispatch setup for administrative and security reasons.
Therefore, the Microsoft Visual Studio 2013 (VC++ 12.0) C++ Redistributable run-time library must be downloaded and installed. The file you need is for the X86 architecture (32-bit x86) and is named vcredist_x86.exe.
The run-time library can be downloaded here: https://aka.ms/highdpimfc2013x86enu
Below is an example of how to correct this issue if the key sequence for the Order Item table (dsptch30_contract_item) becomes corrupted.
First, using pgAdmin, determine the column name of the key sequence the dsptch30_contract_item table. Row_id is the name of the unique row identifier:
SELECT pg_get_serial_sequence('dsptch30_contract_item', 'row_id')
Next, find out what the next value in the sequence:
a. SELECT nextval('dsptch30_contract_item_row_id_seq')
Or you can use:
b. SELECT nextval((select pg_get_serial_sequence('dsptch30_contract_item', 'row_id')))
Now, find out the maximum value in the sequence:
SELECT MAX(row_id) FROM dsptch30_contract_item)
If maximum value is less than next value, update the sequence:
SELECT setval('dsptch30_contract_item_row_id_seq', (SELECT MAX(row_id) FROM dsptch30_contract_item) + 1)
https://stackoverflow.com/questions/4448340/postgresql-duplicate-key-violates-unique-constraint