Re: [GENERAL] Transactions and functions

2016-09-25 Thread amul sul
On Fri, Sep 23, 2016 at 9:14 PM, Арсен Арутюнян wrote: > would you like to help me with several questions: > 1)are all functions atomic? Yes, of course. > 2)are they execute in a single query? Same as executing n-number of SQL statements between BEGIN-COMMIT block. Regards, Amul -- Sent v

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Charles Clavadetscher
Hello Tom and Adrian > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver > Sent: Sonntag, 25. September 2016 18:38 > To: Tom Lane ; Charles Clavadetscher > > Cc: pgsql-general@postgresql.org > Subject:

Re: [GENERAL] Chante domain type - Postgres 9.2

2016-09-25 Thread Gavin Flower
On 26/09/16 17:58, Patrick B wrote: Hi guys, I've got this domain: CREATE DOMAIN public.a_city AS character varying(80) COLLATE pg_catalog."default"; And I need to increase the type from character varying(80) to character varying(255). How can I do that? didn't find info ab

[GENERAL] Chante domain type - Postgres 9.2

2016-09-25 Thread Patrick B
Hi guys, I've got this domain: CREATE DOMAIN public.a_city > AS character varying(80) > COLLATE pg_catalog."default"; And I need to increase the type from character varying(80) to character varying(255). How can I do that? didn't find info about it. I'm using Postgres 9.2 Thanks! Patrick

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Adrian Klaver
On 09/25/2016 08:39 AM, Tom Lane wrote: > Charles Clavadetscher writes: >> Honestly I still don't understand why this happened this way. > > I wonder if you have standard_conforming_strings turned off, or > did when that data was inserted. That would change the behavior > of backslashes in strin

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Tom Lane
Charles Clavadetscher writes: > Honestly I still don't understand why this happened this way. I wonder if you have standard_conforming_strings turned off, or did when that data was inserted. That would change the behavior of backslashes in string literals. regards, tom l

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Adrian Klaver
On 09/25/2016 05:45 AM, Charles Clavadetscher wrote: Hi Rob On 09/25/2016 01:39 PM, rob stone wrote: On Sun, 2016-09-25 at 10:29 +0200, Charles Clavadetscher wrote: Hello I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit I imported data

[GENERAL] Use SPI_exec... to insert multiples rows in C

2016-09-25 Thread Ian Campbell
I need to insert up to 12 rows (bulk). Basically, new row #1's ID is the table sequence nextval and parent = null; #2 is nextval + 1 and parent = row #1's ID, etc. A hierarchy. I figured the most performant way to do this is to have the sequence increment by the max bulk insert quantity, 12. This

Re: [GENERAL] Question on replace function [solved]

2016-09-25 Thread Charles Clavadetscher
Hi Rob On 09/25/2016 01:39 PM, rob stone wrote: > > On Sun, 2016-09-25 at 10:29 +0200, Charles Clavadetscher wrote: >> Hello >> >> I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by >> gcc >> (Debian 4.7.2-5) 4.7.2, 64-bit >> >> I imported data from a MariaDB table into PostgreS

Re: [GENERAL] Question on replace function

2016-09-25 Thread rob stone
On Sun, 2016-09-25 at 10:29 +0200, Charles Clavadetscher wrote: > Hello > > I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by > gcc  > (Debian 4.7.2-5) 4.7.2, 64-bit > > I imported data from a MariaDB table into PostgreSQL and noticed > that  > the content of a field was not c

[GENERAL] Question on replace function

2016-09-25 Thread Charles Clavadetscher
Hello I am using PostgreSQL 9.4.7 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit I imported data from a MariaDB table into PostgreSQL and noticed that the content of a field was not correct, but I was not able to change it. The field is called vcard and is of dat