[Cdash] Postgres / MySQL functions

Markus Grabner grabner at icg.tugraz.at
Fri Dec 19 10:03:46 UTC 2008


Am Donnerstag, 18. Dezember 2008 schrieb Julien Jomier:
> Chris,
>
> Thanks a lot for the report and the fix. I have logged a bug report:
> http://public.kitware.com/Bug/view.php?id=8318 and will put a fix very
> soon.
I noted that the wiki page related to PostgreSQL issues was incomplete and 
added the missing information:

http://public.kitware.com/Wiki/CDash:Database

	Kind regards,
		Markus


> Chris J. Garrett wrote:
> > Hi,
> > I've found a bug in viewUpdate.php when using Postgres. I'm using
> > 1.3.0(trunk). The query is using MySQL specific functions. The simple
> > work around for me was to write/copy the equivalent functions. Maybe you
> > can add them to the install step or something... HTH
> > Chris
> >
> >
> > CREATE OR REPLACE FUNCTION REVERSE(text) RETURNS TEXT AS
> > '
> > DECLARE reversed_string text;
> > incoming alias for $1;
> > BEGIN
> > reversed_string = '''';
> > for i in reverse char_length(incoming)..1 loop
> > reversed_string = reversed_string || substring(incoming from i for 1);
> > end loop;
> > return reversed_string;
> > END'
> > LANGUAGE PLPGSQL;
> >
> > CREATE OR REPLACE FUNCTION LOCATE(text,text) RETURNS INT AS
> > 'SELECT STRPOS($2, $1)'
> > LANGUAGE SQL;
> >
> > CREATE OR REPLACE FUNCTION RIGHT(text,int) RETURNS TEXT AS
> > 'SELECT SUBSTR($1, LENGTH($1)-$2+1)'
> > LANGUAGE SQL;
> >
> >
> > _______________________________________________
> > Cdash mailing list
> > Cdash at public.kitware.com
> > http://public.kitware.com/cgi-bin/mailman/listinfo/cdash
>
> _______________________________________________
> Cdash mailing list
> Cdash at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/cdash



-- 
Markus Grabner - Computer Graphics and Vision
Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria
Phone: +43/316/873-5041, Fax: +43/316/873-5050
WWW: http://www.icg.tugraz.at/Members/grabner



More information about the CDash mailing list