Re: [SQL] cast record type to array?
On 2010-05-26, Gerardo Herzig wrote: > Hi all. Im not being able to cast a record variable into an array. > > Im writing a trigger, and i would like to store NEW (and OLD) as text[]. > There is a way to do it in plpgsql? (w/o any contrib modules) why not store them as text instead? new::text is a valid cast. -- Sent via pgsql-sql mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
Re: [SQL] Extending Regular Expression bounds limit of 255.
Excerpts from Brent DeSpain's message of jue may 27 18:55:55 -0400 2010: > It looks like most of our tools are using the Perl version of regular > expressions with an upper limit of a bound being 32766. Is there any way to > change this in PG? Or can I change from POSIX to Perl? See regcomp.c; you'll have to recompile. The interesting constant is DUPMAX (defined in regguts.h as per POSIX), but note that there's arithmetic in repeat() with those values. I wouldn't recommend doing any of this unless you have time to figure out whether the algorithms are efficient for larger values though. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-sql mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
Re: [SQL] Extending Regular Expression bounds limit of 255.
Yep. That is what I was looking at this morning. It is probably too late in this release of our project to make this change. Thanks for the help. Brent DeSpain Schweitzer Engineering Laboratories, Inc. On Fri, May 28, 2010 at 9:14 AM, alvherre wrote: > Excerpts from Brent DeSpain's message of jue may 27 18:55:55 -0400 2010: > > It looks like most of our tools are using the Perl version of regular > > expressions with an upper limit of a bound being 32766. Is there any way > to > > change this in PG? Or can I change from POSIX to Perl? > > See regcomp.c; you'll have to recompile. The interesting constant is > DUPMAX (defined in regguts.h as per POSIX), but note that there's > arithmetic in repeat() with those values. I wouldn't recommend doing > any of this unless you have time to figure out whether the algorithms > are efficient for larger values though. > > -- > Álvaro Herrera > The PostgreSQL Company - Command Prompt, Inc. > PostgreSQL Replication, Consulting, Custom Development, 24x7 support >
Re: [SQL] cast record type to array?
Jasen Betts wrote: > On 2010-05-26, Gerardo Herzig wrote: >> Hi all. Im not being able to cast a record variable into an array. >> >> Im writing a trigger, and i would like to store NEW (and OLD) as text[]. >> There is a way to do it in plpgsql? (w/o any contrib modules) > > why not store them as text instead? > > new::text > > is a valid cast. > > Hi Jasen. Storing the record in text format will difficult furter analisis (p.e.searching columns with differences between OLD and NEW). It will not be easy to play with NEW as string for obtaining each column values (string_to_array will not work, the values for NEW can be anything) As this trigger will save information for audit, it is important to get it right. Even worst, im *strongly encouraged* not to use any other language except plpgsql, so i cant use plpythonu, in wich will be trivial to do so. thanks for your time, Jasen Gerardo -- Sent via pgsql-sql mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
