Re: truncated string problem - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: truncated string problem
Date
Msg-id 20030729205150.GG6320@dcc.uchile.cl
Whole thread Raw
In response to truncated string problem  (Rob Brown-Bayliss <rob@zoism.org>)
List pgsql-general
On Wed, Jul 30, 2003 at 08:38:47AM +1200, Rob Brown-Bayliss wrote:

> INSERT INTO "songs" ("p_key", "title", "artist", "date", "album",
> "tracknumber", "time", "file") VALUES
> ("ea0e89f596619af1837f424c0767ffd9", "Sugar Mountain", "Neil Young",
> "1979", "Live Rust", "1", "302.226666667",
> "/oggs/Neil_Young-Sugar_Mountain.ogg");

Huh... don't use double quotes in literal values, just single quotes:

 INSERT INTO "songs" ("p_key", "title", "artist", "date", "album",
 "tracknumber", "time", "file") VALUES
 ('ea0e89f596619af1837f424c0767ffd9', 'Sugar Mountain', 'Neil Young',
 '1979', 'Live Rust', '1', '302.226666667',
 '/oggs/Neil_Young-Sugar_Mountain.ogg');

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El miedo atento y previsor es la madre de la seguridad" (E. Burke)

pgsql-general by date:

Previous
From: Freddy Menjívar M.
Date:
Subject: Re: Does the block of code in a stored procedure execute as a transaction?
Next
From: Tom Lane
Date:
Subject: Re: how to get postgresql page size?