Thread: PGAdmin Version 2.1
Hello, I believe I have found a bug. OS Windows 7. Postgres 9.6.5 PGAdmin Version 2.1 - Python Version 2.7.13 - Flask Version 0.12.2 - Application Mode Desktop When viewing my DB through PGAdmin, it shows I have 233 types. It seems that PGAdmin is displaying every sequence and table as a type. The create type command in the SQL window has the tableoid, cmax, xmax, cmin, xmin and ctid columns as well as table column names. The sequence create type command shows the same system columns as well as all of the properties of a sequence. None of those types show when I execute \dT from psql or when I view types within PGAdmin 3. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html
Hello,
I think you have enabled "Show system objects" option from Preferences dialog due to which you are able to see them in types.
Could you confirm that by navigating "File" -> "Preferences" -> "Browser" -> "Display" (Check screenshot for more information), If it is set to "True" then this not a bug and it is expected behaviour, You can set it to "False" and reload pgAdmin4 if you don't want to display system objects.
--
Regards,
On Mon, Jan 29, 2018 at 8:19 PM, ldrlj1 <russelljanusz@masterpeaceltd. com> wrote:
Hello,
I believe I have found a bug.
OS Windows 7.
Postgres 9.6.5
PGAdmin Version 2.1
- Python Version 2.7.13
- Flask Version 0.12.2
- Application Mode Desktop
When viewing my DB through PGAdmin, it shows I have 233 types. It seems that
PGAdmin is displaying every sequence and table as a type. The create type
command in the SQL window has the tableoid, cmax, xmax, cmin, xmin and ctid
columns as well as table column names. The sequence create type command
shows the same system columns as well as all of the properties of a
sequence.
None of those types show when I execute \dT from psql or when I view types
within PGAdmin 3.
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-support -f2191615.html
Attachment
Interesting... and thank you! While I did expect to see tableoid, cmax, xmax, cmin, xmin and ctid in my tables... I never expected turning on "Show system objects" would show sequences and tables as Postgres Types. So I am knowledgeable, can you explain why that happens? -- Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html
On Tue, Jan 30, 2018 at 10:46 AM, ldrlj1 <russelljanusz@masterpeaceltd.com> wrote:
Interesting... and thank you!
While I did expect to see tableoid, cmax, xmax, cmin, xmin and ctid in my
tables... I never expected turning on "Show system objects" would show
sequences and tables as Postgres Types.
So I am knowledgeable, can you explain why that happens?
In Postgres, the row schema of objects in pg_class (tables, sequences, views etc) is also a "row-type". Effectively, a composite type that can represent a row in a class: https://www.postgresql.org/docs/10/static/plpgsql-declarations.html#PLPGSQL-DECLARATION-ROWTYPES
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
I'm not sure on this but we have ported this behaviour from pgAdmin3.
May be someone else from the community can explain?
On Tue, Jan 30, 2018 at 4:16 PM, ldrlj1 <russelljanusz@masterpeaceltd.com> wrote:
Interesting... and thank you!
While I did expect to see tableoid, cmax, xmax, cmin, xmin and ctid in my
tables... I never expected turning on "Show system objects" would show
sequences and tables as Postgres Types.
So I am knowledgeable, can you explain why that happens?
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-pgadmin- support-f2191615.html
>Effectively, a composite type that can represent a row in a class
That may be true, but users expect to see "user defined types", not tables and views. As such, the query driving the display should be something like:
WITH types AS
( SELECT reltype
FROM pg_class
WHERE relkind = 'c'
)
SELECT *
FROM pg_type
WHERE oid in (SELECT reltype
FROM types)
ORDER BY typname;
No need to duplicate everything else.
( SELECT reltype
FROM pg_class
WHERE relkind = 'c'
)
SELECT *
FROM pg_type
WHERE oid in (SELECT reltype
FROM types)
ORDER BY typname;
No need to duplicate everything else.
Melvin Davidson 🎸
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com
On Tuesday, January 30, 2018, 6:08:27 AM EST, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Jan 30, 2018 at 10:46 AM, ldrlj1 <russelljanusz@masterpeaceltd.com> wrote:
Interesting... and thank you!
While I did expect to see tableoid, cmax, xmax, cmin, xmin and ctid in my
tables... I never expected turning on "Show system objects" would show
sequences and tables as Postgres Types.
So I am knowledgeable, can you explain why that happens?
In Postgres, the row schema of objects in pg_class (tables, sequences, views etc) is also a "row-type". Effectively, a composite type that can represent a row in a class: https://www.postgresql.org/docs/10/static/plpgsql-declarations.html#PLPGSQL-DECLARATION-ROWTYPES
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Tue, Jan 30, 2018 at 2:57 PM, Melvin Davidson <melvin6925@yahoo.com> wrote:
>Effectively, a composite type that can represent a row in a classThat may be true, but users expect to see "user defined types", not tables and views. As such, the query driving the display should be something like:WITH types AS
( SELECT reltype
FROM pg_class
WHERE relkind = 'c'
)
SELECT *
FROM pg_type
WHERE oid in (SELECT reltype
FROM types)
ORDER BY typname;
No need to duplicate everything else.
No - if you switch on "Show system objects", it will display system objects such as row types. That's the whole point of the switch (which is off by default).
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
>No - if you switch on "Show system objects", it will display system objects such as row
>types. That's the whole point of the switch (which is off by default).
Except that "system objects" are NOT USER tables, views, indexes, etc.
They are _system_ catalogs and views;
Your definition is a behavior change from PgAdmin III, which DID NOT show
every "system object" per your definition". It only showed USER types as per
my query.
Melvin Davidson 🎸
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com
On Tuesday, January 30, 2018, 10:01:50 AM EST, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Jan 30, 2018 at 2:57 PM, Melvin Davidson <melvin6925@yahoo.com> wrote:
>Effectively, a composite type that can represent a row in a classThat may be true, but users expect to see "user defined types", not tables and views. As such, the query driving the display should be something like:WITH types AS
( SELECT reltype
FROM pg_class
WHERE relkind = 'c'
)
SELECT *
FROM pg_type
WHERE oid in (SELECT reltype
FROM types)
ORDER BY typname;
No need to duplicate everything else.
No - if you switch on "Show system objects", it will display system objects such as row types. That's the whole point of the switch (which is off by default).
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Tue, Jan 30, 2018 at 3:22 PM, Melvin Davidson <melvin6925@yahoo.com> wrote:
-- >No - if you switch on "Show system objects", it will display system objects such as row>types. That's the whole point of the switch (which is off by default).Except that "system objects" are NOT USER tables, views, indexes, etc.They are _system_ catalogs and views;
Not in nearly 20 years of pgAdmin history they haven't been. We've always classed them as system catalogs etc. *and* objects that are implementation details of higher level objects.
Your definition is a behavior change from PgAdmin III, which DID NOT showevery "system object" per your definition". It only showed USER types as permy query.
No it didn't. See the attached screenshot.
Why would you force objects like these to be permanently hidden? It's quite reasonable to want to see them - they can be quite useful when writing stored procedures that deal with rows for example.
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company