Trying to do this query:

BEGIN; CREATE TEMP TABLE tmporient ON COMMIT DROP AS SELECT * FROM orient_parameters WITH NO DATA; COPY tmporient FROM 'D:/downloads/BOKZ1.txt' DELIMITER ' '; SELECT * FROM tmporient LIMIT 1; SELECT tmporient.DateTime FROM tmporient; INSERT INTO orient_parameters SELECT DISTINCT ON (tmporient.KA_num,tmporient.DateTime,tmporient.Time_pr)* FROM tmporient; COMMIT; 

A query on all columns is performed:
enter image description here

And when you try to select a separate error is issued:
enter image description here

What could be the problem?

    1 answer 1

    In order for PostgreSQL to take a case of letters into a field name, you need to take the name in double quotes:

     SELECT "DateTime" FROM tmporient; 

    You specified without quotes - accordingly, there was an attempt to find the datetime field, which, as written in the error text, does not exist.