Thread: Extra empty lines PGv8.3.1

Extra empty lines PGv8.3.1

From
Date:
When I saw log file:
2008-03-27 16:42:47 EET COMMAND:  CREATE or REPLACE FUNCTION "public"."test=
"(

 OUT result varchar)

 AS=20

 $BODY$

 DECLARE varTasksCount integer;

 BEGIN

  SELECT

   count( at2.completion_code_ID )

but command actually was:
CREATE or REPLACE FUNCTION "public"."test"(
 OUT result varchar)
 AS=20
 $BODY$
 DECLARE varTasksCount integer;
 BEGIN
  SELECT
   count( at2.completion_code_ID )

Without extra emply line.
Also it seem that=20
#pg_dumpall > dumpfile=20
#psql < dumpfile=20
have such problems.
all functions get extra empty lines in their bodies.
If I do next three times
#pg_dumpall > dumpfile=20
#psql < dumpfile=20
I get:
CREATE or REPLACE FUNCTION "public"."test"(




 OUT result varchar)




 AS=20




 $BODY$

for  function with body:
CREATE or REPLACE FUNCTION "public"."test"(=20
 OUT result varchar)
 AS=20
 $BODY$

Re: Extra empty lines PGv8.3.1

From
Alvaro Herrera
Date:
Eugen.Konkov@aldec.com wrote:

> Also it seem that
> #pg_dumpall > dumpfile
> #psql < dumpfile
> have such problems.
> all functions get extra empty lines in their bodies.

My guess is that you're running Windows, and there's a CRLF translation
going on somewhere, that duplicates the \n.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: Extra empty lines PGv8.3.1

From
Date:
Yes, I am running Windows
but why you replace CRLF with \n\n
instead of replace CRLF with only one \n  ?

----- Original Message -----
From: "Alvaro Herrera" <alvherre@commandprompt.com>
To: <Eugen.Konkov@aldec.com>
Cc: <pgsql-bugs@postgresql.org>
Sent: Thursday, March 27, 2008 6:07 PM
Subject: Re: [BUGS] Extra empty lines PGv8.3.1


> Eugen.Konkov@aldec.com wrote:
>
>> Also it seem that
>> #pg_dumpall > dumpfile
>> #psql < dumpfile
>> have such problems.
>> all functions get extra empty lines in their bodies.
>
> My guess is that you're running Windows, and there's a CRLF translation
> going on somewhere, that duplicates the \n.
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support