title: Postgres truncates trailing zeros for timestamps
body: <p>Postgres (V11.3, 64bit, Windows) truncates trailing zeros for timestamps. So if I insert the timestamp '2019-06-12 12:37:07.880' into the table and I read it back as text postgres returns '2019-06-12 12:37:07.88'.</p>
  
  <pre><code>Table date_test:
  CREATE TABLE public.date_test (
    id SERIAL,
    "timestamp" TIMESTAMP WITHOUT TIME ZONE NOT NULL,
    CONSTRAINT pkey_date_test PRIMARY KEY(id) 
  )
  </code></pre>
  
  <p>SQL command when inserting data:</p>
  
  <pre><code>INSERT INTO date_test (timestamp) VALUES( '2019-06-12 12:37:07.880' )
  </code></pre>
  
  <p>SQL command to retrieve data:</p>
  
  <pre><code>SELECT dt.timestamp ::TEXT FROM date_test dt
  
  returns '2019-06-12 12:37:07.88'
  </code></pre>
  
  <p>Do you consider this a bug or a feature?</p>
  
  <p>My real issue is: I´m running queries from a C++ program and I have to convert the data returned from the database to appropriate data types. Since the protocol is text-based everything I read from the database is plain text. When parsing timestamps I first tokenize the string and then convert each token to integer. And because the millisecond part is truncated, the last token is "88" instead of "880", and converting "88" yields another value that converting "880" to integer.</p>