INSERT statement COPY equivalent I would like to transform this:

INSERT INTO users (username) VALUES ('JohnDoe');


Into a copy equivalent:

COPY users (username) FROM ('JohnDoe');


What would be a correct syntax for the copy statement?
The point of COPY is to receive the data from outside the query.
The closest syntax to what you're asking is

COPY users(username) FROM STDIN;


If done from within the psql interpreter in interactive mode, it displays this invite:


  Enter data to be copied followed by a newline. End with a backslash
  and a period on a line by itself, or an EOF signal.


If done from a non-interactive program, dedicated functions can be used to send the data. They're provided by the PostgreSQL driver that the program uses.