[GENERAL] Problem during debugging

2017-08-26 Thread Igor Korot
Hi, ALL, I am trying to write a program that is using libpq. For testing purposes I am trying to connect to the remote server, which is running on my home network on a different machine. Sometimes during debugging my program crashes or just produces incorrect results. In this case I have to stop

Re: [GENERAL] Change location of function/type installed from C-extension

2017-08-26 Thread Dmitry Lazurkin
On 26.08.2017 22:05, Tom Lane wrote: > Dmitry Lazurkin writes: >> Thanks. Can I update "pg_proc.probin" without any problems? > Should work. I'd experiment in a scratch database before doing > it in production, but I can't think of a problem offhand. > >

Re: [GENERAL] Change location of function/type installed from C-extension

2017-08-26 Thread Tom Lane
Dmitry Lazurkin writes: > Thanks. Can I update "pg_proc.probin" without any problems? Should work. I'd experiment in a scratch database before doing it in production, but I can't think of a problem offhand. regards, tom lane -- Sent via

Re: [GENERAL] Change location of function/type installed from C-extension

2017-08-26 Thread Dmitry Lazurkin
On 26.08.2017 18:24, Tom Lane wrote: > You need to use pg_relation_filenode(): > > regression=# select relname, pg_relation_filenode(oid) from pg_class where > relname like 'pg_proc%'; > relname | pg_relation_filenode >

Re: [GENERAL] Change location of function/type installed from C-extension

2017-08-26 Thread Tom Lane
Dmitry Lazurkin writes: > select relname, relfilenode from pg_class where relfilenode = 11829; > relname | relfilenode > -+- > (0 rows) > Hmmm. Where is table with filenode 11829? pg_class.relfilenode doesn't contain useful data for pg_proc and some other

Re: [GENERAL] Retrieving query results

2017-08-26 Thread Tom Lane
Michael Paquier writes: > On Fri, Aug 25, 2017 at 8:10 AM, Tom Lane wrote: >> I think the real problem occurs where we realloc the array bigger. > Looking at the surroundings, I think that it would be nice to have > pqAddTuple and PQsetvalue set an

Re: [GENERAL] Retrieving query results

2017-08-26 Thread Michael Paquier
On Fri, Aug 25, 2017 at 8:10 AM, Tom Lane wrote: > I think the real problem occurs where we realloc the array bigger. > tupArrSize needs to be kept to no more than INT_MAX --- and, ideally, > it should reach that value rather than dying on the iteration after > it reaches 2^30

Re: [GENERAL] Change location of function/type installed from C-extension

2017-08-26 Thread Dmitry Lazurkin
On 26.08.2017 15:10, Dmitry Lazurkin wrote: > I try investigate where PotsgreSQL keeps path of load libraries in catalog. > > select version(); >version >

Re: [GENERAL] Change location of function/type installed from C-extension

2017-08-26 Thread Dmitry Lazurkin
I try investigate where PotsgreSQL keeps path of load libraries in catalog. select version(); version -- PostgreSQL 9.3.4 on

[GENERAL] Immutable functions and cache invalidation.

2017-08-26 Thread Tim Uckun
Say I have a function like this. CREATE OR REPLACE FUNCTION some_constant( ) RETURNS text LANGUAGE 'plpgsql' COST 100 IMMUTABLE ROWS 0 AS $BODY$ begin return 'some_string'; end; $BODY$; Then I have another function that calls it but is also immutable CREATE OR REPLACE