[GENERAL] Expected behaviour of \d in regexp with exponent numbers ?

2014-09-01 Thread Arnaud Lesauvage
Hi all, I just came accross this trying to upgrade my server from 8.4.8 to 9.3.4 : SELECT substring('²' FROM E'\\d'); 8.4 : NULL 9.3 : "²" Am I correct to expect NULL in this case ? Thanks ! -- Arnaud -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] Expected behaviour of \d in regexp with exponent numbers ?

2014-09-01 Thread Albe Laurenz
Arnaud Lesauvage wrote: > I just came accross this trying to upgrade my server from 8.4.8 to 9.3.4 : > > SELECT substring('²' FROM E'\\d'); > > 8.4 : NULL > 9.3 : "²" > > Am I correct to expect NULL in this case ? I get a different result on Linux: test=> SHOW server_encoding; server_encoding

Re: [GENERAL] Expected behaviour of \d in regexp with exponent numbers ?

2014-09-01 Thread Arnaud Lesauvage
Le 1/09/2014 15:42, Albe Laurenz a écrit : Arnaud Lesauvage wrote: I just came accross this trying to upgrade my server from 8.4.8 to 9.3.4 : SELECT substring('²' FROM E'\\d'); 8.4 : NULL 9.3 : "²" Am I correct to expect NULL in this case ? I get a different result on Linux: OK, first of all

Re: [GENERAL] Expected behaviour of \d in regexp with exponent numbers ?

2014-09-01 Thread Tom Lane
Arnaud Lesauvage writes: > I just came accross this trying to upgrade my server from 8.4.8 to 9.3.4 : > SELECT substring('²' FROM E'\\d'); > 8.4 : NULL > 9.3 : "²" > Am I correct to expect NULL in this case ? Not necessarily. \d will match any character that iswdigit() returns true for. It l

[GENERAL] copymanager question

2014-09-01 Thread swaroop
Hello all I am using cm instead of preparedstmts for faster inserts . But have a question on inserting values which have quotes in them (maybe single or double). Using preparedstmts, we know its safe to do so by calling setString. Is it possible to do the same here as i do not want to blindly sin

Re: [GENERAL] Expected behaviour of \d in regexp with exponent numbers ?

2014-09-01 Thread Arnaud Lesauvage
Le 1/09/2014 17:39, Tom Lane a écrit : Arnaud Lesauvage writes: I just came accross this trying to upgrade my server from 8.4.8 to 9.3.4 : SELECT substring('²' FROM E'\\d'); 8.4 : NULL 9.3 : "²" Am I correct to expect NULL in this case ? Not necessarily. \d will match any character

Re: [GENERAL] Expected behaviour of \d in regexp with exponent numbers ?

2014-09-01 Thread Tom Lane
Arnaud Lesauvage writes: > Le 1/09/2014 17:39, Tom Lane a écrit : >> Not necessarily. \d will match any character that iswdigit() returns true >> for. It looks like your new server is using a locale that considers "²" >> to be a digit. > Since both PostgreSQL servers run on the same computer, c

Re: [GENERAL] copymanager question

2014-09-01 Thread David G Johnston
swaroop wrote > Hello all > > I am using cm instead of preparedstmts for faster inserts . But have a > question on inserting > values which have quotes in them (maybe single or double). Using > preparedstmts, we know > its safe to do so by calling setString. Is it possible to do the same here > a

Re: [GENERAL] WAL receive process dies

2014-09-01 Thread Patrick Krecker
On Sat, Aug 30, 2014 at 7:04 AM, Chris Hundt wrote: > (One of Patrick's coworkers here; thanks a lot for your assistance) > > Just in case you wanted this as well, I ran > > psql 'replication=1 dbname=XXX host=127.0.0.1 port=5432 user=XXX > password=XXX' -c 'IDENTIFY_SYSTEM;' > > (5432 is the stu

[GENERAL] Displaying a wide column with psql

2014-09-01 Thread Philip Rhoades
People, I have a table with a field that has up to 1,000 chars in it, when I look at it with psql it only displays about 200 chars with a "…" on the end of the string. Even when I look at just one record and use the \x option I get the same result - I googled for ages but short of using pg_d

Re: [GENERAL] Displaying a wide column with psql

2014-09-01 Thread Adrian Klaver
On 09/01/2014 08:05 PM, Philip Rhoades wrote: People, I have a table with a field that has up to 1,000 chars in it, when I look at it with psql it only displays about 200 chars with a "…" on the end of the string. Even when I look at just one record and use the \x option I get the same result -

Re: [GENERAL] Displaying a wide column with psql

2014-09-01 Thread David G Johnston
Adrian Klaver-4 wrote > On 09/01/2014 08:05 PM, Philip Rhoades wrote: >> People, >> >> I have a table with a field that has up to 1,000 chars in it, when I >> look at it with psql it only displays about 200 chars with a "…" >> on the end of the string. Even when I look at just one record and use >

Re: [GENERAL] Displaying a wide column with psql

2014-09-01 Thread Tom Lane
David G Johnston writes: >> On 09/01/2014 08:05 PM, Philip Rhoades wrote: >>> I have a table with a field that has up to 1,000 chars in it, when I >>> look at it with psql it only displays about 200 chars with a "…" >>> on the end of the string. > I presume what you are seeing is effectively: "th

Re: [GENERAL] copymanager question

2014-09-01 Thread Craig Ringer
On 09/01/2014 11:24 PM, swaroop wrote: > Basically i am looking for the same robustness of preparedstmt@setString > > Can i use functions like quote_literal ? Any help is very much appreciated. You don't need to. Feed the data in as-is. So long as it's valid CSV (for CSV-format COPY) or meets the