Re: Data format problem - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Data format problem
Date
Msg-id 20011210180138.F72440-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Data format problem  ("Verbus M. Counts" <verbus@sonicisp.net>)
List pgsql-general
> echo "insert into titles"
> psql testdb <<EOF
> insert into titles
> values ('BU1111',
> 'Cooking with Computers: Surreptitious Balance Sheets',
> 'business',
> '1389',
> $11.95,
> $5000.00,
> 3876,
> 'Helpful hints on how to use your electronic resources to the best
> advantage.', '06/09/88', 1);
>
> insert into titles
> values ('MC2222',
> 'Silicon Valley Gastronomic Treats',
> 'mod_cook',
> '0877',
> $19.99,
> $0.00,
> 2032,
> 'Favorite recipes for quick, easy, and elegant meals, tried and tested
> by people who never have time to eat, let alone cook.',
> '06/09/89', 1);
> EOF

> When I change the $0.00 to $1.00 all works well????????????

I think you don't want those $ in front of the amounts.

Try doing a
cat <<EOF
<data from above>
EOF

and seeing what it gives you.  My guess is that it's replace
the $<n> with something.  In the case of $0 it's probably the program
name.



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Data format problem
Next
From: Justin Clift
Date:
Subject: Re: Analyzer for postgresql.log