Skip site navigation (1) Skip section navigation (2)

problems with dollar quoting

From: Justin Bailey <justinbailey85(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: problems with dollar quoting
Date: 2008-04-08 00:27:15
Message-ID: 13333.97432.qm@web46003.mail.sp1.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hi all.  I hope someone can help me with a problem that's been bedeviling me for a couple of days now.  I'm on a development team that's using PostgreSQL and we're all supposed to be using the same scripts to initialize our databases.  Unfortunately the scripts are not working for me.  Here is the error I'm getting:

      [sql] Failed to execute:  CREATE FUNCTION unix_timestamp() RETURNS double precision AS $$ DECLARE myrec record; BEGIN select into myrec extract('epoch' from now()) as TS; return myrec.TS; END; $$ LANGUAGE plpgsql;

BUILD FAILED
C:\projects\svf_new\build.xml:453: java.sql.SQLException: ERROR: unterminated dollar-quoted string at or near "$$ DECLARE myrec record"

I'm really at a loss as to what might be causing this, and I've been searching on the Internet and on this mailing list without success.  First I ensured that all the SQL files were using the Windows EOL format (I'm running Windows XP).  Next I checked that "psql --version" and "select version();" return the same thing, and they do: I'm running 8.3.1.  I really don't know what else to do.  The other developers on my team are stumped as well, since nobody else is having this problem.  I spent about an hour working with the lead developer to try to figure this out before he had to leave to do something else.

I'm running a brand-new installation of PostgreSQL; this machine has never had PostgreSQL installed on it before.

Any help, pretty please? :)

Justin




      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

pgsql-novice by date

Next:From: Pavel SRBDate: 2008-04-08 04:32:37
Subject: Re: alter table
Previous:From: Sean DavisDate: 2008-04-07 21:28:23
Subject: Re: alter table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group