Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI

2018-12-06 Thread rob stone
Hello, On Thu, 2018-12-06 at 21:29 -0800, Adrian Klaver wrote: > On 12/6/18 7:54 PM, s4...@yahoo.co.jp wrote: > > Most GUI tools I am familiar with quote identifiers by default. > > How/where can I tell the phpPgAdmin not to add that extra "" around > > the > > field name? > > I don't know. I h

Re: querying both text and non-text properties

2018-12-06 Thread Tony Shelver
I would suggest doing testing out btree_gin with a non-insignificant amount of data before going ahead with it. I did a test case last month, and the size of the generated index was _much_ bigger than the base table. The case involved a compound key if 1 int column and 1 timestamp range column. O

Re: Importing tab delimited text file using phpPgAdmin 5.1 GUI

2018-12-06 Thread Adrian Klaver
On 12/6/18 7:54 PM, s4...@yahoo.co.jp wrote: Hello Community! I am trying to use phpPgAdmin  (ver. 5.1 with PHP 5.6.39, server CentOS 7, client Win-10 (Japanese)) to import a tab delimited text file (Excel -> save as tab delimited text;  also used notepad to save the same text file UTF-8 enco

Importing tab delimited text file using phpPgAdmin 5.1 GUI

2018-12-06 Thread s400t
Hello Community! I am trying to use phpPgAdmin  (ver. 5.1 with PHP 5.6.39, server CentOS 7, client Win-10 (Japanese)) to import a tab delimited text file (Excel -> save as tab delimited text;  also used notepad to save the same text file UTF-8 encoding) . Earlier. I had created a table (no colum

Re: psql profiles?

2018-12-06 Thread Matt Zagrabelny
On Thu, Dec 6, 2018 at 4:24 PM Alvaro Herrera wrote: > On 2018-Dec-06, Matt Zagrabelny wrote: > > > I'd rather do: > > > > psql foo > > > > and have it know that I connect to foo on host db-host-1.example.com. > > > > Is this possible with psql or do I hack together some wrapper script? > > Sure,

Re: psql profiles?

2018-12-06 Thread Alvaro Herrera
On 2018-Dec-06, Matt Zagrabelny wrote: > I'd rather do: > > psql foo > > and have it know that I connect to foo on host db-host-1.example.com. > > Is this possible with psql or do I hack together some wrapper script? Sure, just define a pg_service.conf file. https://www.postgresql.org/docs/11/

psql profiles?

2018-12-06 Thread Matt Zagrabelny
Greetings, I'm setting up my workstation to use "gss" for auth to a variety of Pg systems on different hosts. I'd rather not have to specify the "-h" for a connection: psql -h db-host-1.example.com foo I'd rather do: psql foo and have it know that I connect to foo on host db-host-1.example.co

Re: n_mod_since_analyze

2018-12-06 Thread Laurenz Albe
Ron wrote: > https://www.postgresql.org/docs/9.6/monitoring-stats.html#PG-STAT-ALL-TABLES-VIEW > > Does the field n_mod_since_analyze use "mod" instead of "upd" because it > includes inserts, updates and deletes? Yes. It is the number that triggers autoanalyze, and all data modifications impair

Re: How to build a btree index with integer values on jsonb data?

2018-12-06 Thread Laurenz Albe
Johann Spies wrote: > How can I transform the following definition to index pubyear as > integer and not text? > > CREATE INDEX pubyear_idx > ON some_table_where_data_field_is_of_type_jsonb USING btree > ((data -> 'REC'::text) -> 'static_data'::text) -> > 'summary'::text) -> 'pub_info'

Re: Limitting full join to one match

2018-12-06 Thread Ravi Krishna
> Yes, it is becoming increasingly difficult to persuade gmail etc. that> you > are not a spammer if you run your own mail server. If you > have any> interesting headers suggesting exactly what they disliked about my > message,> could you please forward them off-list? Thanks. > > It is for t

Re: order of reading the conf files

2018-12-06 Thread bhargav kamineni
Thanks a lot Stephen. On Thu, Dec 6, 2018 at 8:53 PM Stephen Frost wrote: > Greetings, > > * Thomas Kellerer (spam_ea...@gmx.net) wrote: > > Stephen Frost schrieb am 06.12.2018 um 15:52: > > > The regular postgresql.conf file is read first, then > > > postgresql.auto.conf and then pg_hba.conf an

Re: Limitting full join to one match

2018-12-06 Thread Phil Endecott
Hi Ron, Ron wrote: On 12/05/2018 06:34 PM, Phil Endecott wrote: Dear Experts, I have a couple of tables that I want to reconcile, finding rows that match and places where rows are missing from one table or the other: db=> select * from a; +++ |date| amount | +-

Re: Limitting full join to one match

2018-12-06 Thread Phil Endecott
John W Higgins wrote: On Wed, Dec 5, 2018 at 4:34 PM Phil Endecott < spam_from_pgsql_li...@chezphil.org> wrote: Dear Experts, I have a couple of tables that I want to reconcile, finding rows that match and places where rows are missing from one table or the other: ... So my question is: h

n_mod_since_analyze

2018-12-06 Thread Ron
https://www.postgresql.org/docs/9.6/monitoring-stats.html#PG-STAT-ALL-TABLES-VIEW Does the field n_mod_since_analyze use "mod" instead of "upd" because it includes inserts, updates and deletes? Thanks -- Angular momentum makes the world go 'round.

Re: postgis after pg_upgrade

2018-12-06 Thread Adrian Klaver
On 12/6/18 12:40 AM, Slavcho Trnkovski wrote: Hi, But my understanding is that this approach is used when upgrading PostGIS. Which maybe necessary when upgrading the database: http://postgis.net/docs/manual-2.4/postgis_installation.html#upgrading Which seems to be what is happening in your ca

Re: order of reading the conf files

2018-12-06 Thread Stephen Frost
Greetings, * Thomas Kellerer (spam_ea...@gmx.net) wrote: > Stephen Frost schrieb am 06.12.2018 um 15:52: > > The regular postgresql.conf file is read first, then > > postgresql.auto.conf and then pg_hba.conf and pg_ident.conf. We can't > > read pg_hba.conf/pg_ident.conf before reading postgresql.

Re: order of reading the conf files

2018-12-06 Thread Thomas Kellerer
Stephen Frost schrieb am 06.12.2018 um 15:52: > The regular postgresql.conf file is read first, then > postgresql.auto.conf and then pg_hba.conf and pg_ident.conf. We can't > read pg_hba.conf/pg_ident.conf before reading postgresql.conf and > postgresql.auto.conf because their location is specifie

Re: UNION ALL: Apparently based on column order rather than on column name or alias

2018-12-06 Thread Tom Lane
Andreas Schmid writes: > So my conclusion is that the result of UNION ALL depends on the column > order, not on the column names or aliases. Is this the intended > behaviour? Yes, this is required by SQL spec. Matching by column name would be used if you wrote a CORRESPONDING clause, but we don'

UNION ALL: Apparently based on column order rather than on column name or alias

2018-12-06 Thread Andreas Schmid
Hi list I realized the following behaviour of UNION ALL: SELECT 'a' AS col1, 'b' AS col2 UNION ALL SELECT 'c' AS col1, 'd' AS col2; returns: col1 | col2 --+-- a| b c| d Now I switch the column aliases in the second SELECT-Statement: SELECT 'a' AS col1, 'b' AS col2 UNION ALL

Re: order of reading the conf files

2018-12-06 Thread Stephen Frost
Greetings, * Rene Romero Benavides (rene.romer...@gmail.com) wrote: > Why do you need to know that ? Please don't top-post, first, and second, it certainly seems like a worthwhile thing to want to know, for a variety of reasons, such as "what takes precedence- ALTER SYSTEM, or a configuration in

Re: order of reading the conf files

2018-12-06 Thread Rene Romero Benavides
Why do you need to know that ? Am Do., 6. Dez. 2018 um 01:21 Uhr schrieb bhargav kamineni < kbn98...@gmail.com>: > > Hi, > > may i know the order in which postgres reads the configuration files like > conf , auto.conf , hba ? > and how does postmaster forks postgres , can we see that forking pro

How to build a btree index with integer values on jsonb data?

2018-12-06 Thread Johann Spies
How can I transform the following definition to index pubyear as integer and not text? CREATE INDEX pubyear_idx ON some_table_where_data_field_is_of_type_jsonb USING btree ((data -> 'REC'::text) -> 'static_data'::text) -> 'summary'::text) -> 'pub_info'::text) ->> '@pubyear'::text) COLL

Re: debugging intermittent slow updates under higher load

2018-12-06 Thread Pavel Stehule
Hi čt 6. 12. 2018 v 12:18 odesílatel Chris Withers napsal: > On 06/12/2018 11:00, Alexey Bashtanov wrote: > > > >> I'm loath to start hacking something up when I'd hope others have done > >> a better job already... > > If you log all queries that take more than a second to complete, is your > >

Re: debugging intermittent slow updates under higher load

2018-12-06 Thread Chris Withers
On 06/12/2018 11:00, Alexey Bashtanov wrote: I'm loath to start hacking something up when I'd hope others have done a better job already... If you log all queries that take more than a second to complete, is your update the only one logged, or something (the would-be blocker) gets logged down

Re: debugging intermittent slow updates under higher load

2018-12-06 Thread Alexey Bashtanov
Is there any existing tooling that does this? There must be some, google for queries involving pg_locks I'm loath to start hacking something up when I'd hope others have done a better job already... If you log all queries that take more than a second to complete, is your update the only one

Re: postgis after pg_upgrade

2018-12-06 Thread Slavcho Trnkovski
Hi, But my understanding is that this approach is used when upgrading PostGIS. I'm upgrading postgresql from 9.4 to 9.6 and PostGIS version remains the same (2.4.5). If I execute: drop extension postgis; CREATE EXTENSION postgis SCHEMA postgis; select PostGIS_full_version(); postgis_full_v

Re: debugging intermittent slow updates under higher load

2018-12-06 Thread Chris Withers
On 05/12/2018 15:47, Rene Romero Benavides wrote: Also read about hot updates and the storage parameter named "fill_factor", so, data blocks can be recycled instead of creating new ones if the updated fields don't update also indexes. I have read about these, but I'd prefer not to be making o

Re: debugging intermittent slow updates under higher load

2018-12-06 Thread Chris Withers
On 05/12/2018 15:40, Alexey Bashtanov wrote: One of the reasons could be the row already locked by another backend, doing the same kind of an update or something different. Are these updates performed in a longer transactions? Nope, the transaction will just be updating one row at a time.