New answers tagged

1

Removing the explicit cast to tstrange worked. The new CSV file looks like t_range|field1 '[2014-06-02 07:00:00,infinity)'|'sometext1' '[2014-06-02 07:00:00,infinity)'|'sometext2' It seems to me that \copy is fine with automatically attempting to cast to the appropriate datatypes, but the explicit cast causes it to choke. One can also simplify the CSV ...


4

psql delegates the handling of input to a shared library, which is either libreadline or libedit. But libedit used to not work reliably with multibyte character sets, as has been reported on multiple occasions, here for OSX for example. From your comment: /Library/PostgreSQL/9.4/bin/psql -> libedit@1.47.0 does not work, ...


2

Community Wiki answer, originally a comment on the question by a_horse_with_no_name You need to end every SQL statement with ;. You didn't do that and thus your statement was not executed at all. Run DROP TABLE pnt; instead. See e.g. here: Understanding postgres prompts


3

From the manual: \t Toggles the display of output column name headings and row count footer. This command is equivalent to \pset tuples_only and is provided for convenience.


1

To answer my own question, the \gset command should be used for multiline variable content, select '''2 3''' x \gset



Top 50 recent answers are included