Re: [pgadmin-hackers] Autosave in the SQL Editor

2012-08-08 Thread Guillaume Lelarge
On Tue, 2012-08-07 at 18:20 -0300, Vinicius Santos wrote:
> 
> 
> Well, this seems good but there's an issue I don't know how
> you want to
> deal with it: what's happens if I had more than one window
> opened?
> 
> I'm saving a file for each window.
> Each window have a private variable called "fileNameAutoSave"
> 
> The query is salved from time-to-time. As configuration.

OK.

>  
> IOW,
> how do you decide which file you should open? if there is more
> than one
> file, and some files were open on different databases, how
> will you
> handle this?
> 
> I had thought about putting the information in the file name. For
> example: "server_port_database_date_time.pga".

Where is it saved?

You also need to have a way to delete those files.

> The date and time are saved in the creation of frmQuery.
> 
> We can save it in the file header too. We put this information in the
> first line. And we put another name for the file.
> 

Yeah, I think the informations should be available in the file (for
example if your database has a _ in its name, it will be hard to decode
the informations from the filename.

> When there are more than one file, we asked for user, if he wants to
> open all of them.
> Of course we will open only the files that database.
> 
> What do you think?
> 

Should be enough. Not sure how you'll open that many query tools though.

> PS: Forgive my English. I'm learning english, and I'm using a little
> the Google Translate.

No problem, don't worry :) I'm also not a native speaker.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] SSH Tunneling implementation

2012-08-08 Thread Dave Page
On Wed, Aug 1, 2012 at 3:36 PM, Akshay Joshi
 wrote:
>
>
> On Fri, Jul 20, 2012 at 6:20 PM, Dave Page  wrote:
>>
>> On Fri, Jul 20, 2012 at 9:45 AM, Akshay Joshi
>>  wrote:
>> >
>> >> ld: symbol(s) not found for architecture i386
>> >> collect2: ld returned 1 exit status
>> >> make[3]: *** [pgadmin3] Error 1
>> >> make[2]: *** [all] Error 2
>> >> make[1]: *** [all-recursive] Error 1
>> >> make: *** [all] Error 2
>> >>
>> >
>> >   Fixed. Attached is the new patch file.
>>
>> Hi
>>
>> It compiles OK now, but I'm seeing the same problem I did with the
>> first version. The log shows:
>>
>> 2012-07-20 13:48:19 ERROR  : SSH error: bind failed
>> 2012-07-20 13:48:21 ERROR  : Error connecting to the server:
>>
>> (note the lack of an actual error message on the second line).
>
>
>   I have added the appropriate error message using error codes to first "SSH
> error: bind failed", for second actual error string is empty as we are
>   unable to create SSH Tunnel so error message for connection object is
> empty. Attached is the modified patch.
>
>   I am also facing the bind failed problem on OSX. Will continue to work on
> that. On Windows and Ubuntu it works fine.

OK, well it needs to work on Mac before I can commit to pgAdmin.

Thanks.


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Autosave in the SQL Editor

2012-08-08 Thread Vinicius Santos
> Where is it saved?
>
> You also need to have a way to delete those files.
>

I thought to create a specific directory for it.


>  Yeah, I think the informations should be available in the file (for
> example if your database has a _ in its name, it will be hard to decode
> the informations from the filename.
>

It's true!
I'll put the informations in the file header.

Should be enough. Not sure how you'll open that many query tools though.
>

I'm scanning the files with extension .pga.

If the file belongs to the current database and current user, we will open
it.

I'll try on Ubuntu. Soon, I will send a preview of the patch.