deep debug log for psql

2019-11-20 Thread Matthias Apitz
Hello, We found and use for ESQL/C the debug feature: ECPGdebug(int on, FILE *stream); with very good results. Is there something similar for the psql interpreter to debug the query of complex SQL statements like this monster here: SELECT ha.hnr, count(*) FROM acq_haushalt ha, acq_booking

Re: Return Table in StoredProceure/Function

2019-11-20 Thread Pavel Stehule
čt 21. 11. 2019 v 7:34 odesílatel Tony Shelver napsal: > Well then SQL Server breaks that rule big time :) > Most people coming from a SQL Server background expect procedures to > return a result set that can be queried, and in-out or out parameters to > return variables for further information.

Re: Return Table in StoredProceure/Function

2019-11-20 Thread Tony Shelver
Well then SQL Server breaks that rule big time :) Most people coming from a SQL Server background expect procedures to return a result set that can be queried, and in-out or out parameters to return variables for further information. On Wed, 20 Nov 2019 at 17:20, Thomas Kellerer wrote: > İlyas

Re:

2019-11-20 Thread Tony Shelver
Research Postgraphile, it provides an easy-to-use GraphQL interface to Postgres. Postgraphile.org On Wed, 20 Nov 2019 at 17:00, Soukaina Lahchiouach wrote: > Hello , > does postgresql with react native allow us to create chat applications? >

Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

2019-11-20 Thread James(王旭)
Thanks Thomas for this information, I will try that and get back here. James   -- Original -- From:  "Thomas Kellerer"

Re: Help with configuring pgAudit

2019-11-20 Thread Dave Hughes
Thanks for the tips Joe! After fighting with this all day, I realized while I was testing this, I was logging into the database as the "postgres" user. For some reason those actions were not being logged. But once I logged in as another superuser account I have, I saw all my ddl statements being

Re: REINDEX VERBOSE unknown option

2019-11-20 Thread Peter J. Holzer
On 2019-11-19 11:37:04 +, Geoff Winkless wrote: > Even if you do that you're still requiring the user to parse syntax > according to esoteric rules. Oh, please. Those "esoteric rules" have been in wide-spread use for decades. If you look at any manual which tries to explain the syntax of a pro

Re: Isolation of multiple databse instances provided by a single postgres server

2019-11-20 Thread Ron
On 11/20/19 4:03 PM, stan wrote: I am working on a fairly small application to use for managing a companies business. I have a "production" instance hosted by one of the cloud providers, and 2 other instances. This is fairly new to me. In the past, I have created applications by keeping a set of

Isolation of multiple databse instances provided by a single postgres server

2019-11-20 Thread stan
I am working on a fairly small application to use for managing a companies business. I have a "production" instance hosted by one of the cloud providers, and 2 other instances. This is fairly new to me. In the past, I have created applications by keeping a set of scripts that can be used to rebu

Re:

2019-11-20 Thread Adrian Klaver
On 11/19/19 11:22 PM, Soukaina Lahchiouach wrote: Hello , does postgresql with react native allow us to create chat applications? A quick search(postgres chat application) found this: https://medium.com/@gabrielrumbaut/building-a-persistent-react-native-chat-app-part-i-database-ae9de470ebff -

Re: Return Table in StoredProceure/Function

2019-11-20 Thread Thomas Kellerer
İlyas Derse schrieb am 20.11.2019 um 09:18: > How can I return table in Stored Procedure ? I can do it in function but I > have inout parameters.So I can not create in function. What can I do this > case ? > > I guess,It should be like for function : > > CREATE or REPLACE FUNCTION public."test"

Re: Making "invisible" characters visible ? (psql)

2019-11-20 Thread Adrian Klaver
On 11/20/19 7:01 AM, stan wrote: On Wed, Nov 20, 2019 at 09:22:02AM -0500, Brian Dunavant wrote: On Wed, Nov 20, 2019 at 9:16 AM stan wrote: How can i make these "invisible" characters visible? In psql, by default it displays nulls as nothing. You can specify what they should display as

Re: Return Table in StoredProceure/Function

2019-11-20 Thread Pavel Stehule
Hi st 20. 11. 2019 v 16:01 odesílatel İlyas Derse napsal: > > How can I return table in Stored Procedure ? I can do it in function but I > have inout parameters.So I can not create in function. What can I do this > case ? > > I guess,It should be like for function : > > CREATE or REPLACE FUNCTIO

Re: mysysconf ?

2019-11-20 Thread Peter J. Holzer
On 2019-11-19 19:32:03 -0500, stan wrote: > I am presently running on a Ubuntu 18.04 instance, and as you know > Debian/Ubuntu have upgraded to version 12. I don't think so. Neither Debian nor Ubuntu is in the habit of doing major upgrades in the middle of a release and Ubuntu 18.04 was released l

Re: Making "invisible" characters visible ? (psql)

2019-11-20 Thread stan
On Wed, Nov 20, 2019 at 09:22:02AM -0500, Brian Dunavant wrote: > On Wed, Nov 20, 2019 at 9:16 AM stan wrote: > > > > > How can i make these "invisible" characters visible? > > > > > > > In psql, by default it displays nulls as nothing. You can specify what > they should display as with: > > \p

Return Table in StoredProceure/Function

2019-11-20 Thread İlyas Derse
How can I return table in Stored Procedure ? I can do it in function but I have inout parameters.So I can not create in function. What can I do this case ? I guess,It should be like for function : CREATE or REPLACE FUNCTION public."test" (INOUT "x" integer, INOUT "y" text) RETURNS TABLE ("id" i

[no subject]

2019-11-20 Thread Soukaina Lahchiouach
Hello , does postgresql with react native allow us to create chat applications?

Re: Help with configuring pgAudit

2019-11-20 Thread Joe Conway
On 11/20/19 8:09 AM, Dave Hughes wrote: > Hey, > Thanks for reaching out.  It looks like I have that parameter set as > well.  Here is a list of settings I have turned on in postgresql.conf > since I installed pgAudit: > > shared_preload_libraries = 'pgaudit' > log_destination = 'csvlog' > logging

Re: Foreign keys and locks.

2019-11-20 Thread Enrico Pirozzi
Solved, it was an index that didn't work well :) Enrico Il giorno mer 20 nov 2019 alle ore 15:16 Enrico Pirozzi ha scritto: > Hi all, > Today I found this behavior on two tables. > > I have 2 tables t2 and t3 , described as below: > > testdb=# \d t2 > Tabella "public.t2" >

Re: Making "invisible" characters visible ? (psql)

2019-11-20 Thread Brian Dunavant
On Wed, Nov 20, 2019 at 9:16 AM stan wrote: > > How can i make these "invisible" characters visible? > > > In psql, by default it displays nulls as nothing. You can specify what they should display as with: \pset null '' Chances are those are all nulls, and will now display as whatever you set

Making "invisible" characters visible ? (psql)

2019-11-20 Thread stan
I added a column to an existing table, so there should be nothing (actually the default, I suppose) in this column for all existing rows. However if I do: select new_column from modified_table ; I get the total number of rows in the table, but the lines on the screen have no visible characters.

Foreign keys and locks.

2019-11-20 Thread Enrico Pirozzi
Hi all, Today I found this behavior on two tables. I have 2 tables t2 and t3 , described as below: testdb=# \d t2 Tabella "public.t2" Colonna | Tipo | Ordinamento | Può essere null | Default -+-+-+-+- id | integer

Re: How to get column and identifier names in UPPERCASE in postgres?

2019-11-20 Thread Amine Tengilimoglu
:Thank you. Pavel Stehule , 20 Kas 2019 Çar, 16:12 tarihinde şunu yazdı: > Hi > > st 20. 11. 2019 v 14:11 odesílatel Amine Tengilimoglu < > aminetengilimo...@gmail.com> napsal: > >> Hi all; >> >> I want to get the column and other identifier names in UPPERCASE >> form rather than a lowerca

Re: How to get column and identifier names in UPPERCASE in postgres?

2019-11-20 Thread Pavel Stehule
Hi st 20. 11. 2019 v 14:11 odesílatel Amine Tengilimoglu < aminetengilimo...@gmail.com> napsal: > Hi all; > > I want to get the column and other identifier names in UPPERCASE > form rather than a lowercase one without changing application code like > qouting the identifiers. Do you know an

How to get column and identifier names in UPPERCASE in postgres?

2019-11-20 Thread Amine Tengilimoglu
Hi all; I want to get the column and other identifier names in UPPERCASE form rather than a lowercase one without changing application code like qouting the identifiers. Do you know any settings function or extention for this purpose? thank you.

Re: Help with configuring pgAudit

2019-11-20 Thread Dave Hughes
Hey, Thanks for reaching out. It looks like I have that parameter set as well. Here is a list of settings I have turned on in postgresql.conf since I installed pgAudit: shared_preload_libraries = 'pgaudit' log_destination = 'csvlog' logging_collector = on log_directory = '/work/PostgreSQL/10/d

Re: PostGreSQL Replication and question on maintenance

2019-11-20 Thread Pavel Stehule
Hi st 20. 11. 2019 v 13:12 odesílatel Soto Cuevas Manuel Alejandro < mcs...@entel.cl> napsal: > Taking advantage of the instance, what software do you recommend to do > reverse engineering of postgresql? > please, open new thread. Your query is not related to subject. https://wiki.postgresql.or

Re: PostGreSQL Replication and question on maintenance

2019-11-20 Thread Soto Cuevas Manuel Alejandro
Taking advantage of the instance, what software do you recommend to do reverse engineering of postgresql? Thank you Manuel El 16-11-2019, a la(s) 10:36, github kran escribió:  ANEXO ENTEL Este es un correo externo: Verifique remitente, No haga clic en vínculos. Si recibes un correo malicios

Re: Partitioning large table (140GB)

2019-11-20 Thread Andrei Zhidenkov
You can also use extensions like pg_partman or pg_pathman. The last one allows to partition tables smoothly on live environments. > On 20. Nov 2019, at 11:49, Ravi Krishna wrote: > >> In our production, we use postgres 9.5 with streaming replication >> using repmgr, there is a large table of 1

Re: Partitioning large table (140GB)

2019-11-20 Thread Ravi Krishna
>In our production, we use postgres 9.5 with streaming replication >using repmgr, there is a large table of 140GB size which receives >lots of inserts, >Is it possible to partition this table in this version of postgres? >and if so, please, can someone let me know the best way to accomplish >thi

Partitioning large table (140GB)

2019-11-20 Thread Vikas Sharma
Hi There, In our production, we use postgres 9.5 with streaming replication using repmgr, there is a large table of 140GB size which receives lots of inserts, Is it possible to partition this table in this version of postgres? and if so, please, can someone let me know the best way to accomplish

Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

2019-11-20 Thread Thomas Kellerer
James(王旭) schrieb am 20.11.2019 um 08:56: > I am doing a query to fetch about 1000 records in one time. But > the query seems very slow, like "mission impossible". I am very > confident that these records should be fit into my shared_buffers > settings(20G), and my query is totally on my index,

Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

2019-11-20 Thread James(王旭)
Hello Laurenz, Thanks Laurenz for the quick reply, I will supply these information later. James

Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

2019-11-20 Thread Laurenz Albe
On Wed, 2019-11-20 at 15:56 +0800, James(王旭) wrote: > I am doing a query to fetch about 1000 records in one time. But the query > seems > very slow, like "mission impossible". > I am very confident that these records should be fit into my shared_buffers > settings(20G), > and my query is tota