Commit graph

62 commits

Author SHA1 Message Date
eelke
2c899bd799 Generate PARTITIONED BY SQL for partitioned tables.
Expressions not yet supported.
2023-02-06 20:31:00 +01:00
eelke
61f90668d8 Fix DROP sql for partitioned table. 2023-01-30 20:08:24 +01:00
Eelke Klein
2ff9577d41 The table inheritance works mostly 2023-01-24 17:47:52 +00:00
eelke
ccd88d0578 Show in constraint list and in generated SQL when a constraint is inherited 2023-01-21 10:27:17 +01:00
eelke
60fb4ce285 Improve support for declarative partitioning.
Generated SQL for a partition is now correct (atleast for simple cases)
Switched to C++ 20 so the ranges library can be used in this case
to filter unwanted items.
2023-01-18 19:43:12 +01:00
eelke
33319e3461 Fix reading from catalog so that information about declarative partitioning is read correctly
(View and SQL generation still need fixes)
2023-01-07 07:44:33 +01:00
Eelke Klein
9277731c4e Resolve "Improve GENERATED support" 2022-09-06 11:17:18 +00:00
eelke
bb0e08461a cleanup 2022-09-03 09:36:04 +02:00
eelke
d3080a08bb WIP createdb dialog 2022-05-24 18:57:28 +02:00
eelke
a7d4a5f13d build fixes
# Conflicts:
#	pglablib/sqlast/SelectList.h
2022-05-24 18:56:39 +02:00
eelke
14b5293dea refactor table sql generation 2022-01-21 18:53:47 +01:00
eelke
3158a4364b Show SQL for database
Also improvements to the SQL for tables and views.
2022-01-20 20:13:56 +01:00
eelke
b5a706a2a2 lazy load the database sizes only when needed by the server inspector. 2022-01-19 19:10:05 +01:00
eelke
39195153cd Retrieve tables sizes asynchronously when opening the catalog. 2022-01-18 18:45:14 +01:00
eelke
45795333f2 Generate COMMENT IS statements for columns 2021-07-02 20:42:32 +02:00
eelke
97b24a8bf3 fix must explicitly specify table with oid for older pg versions 2021-04-15 16:27:48 +02:00
eelke
5a70749308 leave out database sizes for databases the user cannot connect to
this prevents permissions errors.
2021-04-14 19:40:07 +02:00
eelke
fd5ad9bbf0 On the list of indexes of a table show which were created as part of the creation of a constraint
The explicit column is true when the index was manually created
In SQL only a comment is given that the index was implicitly created
2021-04-11 07:56:37 +02:00
eelke
4c175d8c2c Added page with the types (no details yet) 2021-04-01 14:58:42 +02:00
eelke
bdef76ed8a Fix errors on PG 9.5 en 9.6 (maybe other versions to)
Closes #68
2021-04-01 14:55:20 +02:00
eelke
f21a59e030 Display comments in the list of databases 2021-03-11 06:59:31 +01:00
eelke
2724586f4e Server window database tab tweaks
- Encoding as string instead of id
- Tablespace name instead of id
- Database list sorting enabled
- Database size
2021-03-10 20:49:03 +01:00
eelke
11459e1e12 Show sizes
table, index, toast and total size per Table
size of each index
2021-03-10 19:06:40 +01:00
eelke
d6aeef492d comments on columns
Show the comments in the list of columns of a table.
Generate SQL to set them.
2021-03-08 17:23:34 +01:00
eelke
9d58af8cd2 comments on tables
Show them in the list of tables.
Genereate SQL to set the comment.
2021-03-08 16:59:13 +01:00
eelke
87553b2554 fix missing typmod in generated sql
ie the max length of a varchar or the scale and precision of a numeric

closes #66
2020-10-15 19:21:44 +02:00
eelke
2faedca137 fix missing when condition
closes #65

Most likely didn't work with postgresql 11 and higher
2020-10-15 19:14:03 +02:00
eelke
e53b85bd86 Improved formatting of generated table sql
- Removed empty line before first column
- The follow up lines of fkey's are indented
- The closing parentheses is now on a new line
2019-12-01 07:09:18 +01:00
eelke
2c2253f75e Use (BIG)SERIAL in generated SQL when this was used when column
originally defined.

This is recognized by the fact that the column has a dependency on a
sequence. For columns that happen to have a default which uses a pre
exising sequence the dependency is the other way around.
2019-12-01 06:40:11 +01:00
eelke
8dd13d103e Added dependants tab to table page
Retrieves all foreignkeys pointing to the current table
and shows the tables they are foreignkeys of.
2019-11-17 10:27:11 +01:00
eelke
ead3ce8a8a Show view definition 2019-10-26 13:13:58 +02:00
eelke
60d8f36328 poc Add support for reloading the catalog
Reload works and the column page reacts correctly. Others to be checked
and fixed.
2019-10-06 13:52:45 +02:00
eelke
4ea388cad7 Merge branch 'master' of ssh://git@gitlab.com:/eelke/pgLab.git 2019-10-06 09:34:45 +02:00
eelke
09d5461d01 Seperate event types in the trigger definition with OR 2019-10-05 08:55:02 +02:00
eelke
082293e58a Switched ConnectionConfig to QString from std::string to fit better into Qt framework 2019-09-16 19:24:39 +02:00
eelke
b939916b07 Fix incorrect ALTER TABLE statement for columns in the instepctor.
Was caused by incorrect condition for determining the use of IDENTITY.
2019-08-19 19:44:07 +02:00
eelke
5494e5076b Don't read relhasoids on version 12. Also don't try to select data we are not allowed to read. 2019-08-10 18:12:26 +02:00
eelke
86cdcbe06a Don't read protransform, we are not using it and version 12 doesn't have it. 2019-08-10 18:10:19 +02:00
eelke
2ceea4b577 Don't read consrc we are not using it and version 12 doesn't have it. 2019-08-10 18:09:14 +02:00
eelke
70b842597c Read from pg_roles as only superusers can read pg_authid
Contents is same except password is masked. Password does not seem very important to view as it is encrypted anyway.

Close #53
2019-08-10 14:18:01 +02:00
eelke
f2808de613 Sequence and Function pages are now properly filtered on namespace. 2019-02-09 20:37:34 +01:00
eelke
b08bd1a315 The trigger SQL now also shows the function definition. 2019-02-09 17:36:37 +01:00
eelke
42432b06a9 Restructuring catalog tabs
- Moved detail tabs of table to their own components
- Table list has become seperate component on seperate tab
- Table list does not use designer anymore
- Moved sequences and functions tabs into the catalog inspector
2019-02-09 11:36:22 +01:00
eelke
f130c426a1 Fix error on pg96 because of wrong minimum version 2019-01-01 11:04:48 +01:00
eelke
f0ffcf4abd TablesTableModel now also shows (materialized) views en foreign tables. 2018-12-29 11:19:12 +01:00
eelke
437736a023 Tab with list of sequences and create sql for selected sequence. 2018-12-28 08:51:02 +01:00
eelke
769307c821 Added the trigger definitions to the sql for a table. Also tuned the formatting of the trigger definitions a bit. 2018-12-27 12:15:37 +01:00
eelke
4ec4e02411 The SQL tab for a table now also shares the grant/revoke statements for that table (but not yet any column level grants). 2018-12-27 12:07:19 +01:00
eelke
93687df959 Removed the acl field from several Pg* classes as the acl is now stored in the PgServerObject base class they inherit from. 2018-12-27 12:05:48 +01:00
eelke
aaa05f64ef PgTablespace now inherits from PgServerObject. 2018-12-25 17:38:13 +01:00