servers missing

2024-01-23 Thread Michael Shapiro
I am now using PgAdmin 8.2 on Mac. The left panel no longer lists any
servers nor does PgAdmin ask for the master password when it starts. It is
asking to use my keychain (I don't have that setup or even know what it is).


Re: sequence current value

2021-05-14 Thread Michael Shapiro
I tried this. I created a sequence, and ran last_value, then nextval,
repeatedly. last_value always returned 20 until nextval returned 21, then
last_value returned 40 and kept returning 40 until nextval returned 41, etc.


On Fri, May 14, 2021 at 9:39 AM Dave Page  wrote:

>
>
> On Fri, May 14, 2021 at 3:33 PM Michael Shapiro 
> wrote:
>
>> How does PgAdmin get the current value of a sequence when showing the
>> sequence properties?
>>
>
> SELECT last_value FROM ;
>
> (essentially. It gets a few other things as well)
>
> --
> Dave Page
> Blog: https://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: https://www.enterprisedb.com
>
>


sequence current value

2021-05-14 Thread Michael Shapiro
How does PgAdmin get the current value of a sequence when showing the
sequence properties?


encrypted password for roles not shown

2021-05-14 Thread Michael Shapiro
PgAdmin4 does not show the encrypted password for roles. This was fixed in

https://redmine.postgresql.org/issues/1974

but it is missing now.


Re: PgAdmin doesn't quit on Mac

2021-05-14 Thread Michael Shapiro
Akshay,

The problem seems to be fixed with this new version. Thanks!

Michael

On Fri, May 14, 2021 at 1:08 AM Akshay Joshi 
wrote:

> Hi Michael and Richard
>
> We have fixed issue #6420, can you please verify it on the nightly build
> https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2021-05-14/
>
>
> On Fri, May 14, 2021 at 1:01 AM Richard Brockie 
> wrote:
>
>> I've seen this too. Sometimes after force-quitting pgadmin a process
>> associated with NW.js runs away using 100% of a thread.
>>
>> It seems to be associated with first shutting down the underlying
>> database server before quitting pyAdmin, but I haven't made an exhaustive
>> investigation.
>>
>> On Thu, May 13, 2021 at 11:24 AM Michael Shapiro 
>> wrote:
>>
>>> Sometimes when I "quit" PgAdmin on Mac OS Big Sur (11.3.1), the GUI goes
>>> away but PgAdmin continues to run. Even when I ask it to quit it still runs
>>> and I have to use Force Quit to stop it.
>>>
>>> I am running  version 5.2 (4280.88) of PgAdmin.
>>>
>>
>>
>> --
>> R.
>>
>> Richard Brockie
>>
>> Real-time bicycle race management - www.ontheday.net
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>


PgAdmin doesn't quit on Mac

2021-05-13 Thread Michael Shapiro
Sometimes when I "quit" PgAdmin on Mac OS Big Sur (11.3.1), the GUI goes
away but PgAdmin continues to run. Even when I ask it to quit it still runs
and I have to use Force Quit to stop it.

I am running  version 5.2 (4280.88) of PgAdmin.


Issue 5404

2021-03-02 Thread Michael Shapiro
Any word on this issue?

https://redmine.postgresql.org/issues/5404


Re: 0x000007b error message.

2020-06-07 Thread Michael Shapiro
Don't know if this is useful or not, but I found this:

https://ugetfix.com/ask/how-to-fix-application-unable-to-start-error-0x07b/


On Sun, Jun 7, 2020 at 10:37 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Sibongile,
>
> Could you please share more details like screenshot, pgAdmin logs, OS,
> pgAdmin version ?
>
> On Sat, Jun 6, 2020 at 3:44 PM Sibongile Mxaba 
> wrote:
>
>> Hello.
>>
>> I recently installed PostgreSQL and whenever I try to open pgAdmin I keep
>> getting the error mentioned in the subject line.
>> What can I do? How can I fix it?
>>
>> Kind regards
>> Sibongile
>>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


Re: Issue 2519

2020-04-16 Thread Michael Shapiro
Any progress on this issue?

On Thu, Apr 2, 2020 at 6:21 AM Michael Shapiro  wrote:

> What is the status of https://redmine.postgresql.org/issues/2519?
>>
>


membership for group roles

2020-04-15 Thread Michael Shapiro
Can the login roles that are members of a group role be shown when
examining a group role?
For a given login role, PgAdmin will show me which group roles it is a
member of, but PgAdmin won't show me the logins that are members of a
specific group.


two disconnects for an ssh tunnel connection

2020-04-09 Thread Michael Shapiro
If I create a server that uses ssh tunneling, I have to ask PgAdmin to
disconnect twice before it disconnects. Servers that do not use ssh
tunneling will disconnect upon the first request to disconnect.


Re: Issue 2519

2020-04-02 Thread Michael Shapiro
>
> What is the status of https://redmine.postgresql.org/issues/2519?
>


encrypted passwords?

2019-10-22 Thread Michael Shapiro
How can I see the encrypted password for a login role?


SQL for views

2019-10-17 Thread Michael Shapiro
How does PgAdmin extract the sql for a view?

If I run
   select definition from pg_catalog.pg_views where viewname = 'xxx' and
schemaname='yyy'

the tables in the FROM clauses may or may not be fully qualified, depending
on the current search_path. If the search_path includes the schema for a
table, that table will not be fully qualified

PgAdmin seems to be able to always make sure that the tables are fully
qualified. How does it do that?


Saving DDL to a file ...

2019-10-17 Thread Michael Shapiro
When I look at the DDL for an object (eg view or function) under the SQL
tab in PgAdmin4, how do I save it to a file?
Also, is there a way to run the DDL in a different database (so I can
"copy" the object from one database to another)


Issue 2519

2019-10-14 Thread Michael Shapiro
What is the status of https://redmine.postgresql.org/issues/2519?
The feature that was in PgAdmin3 of the browser being able to show the
trigger function from the table was really useful. Will that be added back
to PgAdmin4?


Re: PgAdmin4 and tabs

2019-09-21 Thread Michael Shapiro
Thanks! That fixed it

On Fri, Sep 20, 2019 at 9:31 PM Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hello,
>
> On Fri, 20 Sep 2019, 20:41 Michael Shapiro,  wrote:
>
>> It looks as if the display of function code in PgAdmin4 is not handling
>> indentation properly, possibly due to TABS in the SQL.
>>
>> Code that looks like
>>
>> if .
>> then
>>  if 
>>  then
>>  ...
>> end if;
>> end if;
>>
>> gets displayed as
>>
>> if ...
>> then
>>   if ...
>>   then
>>   ...   <<-- this line is not indented properly
>>   end if;
>> end if;
>>
>> Is there a setting/preference for how to render TABS in the SQL display?
>>
>
> Yes, Please refer
> https://www.pgadmin.org/docs/pgadmin4/4.13/preferences.html#the-query-tool-node
>
> Go to Editor section,  and change *Tab size* and *Use spaces* options as
> per your needs.
>


PgAdmin4 and tabs

2019-09-20 Thread Michael Shapiro
It looks as if the display of function code in PgAdmin4 is not handling
indentation properly, possibly due to TABS in the SQL.

Code that looks like

if .
then
 if 
 then
 ...
end if;
end if;

gets displayed as

if ...
then
  if ...
  then
  ...   <<-- this line is not indented properly
  end if;
end if;

Is there a setting/preference for how to render TABS in the SQL display?


Re: can only concatenate str (not "NoneType") to str

2019-09-12 Thread Michael Shapiro
LOL! Looks like I wasn't the only one. Looking at
https://redmine.postgresql.org/issues/4650 I see that there are 13 issues
reporting this problem.

On Thu, Sep 12, 2019 at 1:49 AM Avin Kavish  wrote:

> huh... another case of pre-mature issue creation 
>
> On Thu, Sep 12, 2019 at 10:46 AM Michael Shapiro 
> wrote:
>
>> Great! I looked for an issue about it on redmine.postgres.org. I didn't
>> see one so I created https://redmine.postgresql.org/issues/4732.
>>
>>
>> On Wed, Sep 11, 2019 at 10:36 PM Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Michael
>>>
>>> It's already been fixed and available in the next release which will be
>>> schedule on 19th September.
>>>
>>> On Thu, 12 Sep, 2019, 01:40 Michael Shapiro, 
>>> wrote:
>>>
>>>> When is this error when getting an object's SQL going to be fixed?
>>>>
>>>> can only concatenate str (not "NoneType") to str
>>>>
>>>


Re: can only concatenate str (not "NoneType") to str

2019-09-11 Thread Michael Shapiro
Great! I looked for an issue about it on redmine.postgres.org. I didn't see
one so I created https://redmine.postgresql.org/issues/4732.


On Wed, Sep 11, 2019 at 10:36 PM Akshay Joshi 
wrote:

> Hi Michael
>
> It's already been fixed and available in the next release which will be
> schedule on 19th September.
>
> On Thu, 12 Sep, 2019, 01:40 Michael Shapiro,  wrote:
>
>> When is this error when getting an object's SQL going to be fixed?
>>
>> can only concatenate str (not "NoneType") to str
>>
>


can only concatenate str (not "NoneType") to str

2019-09-11 Thread Michael Shapiro
When is this error when getting an object's SQL going to be fixed?

can only concatenate str (not "NoneType") to str


Re: PGAdmin: type geography does not exist

2019-08-06 Thread Michael Shapiro
I'm not sure if the schema the extension is installed in is causing the
problem. I always install extensions in the pg_catalog schema.

On Tue, Aug 6, 2019 at 7:32 AM Ashesh Vashi 
wrote:

> If you're running from the sql editor, then - you have either of the two
> options:
> Set search_path = 'teleon, public';
> CREATE TABLE...
>
> Or,
>
> Specify the schema in front of tge type.
>
> -- Thanks, Ashesh
>
>
> On Tue, 6 Aug 2019, 17:14 Tony Shelver,  wrote:
>
>> Schema |   Name| Description
>> +---+--
>>   | geography | postgis type: Ellipsoidal spatial data type.
>> (1 row)
>>
>>
>> On Tue, 6 Aug 2019 at 12:36, Ashesh Vashi 
>> wrote:
>>
>>> And - the following command for psql?
>>> \dT geography
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> Ashesh Vashi
>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>> 
>>>
>>>
>>> *http://www.linkedin.com/in/asheshvashi*
>>> 
>>>
>>>
>>> On Tue, Aug 6, 2019 at 4:02 PM Tony Shelver  wrote:
>>>


 On Tue, 6 Aug 2019 at 12:18, Ashesh Vashi <
 ashesh.va...@enterprisedb.com> wrote:

> Can you please let me know the output of 'SHOW search_path' from the
> psql?
>


 Ashesh, if I run   SHOW search_path in psql, there is no output.  Just
 returns with the prompt.




Re: save SQL in PgAdmin4

2019-07-18 Thread Michael Shapiro
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 
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  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  wrote:
>>
>>>
>>>
>>> On Thu, Jul 18, 2019 at 3:09 PM Ray O'Donnell  wrote:
>>>
>>>> On 18/07/2019 14:43, Michael Shapiro wrote:
>>>> > Then what?
>>>> >
>>>> > On Thu, Jul 18, 2019 at 8:31 AM Ray O'Donnell >>> > <mailto:r...@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

2019-07-18 Thread Michael Shapiro
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  wrote:

>
>
> On Thu, Jul 18, 2019 at 3:09 PM Ray O'Donnell  wrote:
>
>> On 18/07/2019 14:43, Michael Shapiro wrote:
>> > Then what?
>> >
>> > On Thu, Jul 18, 2019 at 8:31 AM Ray O'Donnell > > <mailto:r...@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
>


save SQL in PgAdmin4

2019-07-18 Thread Michael Shapiro
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.

>


change connection in PgAdmin4

2019-06-19 Thread Michael Shapiro
PgAdmin3 had the ability to change the connection for an SQL window.
Does PgAdmin4 have that feature?


Re: login role password

2019-06-04 Thread Michael Shapiro
Thanks.  That is a helpful workaround.

I am asking for this functionality to be added to PgAdmin4, so that when
you select the SQL for a login role you see what PgAdmin3 shows.

  CREATE ROLE xxx_user LOGIN
ENCRYPTED PASSWORD 'md5f349771b7d83b170e8377bd7d09'
SUPERUSER INHERIT CREATEDB CREATEROLE NOREPLICATION;

And that the dialog for a login user supports setting an encrypted password.

I know I can run this in an SQL window:

  ALTER ROLE xxx_user ENCRYPTED PASSWORD 'md5f349771b7d83b170e8377bd7d09';

but it would be nice if PgAdmin4 supported this in the GUI

On Tue, Jun 4, 2019 at 8:40 AM Isaías Sánchez 
wrote:

> Just: select * from pg_authid;
>
> En 4 de junio de 2019 15:14:49 Michael Shapiro 
> escribió:
>
>> PgAdmin3 has the ability to see the encrypted password for a login role.
>> That allow me to copy the login role password from one server to another
>> (without having to know the password).
>>
>> I don't see how to see the encrypted password for a login role in PgAdmin4
>>
>>
>


login role password

2019-06-04 Thread Michael Shapiro
PgAdmin3 has the ability to see the encrypted password for a login role.
That allow me to copy the login role password from one server to another
(without having to know the password).

I don't see how to see the encrypted password for a login role in PgAdmin4


Re: How to deal with multiple accounts

2019-05-18 Thread Michael Shapiro
I'd like to know how people do this as well. I have been creating new
Servers for each account.

On Sat, May 18, 2019 at 5:16 PM Michel Feinstein 
wrote:

> Hi guys, I am looking for opinions on how you use pgAdmin for dealing with
> several accounts.
>
> For example, I have an "admin" account with all the privileges for the
> database and a "restricted" account for my application to use. I also have
> some other accounts for other purposes and I was looking for a convenient
> way to log into those accounts and use pgAdmin with their privileges.
>
> In MySQL Workbench this was fairly simple, since you configure
> Connections, but in pgAdmin you configure Servers instead, and all those
> accounts are new connections to the same Server.
>
> So do you guys just create a new Server for each account/login on pgAdmin,
> or do you have some other trick on how to deal this this?
>
> Best wishes,
>
> Michel.
>


Re: default role privileges

2019-05-13 Thread Michael Shapiro
default privileges can be applied to roles (and, it appears, only to roles)

https://www.postgresql.org/docs/10/sql-alterdefaultprivileges.html

ALTER DEFAULT PRIVILEGES
[ FOR { ROLE | USER } *target_role* [, ...] ]
[ IN SCHEMA *schema_name* [, ...] ]
*abbreviated_grant_or_revoke*


On Mon, May 13, 2019 at 4:58 AM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Mon, May 13, 2019 at 3:06 PM Michael Shapiro 
> wrote:
>
>> I ran this in one of my databases
>>
>>  ALTER DEFAULT PRIVILEGES FOR ROLE some_role REVOKE EXECUTE ON FUNCTIONS
>> FROM PUBLIC:
>>
>> I can not see this default privilege anywhere in PgAdmin4 (nor in
>> PgAdmin3).
>> I see no default privileges for roles on the SQL for the role.
>>
> Default privileges can be applied on tables, sequences,  types and on
> functions only, so why roles?
>
>> I do see default privileges on the SQL for the database itself, but not
>> the one I added above.
>>
> You can create this bug @ https://redmine.postgresql.org/projects/pgadmin4 
> with
> the proper steps to reproduce it.
>
>> (Also, the last example on the help page show creating an EDB role, but
>> the discussion below talks about a role called "alice")
>>
>> On Sun, May 12, 2019 at 11:56 PM Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Sun, May 12, 2019 at 7:42 PM Michael Shapiro 
>>> wrote:
>>>
>>>> Where in PgAdmin4 can I see (and set) default privileges for a role?
>>>>
>>> Please refer
>>> https://www.pgadmin.org/docs/pgadmin4/4.x/role_dialog.html?highlight=Privileges
>>>
>>>
>>


Re: default role privileges

2019-05-13 Thread Michael Shapiro
I ran this in one of my databases

 ALTER DEFAULT PRIVILEGES FOR ROLE some_role REVOKE EXECUTE ON FUNCTIONS
FROM PUBLIC:

I can not see this default privilege anywhere in PgAdmin4 (nor in PgAdmin3).
I see no default privileges for roles on the SQL for the role.
I do see default privileges on the SQL for the database itself, but not the
one I added above.
(Also, the last example on the help page show creating an EDB role, but the
discussion below talks about a role called "alice")

On Sun, May 12, 2019 at 11:56 PM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Sun, May 12, 2019 at 7:42 PM Michael Shapiro 
> wrote:
>
>> Where in PgAdmin4 can I see (and set) default privileges for a role?
>>
> Please refer
> https://www.pgadmin.org/docs/pgadmin4/4.x/role_dialog.html?highlight=Privileges
>
>


default role privileges

2019-05-12 Thread Michael Shapiro
Where in PgAdmin4 can I see (and set) default privileges for a role?


query editor feature request

2019-05-10 Thread Michael Shapiro
Will it ever be possible to:

(1) run more than one query is a single query editor window and see the
results of each query (as opposed to only the results from the last query)?

(2) edit the results to change the underlying table (assuming the query is
against a single table)?


triggers and trigger functions

2019-03-07 Thread Michael Shapiro
pgadmin3 has the feature that when you selected a table trigger in the
object browser panel, it would connect the trigger to the trigger function
and allow you to see the function directly from the trigger. That seems to
be missing in pgadmin4. Now, in order to view the function, you have to go
to the trigger functions section of the object browser. That makes the
process of trigger -> trigger function awkward.

Can this  pgadmin3 feature be added to pgadmin4?