On Wed, Nov 22, 2023 at 5:09 PM Laurenz Albe
wrote:
>
> One of the problems is what should be included.
> Indexes? Policies? Constraints?
>
A high limit could be all objects except data.
All the objects which would be deleted by a 'DROP TABLE'.
Maybe including 'CASCADE'?
No unsurmountable qu
On Wed, Nov 22, 2023 at 11:09 AM Laurenz Albe
wrote:
> On Wed, 2023-11-22 at 16:41 +0100, Hans Schou wrote:
> > Similar to pg_get_viewdef() and pg_get_functiondef() it would be useful
> with a pg_get_tabledef() to get a full description of how a table is
> defined.
>
> This has been requested bef
On 2023-11-22 16:41 +0100, Hans Schou wrote:
> Similar to pg_get_viewdef() and pg_get_functiondef() it would be useful
> with a pg_get_tabledef() to get a full description of how a table is
> defined.
There's already a discussion on that topic[1]. But I don't know about
the current state of devel
On Wed, 2023-11-22 at 16:41 +0100, Hans Schou wrote:
> Similar to pg_get_viewdef() and pg_get_functiondef() it would be useful with
> a pg_get_tabledef() to get a full description of how a table is defined.
This has been requested before:
https://www.postgresql.org/message-id/flat/CAFEN2wxsDSSuOv
On Wed, Nov 22, 2023 at 10:41 AM Hans Schou wrote:
> Hi
>
> Similar to pg_get_viewdef() and pg_get_functiondef() it would be useful
> with a pg_get_tabledef() to get a full description of how a table is
> defined.
>
Because there's already pg_get_viewdef(),
pg_get_functiondef(), pg_get_constrain
Hi
Similar to pg_get_viewdef() and pg_get_functiondef() it would be useful
with a pg_get_tabledef() to get a full description of how a table is
defined.
Currently the table definition can be extracted with the command:
pg_dump -d foo --schema-only --table=bar | egrep '^[^-]'
The psql command