Thread: change connection in PgAdmin4

change connection in PgAdmin4

From
Michael Shapiro
Date:
PgAdmin3 had the ability to change the connection for an SQL window.
Does PgAdmin4 have that feature?

Re: change connection in PgAdmin4

From
richard coleman
Date:
Michael, 

I don't think so, but I would love to be proven wrong.  It's rather annoying to have to open a new query tool window per database and copy/paste SQL between them.  Especially since the new design doesn't lend it self to side by side windows.

rik. 

On Wed, Jun 19, 2019 at 10:18 AM Michael Shapiro <mshapiro51@gmail.com> wrote:
PgAdmin3 had the ability to change the connection for an SQL window.
Does PgAdmin4 have that feature?

save SQL in PgAdmin4

From
Michael Shapiro
Date:
After selecting an object (eg a view) how do I save the SQL that PgAdmin4 extracts from the server? I don't see a "SAVE" button.

Re: save SQL in PgAdmin4

From
Ray O'Donnell
Date:
On 18/07/2019 14:28, Michael Shapiro wrote:
> After selecting an object (eg a view) how do I save the SQL that 
> PgAdmin4 extracts from the server? I don't see a "SAVE" button.
> 

Hi there,

Right-click on it in the object tree (Left of screen), then select 
Scripts -> (type of script required).

Ray.

-- 
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie



Re: save SQL in PgAdmin4

From
Ray O'Donnell
Date:
On 18/07/2019 14:43, Michael Shapiro wrote:
> Then what?
> 
> On Thu, Jul 18, 2019 at 8:31 AM Ray O'Donnell <ray@rodonnell.ie 
> <mailto:ray@rodonnell.ie>> wrote:
> 
>     On 18/07/2019 14:28, Michael Shapiro wrote:
>      > After selecting an object (eg a view) how do I save the SQL that
>      > PgAdmin4 extracts from the server? I don't see a "SAVE" button.
>      >
> 
>     Hi there,
> 
>     Right-click on it in the object tree (Left of screen), then select
>     Scripts -> (type of script required).

[Please keep replies on-list, and avoid top-posting - thanks.]

Now that you ask, that's a good question.... I just tried it myself 
(Scripts -> Create script), and the "Save" button is greyed out.

You can activate it by making some small edit in the generated SQL, but 
this seems like a bug.

Ray.


-- 
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie



Re: save SQL in PgAdmin4

From
Dave Page
Date:


On Thu, Jul 18, 2019 at 3:09 PM Ray O'Donnell <ray@rodonnell.ie> wrote:
On 18/07/2019 14:43, Michael Shapiro wrote:
> Then what?
>
> On Thu, Jul 18, 2019 at 8:31 AM Ray O'Donnell <ray@rodonnell.ie
> <mailto:ray@rodonnell.ie>> wrote:
>
>     On 18/07/2019 14:28, Michael Shapiro wrote:
>      > After selecting an object (eg a view) how do I save the SQL that
>      > PgAdmin4 extracts from the server? I don't see a "SAVE" button.
>      >
>
>     Hi there,
>
>     Right-click on it in the object tree (Left of screen), then select
>     Scripts -> (type of script required).

[Please keep replies on-list, and avoid top-posting - thanks.]

Now that you ask, that's a good question.... I just tried it myself
(Scripts -> Create script), and the "Save" button is greyed out.

You can activate it by making some small edit in the generated SQL, but
this seems like a bug.

Depends how you look at it. The button is looking for changes the user has made, not pre populated or loaded text. It's like when you double-click on a file and it opens in an editor - most will not enable the save button at that point.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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

Re: save SQL in PgAdmin4

From
Michael Shapiro
Date:
Dave,

I'd like to make a feature request that PgAdmin4 add a save button (that is always enabled) to any window that displays SQL. 
Most editors I have worked with always provide a save (and/or save as) even if the text has not changed.
Even PgAdmin3 has a Save button for SQL displayed in the SQL window.

On Thu, Jul 18, 2019 at 9:22 AM Dave Page <dpage@pgadmin.org> wrote:


On Thu, Jul 18, 2019 at 3:09 PM Ray O'Donnell <ray@rodonnell.ie> wrote:
On 18/07/2019 14:43, Michael Shapiro wrote:
> Then what?
>
> On Thu, Jul 18, 2019 at 8:31 AM Ray O'Donnell <ray@rodonnell.ie
> <mailto:ray@rodonnell.ie>> wrote:
>
>     On 18/07/2019 14:28, Michael Shapiro wrote:
>      > After selecting an object (eg a view) how do I save the SQL that
>      > PgAdmin4 extracts from the server? I don't see a "SAVE" button.
>      >
>
>     Hi there,
>
>     Right-click on it in the object tree (Left of screen), then select
>     Scripts -> (type of script required).

[Please keep replies on-list, and avoid top-posting - thanks.]

Now that you ask, that's a good question.... I just tried it myself
(Scripts -> Create script), and the "Save" button is greyed out.

You can activate it by making some small edit in the generated SQL, but
this seems like a bug.

Depends how you look at it. The button is looking for changes the user has made, not pre populated or loaded text. It's like when you double-click on a file and it opens in an editor - most will not enable the save button at that point.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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

Re: save SQL in PgAdmin4

From
Michel Feinstein
Date:
In that case I would say you need a "Save as..." button, whereas the "Save" button will track changes and only save if there are any changes. 

On Thu, Jul 18, 2019, 11:42 Michael Shapiro <mshapiro51@gmail.com> wrote:
Dave,

I'd like to make a feature request that PgAdmin4 add a save button (that is always enabled) to any window that displays SQL. 
Most editors I have worked with always provide a save (and/or save as) even if the text has not changed.
Even PgAdmin3 has a Save button for SQL displayed in the SQL window.

On Thu, Jul 18, 2019 at 9:22 AM Dave Page <dpage@pgadmin.org> wrote:


On Thu, Jul 18, 2019 at 3:09 PM Ray O'Donnell <ray@rodonnell.ie> wrote:
On 18/07/2019 14:43, Michael Shapiro wrote:
> Then what?
>
> On Thu, Jul 18, 2019 at 8:31 AM Ray O'Donnell <ray@rodonnell.ie
> <mailto:ray@rodonnell.ie>> wrote:
>
>     On 18/07/2019 14:28, Michael Shapiro wrote:
>      > After selecting an object (eg a view) how do I save the SQL that
>      > PgAdmin4 extracts from the server? I don't see a "SAVE" button.
>      >
>
>     Hi there,
>
>     Right-click on it in the object tree (Left of screen), then select
>     Scripts -> (type of script required).

[Please keep replies on-list, and avoid top-posting - thanks.]

Now that you ask, that's a good question.... I just tried it myself
(Scripts -> Create script), and the "Save" button is greyed out.

You can activate it by making some small edit in the generated SQL, but
this seems like a bug.

Depends how you look at it. The button is looking for changes the user has made, not pre populated or loaded text. It's like when you double-click on a file and it opens in an editor - most will not enable the save button at that point.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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

Re: save SQL in PgAdmin4

From
Michael Shapiro
Date:
The PgAdmin3 save button handles "save" vs "save as" by suggesting the name of the file and allows the user to change it

On Thu, Jul 18, 2019 at 9:44 AM Michel Feinstein <michelfeinstein@gmail.com> wrote:
In that case I would say you need a "Save as..." button, whereas the "Save" button will track changes and only save if there are any changes. 

On Thu, Jul 18, 2019, 11:42 Michael Shapiro <mshapiro51@gmail.com> wrote:
Dave,

I'd like to make a feature request that PgAdmin4 add a save button (that is always enabled) to any window that displays SQL. 
Most editors I have worked with always provide a save (and/or save as) even if the text has not changed.
Even PgAdmin3 has a Save button for SQL displayed in the SQL window.

On Thu, Jul 18, 2019 at 9:22 AM Dave Page <dpage@pgadmin.org> wrote:


On Thu, Jul 18, 2019 at 3:09 PM Ray O'Donnell <ray@rodonnell.ie> wrote:
On 18/07/2019 14:43, Michael Shapiro wrote:
> Then what?
>
> On Thu, Jul 18, 2019 at 8:31 AM Ray O'Donnell <ray@rodonnell.ie
> <mailto:ray@rodonnell.ie>> wrote:
>
>     On 18/07/2019 14:28, Michael Shapiro wrote:
>      > After selecting an object (eg a view) how do I save the SQL that
>      > PgAdmin4 extracts from the server? I don't see a "SAVE" button.
>      >
>
>     Hi there,
>
>     Right-click on it in the object tree (Left of screen), then select
>     Scripts -> (type of script required).

[Please keep replies on-list, and avoid top-posting - thanks.]

Now that you ask, that's a good question.... I just tried it myself
(Scripts -> Create script), and the "Save" button is greyed out.

You can activate it by making some small edit in the generated SQL, but
this seems like a bug.

Depends how you look at it. The button is looking for changes the user has made, not pre populated or loaded text. It's like when you double-click on a file and it opens in an editor - most will not enable the save button at that point.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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

Re: save SQL in PgAdmin4

From
Dave Caughey
Date:
" It's like when you double-click on a file and it opens in an editor - most will not enable the save button at that point. "

I'm not sure about that claim...  pretty much every application I use (MS Office suite, Adobe suite, vim, notepad, GIMP, etc.) all give you an enabled Save for any opened document,   Indeed, of my commonly-used apps, the only one that does *not* enable the save button unless changes are made is Eclipse, but that's likely to be tied to the fact that it has to do incremental builds with every save, so there's probably a justification for that behaviour.

Otherwise, you have to ask "does the user actually benefit from having the Save button disabled?"  If you can't come up with a really compelling reason why it shouldn't be enabled, then what's the point of going through the extra coding effort to disable something that doesn't need to be disabled (and is likely to cause confusion/annoyance)?

Cheers,
Dave


On Thu, Jul 18, 2019 at 10:23 AM Dave Page <dpage@pgadmin.org> wrote:


On Thu, Jul 18, 2019 at 3:09 PM Ray O'Donnell <ray@rodonnell.ie> wrote:
On 18/07/2019 14:43, Michael Shapiro wrote:
> Then what?
>
> On Thu, Jul 18, 2019 at 8:31 AM Ray O'Donnell <ray@rodonnell.ie
> <mailto:ray@rodonnell.ie>> wrote:
>
>     On 18/07/2019 14:28, Michael Shapiro wrote:
>      > After selecting an object (eg a view) how do I save the SQL that
>      > PgAdmin4 extracts from the server? I don't see a "SAVE" button.
>      >
>
>     Hi there,
>
>     Right-click on it in the object tree (Left of screen), then select
>     Scripts -> (type of script required).

[Please keep replies on-list, and avoid top-posting - thanks.]

Now that you ask, that's a good question.... I just tried it myself
(Scripts -> Create script), and the "Save" button is greyed out.

You can activate it by making some small edit in the generated SQL, but
this seems like a bug.

Depends how you look at it. The button is looking for changes the user has made, not pre populated or loaded text. It's like when you double-click on a file and it opens in an editor - most will not enable the save button at that point.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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