Re: MAC line ends strange issue

From: Michal Kozusznik <kozusznik(dot)michal(at)ifortuna(dot)cz>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: MAC line ends strange issue
Date: 2013-08-21 13:43:01
Message-ID: 5214C3E5.2060109@ifortuna.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On 21.8.2013 15:18, Dave Page wrote:
>
> So the value is shown correctly in the query tool when you create the
> function, but when the SQL is reverse engineered again, it gets changed?

Something is changed during storing function definition to db. You may
open existing, properly looking function in sql editor, change EOLs to
MAC, and hit F5. After that, refresh function in object tree - the
function will contain quotes instead of $body$.

>
> FYI, using the single quotes is valid syntax, but a *quick* look at
> the code indicates that pgAdmin only does it if it thinks the server
> is 7.4.x or older (which didn't support dollar quoting). If it's
> getting that check wrong, I'd be very surprised as that would cause
> all manner of things to break horribly.

We have 8.4 server. Maybe version comparison fails.

I'm attaching the log for following operations:
- refreshing function in tree (select function and hit F5)
- open the function (properly looking) function by using Scripts/Create
script from context menu (before it, EOLs has been set to Unix format)
- changing EOL format to MAC
- storing function by hitting F5
- refreshing function in tree (select function and hit F5)

Ha... To fix the function appearance, it is enough to switch back to
Unix EOLs. Replacing quotes by $$ is not needed.

Thanx
MK

Attachment Content-Type Size
pgadmin_quote.log text/plain 3.8 KB

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2013-08-22 13:24:24 Re: MAC line ends strange issue
Previous Message Dave Page 2013-08-21 13:18:36 Re: MAC line ends strange issue