Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread Igor Korot
Hi, John, On Sun, Jul 30, 2017 at 4:53 PM, John R Pierce wrote: > On 7/30/2017 1:43 PM, Igor Korot wrote: > > what encodings are default on your system ?`\l+` in psql should show the > encodings. > > Is this "backslash + pipe + plus-sign"? > > Trying it gives: "Invalid

[GENERAL] partitioning question

2017-07-30 Thread Alex Samad
Hi I was about to partition a large (?) approx 3T of data 2B rows into partition tables but broken up into MM ... Now I have been reading about limiting the number of partitions otherwise it could slow down the parser. My reasoning for limiting to MM was that most of the request would

Re: [GENERAL] partitioning question

2017-07-30 Thread Alex Samad
Hi I note that you link to P10 and I am currently looking at 9.6. The changes do look nice for partitioning for p10. Interesting your suggest that the MM parition isn't that bad. I will add currently we don't delete anything, we will keep adding to it. Also I am thinking my insert

Re: [GENERAL] partitioning question

2017-07-30 Thread Justin Pryzby
On Mon, Jul 31, 2017 at 10:25:54AM +1000, Alex Samad wrote: > I note that you link to P10 and I am currently looking at 9.6. The changes > do look nice for partitioning for p10. Yes sorry, pg10 is beta - avoid using it except for testing purposes. > I will add currently we don't delete

Re: [GENERAL] partitioning question

2017-07-30 Thread Justin Pryzby
On Mon, Jul 31, 2017 at 09:15:29AM +1000, Alex Samad wrote: > Hi > > I was about to partition a large (?) approx 3T of data 2B rows into > partition tables but broken up into MM ... > > Now I have been reading about limiting the number of partitions otherwise > it could slow down the parser.

Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread Igor Korot
Hi, John, On Sun, Jul 30, 2017 at 4:34 PM, John R Pierce wrote: > On 7/30/2017 1:19 PM, Igor Korot wrote: >> >> I am using a database for my project that I created inside SQLite3. >> This database contains a table called "abc" (it is "abc" + >> symbol with the code

Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread John R Pierce
On 7/30/2017 1:19 PM, Igor Korot wrote: I am using a database for my project that I created inside SQLite3. This database contains a table called "abc" (it is "abc" + symbol with the code 225 - greek letter "beta or a German symbol for "ss"). in what encoding? in ISO 8859-1, -15,

[GENERAL] Fwd: Planner oversight for GIN indices?

2017-07-30 Thread Kurt Kartaltepe
On postgres 9.6 and 9.5 I have tested a structure like this create table test (data text); create index on test using gin(data gin_trgm_ops); insert into test select md5(num::text) from generate_series(0, 100) as A(num); analyze test; explain select * from test where data like '%a%'; explain

[GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread Igor Korot
Hi, ALL, I am using a database for my project that I created inside SQLite3. This database contains a table called "abc" (it is "abc" + symbol with the code 225 - greek letter "beta or a German symbol for "ss"). All I did was to export that database into the text file and then imported

Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread John R Pierce
On 7/30/2017 1:43 PM, Igor Korot wrote: what encodings are default on your system ?`\l+` in psql should show the encodings. Is this "backslash + pipe + plus-sign"? Trying it gives: "Invalid command". \ + lower case L + plus sign, thats the psql metacommand to list all databases with

[GENERAL] Executing regex in C code

2017-07-30 Thread Gabriel Furstenheim Milerud
Hi, I'm trying to execute the equivalent to '~' with regexp from within C code. According to pg_operator this operator for type text corresponds to textregexeq: DATA(insert OID

Re: [GENERAL] Executing regex in C code

2017-07-30 Thread Tom Lane
Gabriel Furstenheim Milerud writes: > I'm trying to execute the equivalent to '~' with regexp from within C code. > text * s = cstring_to_text("aa"); > text * p = cstring_to_text("a"); > return DatumGetBool(DirectFunctionCall2(textregexeq, PointerGetDatum(s), >

Re: [GENERAL] RETURNS SETOF RECORD with 1 column

2017-07-30 Thread Vincenzo Romano
Il 28 lug 2017 16:18, "Tom Lane" ha scritto: Vincenzo Romano writes: > I would like to understand the typo protection mentioned by Tom earlier: > I need to understand the reason for creating that special case. Well, case A: create function

Re: [GENERAL] Executing regex in C code

2017-07-30 Thread Gabriel Furstenheim Milerud
Thanks a lot, That did the trick Best regards On 30 July 2017 at 18:26, Tom Lane wrote: > Gabriel Furstenheim Milerud writes: > > I'm trying to execute the equivalent to '~' with regexp from within C > code. > > > text * s = cstring_to_text("aa");

Re: [GENERAL] Schemas and serials

2017-07-30 Thread marcelo
Addendum: Some minutes ago, using EMS SQL Manager Lite, I tried what I was asking. First, I created a new schema. Then, I duplicated some of the transactional tables from the public schema, which is acting as a definition repository for those tables, to the new "transactional" schema. After

Re: [GENERAL] Schemas and serials

2017-07-30 Thread marcelo
Melvin: My example was somewhat inexact. The full question is as follows: I need to have two groups of tables: the "reference" ones (examples: city, country, customer) which will "reside" in the public schema, and the transaccional ones, which will reside in a schema representing one

[GENERAL] vacuum on streaming replication

2017-07-30 Thread Alex Samad
Hi setup a cluster, with streaming replication and hot stand by the idea is to use the stand by to do queries whilst the primary is doing inserts. But I noticed the stats on the stand by server don't update, nor can I run vacuum against it as its in recovery mode. So how do update the stats

Re: [GENERAL] partitioning question

2017-07-30 Thread Alex Samad
How expensive is dynamic over static. I'm looking at storing yearly now, so I figure if my if then clause has the latest year at the top it should be very quick. On 31 July 2017 at 11:07, Justin Pryzby wrote: > On Mon, Jul 31, 2017 at 10:25:54AM +1000, Alex Samad

Re: [GENERAL] Invalid byte sequence for encoding UTF-8 0xc3\n

2017-07-30 Thread Igor Korot
John, On Sun, Jul 30, 2017 at 5:32 PM, Igor Korot wrote: > Hi, John, > > On Sun, Jul 30, 2017 at 4:53 PM, John R Pierce wrote: >> On 7/30/2017 1:43 PM, Igor Korot wrote: >> >> what encodings are default on your system ?`\l+` in psql should show the

Re: [GENERAL] vacuum on streaming replication

2017-07-30 Thread Andreas Kretschmer
On 31 July 2017 04:15:33 GMT+02:00, Alex Samad wrote: >Hi > >setup a cluster, with streaming replication and hot stand by > >the idea is to use the stand by to do queries whilst the primary is >doing >inserts. > >But I noticed the stats on the stand by server don't update, nor