[GENERAL] Column information

2017-05-03 Thread Igor Korot
Hi, ALL, One more question if I may. [code] draft=# SELECT * FROM information_schema.columns WHERE table_name = 'leagues' AND ordinal_position = 8; table_catalog | table_schema | table_name | column_name | ordinal_position | column_default | is_nullable | data_type | character_maximum_length | c

Re: [GENERAL] Generalized pg_stat_statements?

2017-05-03 Thread James Sewell
Hi Jacob, This is the same problem as being able to monitor the total number of processed queries, or the total query processing time. The only solution I'm aware of is to set pg_stat_statements.max higher than the distinct number of normalized queries you expect. As soon as pg_stat_statements g

[GENERAL] PQerrorMessage documentation

2017-05-03 Thread Igor Korot
Hi, ALL, [quote] Nearly all libpq functions will set a message for PQerrorMessage if they fail. Note that by libpq convention, a nonempty PQerrorMessage result can consist of multiple lines, and will include a trailing newline. The caller should not free the result directly. It will be freed when t

Re: [GENERAL] Compatibility of libpg

2017-05-03 Thread Igor Korot
Hi, Magnus, On Wed, May 3, 2017 at 5:20 PM, Magnus Hagander wrote: > On Tue, May 2, 2017 at 4:49 AM, Igor Korot wrote: >> >> John, >> >> On Mon, May 1, 2017 at 9:38 PM, John R Pierce wrote: >> > On 5/1/2017 5:44 PM, Igor Korot wrote: >> >> >> >> >> >> But I want to build from MSVC. I already ha

Re: [GENERAL] Compatibility of libpg

2017-05-03 Thread John R Pierce
On 5/3/2017 2:20 PM, Magnus Hagander wrote: Please note that this method of building libpq has been removed from Postgres 10, so it's considered to be deprecated for quite some time. this page https://www.postgresql.org/docs/current/static/install-windows-libpq.html probably should be upd

Re: [GENERAL] Compatibility of libpg

2017-05-03 Thread Magnus Hagander
On Tue, May 2, 2017 at 4:49 AM, Igor Korot wrote: > John, > > On Mon, May 1, 2017 at 9:38 PM, John R Pierce wrote: > > On 5/1/2017 5:44 PM, Igor Korot wrote: > >> > >> > >> But I want to build from MSVC. I already have a solution for it. All I > >> need is to create a project inside that solutio

Re: [GENERAL] Column rename in an extension update script

2017-05-03 Thread Philippe BEAUDOIN
Le 03/05/2017 à 19:29, Tom Lane a écrit : Adrian Klaver writes: On 04/30/2017 11:54 PM, Philippe BEAUDOIN wrote: Just after the ALTER TABLE statement, I want to access this table. But at this time, the altered column is not visible with its new name. From the error it looks to me like the s

Re: [GENERAL] Column rename in an extension update script

2017-05-03 Thread Tom Lane
Adrian Klaver writes: > On 04/30/2017 11:54 PM, Philippe BEAUDOIN wrote: >> Just after the ALTER TABLE statement, I want to access this table. But >> at this time, the altered column is not visible with its new name. > From the error it looks to me like the statements are each run in a > separa

Re: [GENERAL] Column rename in an extension update script

2017-05-03 Thread Adrian Klaver
On 04/30/2017 11:54 PM, Philippe BEAUDOIN wrote: Hi all, I am coding an update script for an extension. And I am in trouble when trying to rename a column of an existing table. Just after the ALTER TABLE statement, I want to access this table. But at this time, the altered column is not visible

Re: [GENERAL] Difficult while acquiring LWLocks

2017-05-03 Thread Julien Rouhaud
On 03/05/2017 15:01, hariprasath nallasamy wrote: > > AFAIK yes this is the correct way to use multiple lwlocks. > > > Thanks.! > > Just curious, Is there any other way to do this.? Probably no, except asking for 10 different tranches :) -- Julien Rouhaud http://dalibo.com - http://dali

Re: [GENERAL] Difficult while acquiring LWLocks

2017-05-03 Thread hariprasath nallasamy
> AFAIK yes this is the correct way to use multiple lwlocks. > Thanks.! Just curious, Is there any other way to do this.?

Re: [GENERAL] Difficult while acquiring LWLocks

2017-05-03 Thread Julien Rouhaud
On 03/05/2017 13:08, hariprasath nallasamy wrote: > Hi all >There is an use case, where i want some 10 LightWeight Locks and > after 9.6 LW locks api's (LWLockAssign) are changed a bit and i am > confused too. > > Only reference i cant get was from pg_stat_statement :( > > Since GetNamedLWLo

[GENERAL] Difficult while acquiring LWLocks

2017-05-03 Thread hariprasath nallasamy
Hi all There is an use case, where i want some 10 LightWeight Locks and after 9.6 LW locks api's (LWLockAssign) are changed a bit and i am confused too. Only reference i cant get was from pg_stat_statement :( Since GetNamedLWLockTranche method will return the base address of the specified tra

[GENERAL] Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in the future?

2017-05-03 Thread Thomas Güttler
Am 02.05.2017 um 05:43 schrieb Jeff Janes: On Sun, Apr 30, 2017 at 4:37 AM, Thomas Güttler mailto:guettl...@thomas-guettler.de>> wrote: Is is possible that PostgreSQL will replace these building blocks in the future? - redis (Caching) PostgreSQL has its own caching. It might not be