nvim-dbee icon indicating copy to clipboard operation
nvim-dbee copied to clipboard

[potential contribution] listing more than just tables in the drawer

Open willruggiano opened this issue 2 years ago • 1 comments

In particular things like functions and procedures would be nice to have (ala pgadmin4). I have been working with procedures a lot recently and have a few notes containing very short "create ddl" scripts (basically select pg_catalog.pg_get_functiondef('proc name'::regproc); - it'd be nice to be able to on the procedure in the drawer, same as you do for tables, and be able to execute the "create ddl script" just like I have for tables.

Anyways, how might I go about adding support for this kind of thing? I haven't found anything to suggest this is possible out of the box right now, but I am open to adding this functionality since it will be a win for me personally :)

willruggiano avatar Apr 10 '24 03:04 willruggiano

Hi @willruggiano you can start by looking into how the postgres driver in go is structured - notably the Structure method. Look at how the query is written and how the structure output is assembled from it.

Let me know if you need anything!

kndndrj avatar Apr 23 '24 09:04 kndndrj