Extra empty lines PGv8.3.1

Started by Eugen Konkovabout 18 years ago3 messagesbugs
Jump to latest
#1Eugen Konkov
Eugen.Konkov@aldec.com

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

OUT result varchar)

AS

$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
$BODY$
DECLARE varTasksCount integer;
BEGIN
SELECT
count( at2.completion_code_ID )

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

OUT result varchar)

AS

$BODY$

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

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Eugen Konkov (#1)
Re: 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

#3Eugen Konkov
Eugen.Konkov@aldec.com
In reply to: Eugen Konkov (#1)
Re: Extra empty lines PGv8.3.1

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

Show quoted text

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