Re: Default extension for sql scripts - Mailing list pgadmin-hackers

From Florian G. Pflug
Subject Re: Default extension for sql scripts
Date
Msg-id 435E6E4A.6040204@phlo.org
Whole thread Raw
In response to Re: Default extension for sql scripts  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: Default extension for sql scripts  (Dave Page <dpage@vale-housing.co.uk>)
List pgadmin-hackers
Andreas Pflug wrote:
> Florian G. Pflug wrote:
>
>> If I save a sql script from the query window, shouldn't ".sql" be
>> added automatically
>> to the filename? It isn't added on osx as I just noticed - which got
>> me wondering
>> if it is added on other platforms. So - how are things on win32 or linux?
>
> Works on win32 and Linux, so could be a wxWid/OSX problem.
Hm.. I guess, wx thinks (for historic reasons), that the file -> application
association happens via Type & Creator (Two 4-character codes saved
with each file) on OSX. While it's true that this still works on osx, apple
recommends using extensions now. I'll see if the behaviour of wx can
be switched - if not, are you okey if an #ifdef OSX in the code?

>> On a related note - Does it work on windows to double-click  a saved
>> query,
>> and have pgadmin3 start _and_ open the query in a query window?
>
> No, because pgAdmin can't guess from your script which server it should
> connect to.
Well, thats fixed in 1.4 afaik - one can now switch the db-connection of a
query window, can't one?. The sql-file coul be opened in a query window
  with no
selected connection, and the user could chosse the connection afterwards.
Does this sound reasonable?

Greetings, Florian Pflug

pgadmin-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Default extension for sql scripts
Next
From: Dave Page
Date:
Subject: Re: Default extension for sql scripts