Error while calling proc with table type from Application

2021-04-29 Thread aditya desai
Hi,
One of the procs which accept tabletype as parameter gives below error
while being called from Application. Could not find a concrete solution for
this. Can someone help?

call PROCEDURE ABC (p_optiontable optiontype)



Below is the error while executing proc -

“the clr type system.data.datatable isn't natively supported by npgsql or
your postgresql. to use it with a postgresql composite you need to specify
datatypename or to map it, please refer to the documentation.”


Regards,

Aditya.


Re: Error while calling proc with table type from Application (npgsql)

2021-04-29 Thread Justin Pryzby
On Thu, Apr 29, 2021 at 02:52:23PM +0530, aditya desai wrote:
> Hi,
> One of the procs which accept tabletype as parameter gives below error
> while being called from Application. Could not find a concrete solution for
> this. Can someone help?
> 
> call PROCEDURE ABC (p_optiontable optiontype)

What is PROCEDURE ABC ?  If you created it, send its definition with your 
problem report.

> Below is the error while executing proc -

How are you executing it?  This seems like an error from npgsl, not postgres.
It may be a client-side error, and it may be that the query isn't even being
sent to the server at that point.

> “the clr type system.data.datatable isn't natively supported by npgsql or
> your postgresql. to use it with a postgresql composite you need to specify
> datatypename or to map it, please refer to the documentation.”

Did you do this ?
https://www.npgsql.org/doc/types/enums_and_composites.html

-- 
Justin




Log number of tuples returned

2021-04-29 Thread Edson Richter
Hi!

Which postgresql logging parameters should I activate to log the “number of 
tuples returned” for a query?
I would like to debug some dynamicly generated queries in the system that are 
returning a absurd number of tuples (> 2,6mi of records).

Thanks,

ER

Enviado do Email para Windows 10



Re: Log number of tuples returned

2021-04-29 Thread Justin Pryzby
On Thu, Apr 29, 2021 at 03:01:29PM +, Edson Richter wrote:
> Which postgresql logging parameters should I activate to log the “number of 
> tuples returned” for a query?
> I would like to debug some dynamicly generated queries in the system that are 
> returning a absurd number of tuples (> 2,6mi of records).

You can load the auto_explain extension and set:
auto_explain.log_analyze

And then the "rows" are logged: 
   
 Result  (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.004 rows=1 
loops=1)

https://www.postgresql.org/docs/current/auto-explain.html

-- 
Justin




RES: Log number of tuples returned

2021-04-29 Thread Edson Richter
De: Justin Pryzby
Enviado:quinta-feira, 29 de abril de 2021 12:08
Para: Edson Richter
Cc:[email protected]
Assunto: Re: Log number of tuples returned

On Thu, Apr 29, 2021 at 03:01:29PM +, Edson Richter wrote:
> Which postgresql logging parameters should I activate to log the “number of 
> tuples returned” for a query?
> I would like to debug some dynamicly generated queries in the system that are 
> returning a absurd number of tuples (> 2,6mi of records).

You can load the auto_explain extension and set:
auto_explain.log_analyze

And then the "rows" are logged:
 Result  (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.004 rows=1 
loops=1)

https://www.postgresql.org/docs/current/auto-explain.html

--
Justin


Perfect, Thanks!

ER.