Data format problem

From: "Verbus M(dot) Counts" <verbus(at)sonicisp(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Data format problem
Date: 2001-12-11 01:00:37
Message-ID: 3C155AB5.1060209@sonicisp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

The following is a problem I am having:

#!/bin/bash
#
# Demo script for postgreSQL
#
uname -a

psql -V

dropdb testdb

createdb testdb

echo "create table titles"
psql testdb <<EOF
create table titles
(title_id char(6) not null,
title text not null,
type char(12) null,
pub_id char(4) null,
price float8 null,
advance numeric(12,2) null,
num_sold int null,
notes varchar(200) null,
pubdate datetime null,
contract int not null);
EOF

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 run the above:

Linux aossofca.com 2.4.7-10enterprise #1 SMP Thu Sep 6 16:48:20 EDT 2001
i686 unknown
psql (PostgreSQL) 7.1.3
contains readline, history, multibyte support
Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
Portions Copyright (c) 1996 Regents of the University of California
Read the file COPYRIGHT or use the command \copyright to see the
usage and distribution terms.
DROP DATABASE
CREATE DATABASE
create table titles
CREATE
insert into titles
INSERT 59101 1
ERROR: parser: parse error at or near "."

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

--
Regards,
Verbus M. Counts
Director R & D
Advanced Open Source Solutions, Inc.
10 South Grant Street
Roseville, CA 95678
916-765-1624

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Ryan 2001-12-11 01:49:39 Re: Vacuum errors and warnings
Previous Message Lee Harr 2001-12-11 00:52:05 Re: Two very basic questions..