Skip to content

Commit d1c6983

Browse files
committed
Fix logic in insert() function.
1 parent 9ca41c0 commit d1c6983

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/odbc/odbc.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- PostgreSQL catalog extensions for ODBC compatibility
2-
-- $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/odbc.sql,v 1.2 2001/10/09 22:32:33 petere Exp $
2+
-- $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/odbc.sql,v 1.3 2001/10/13 19:16:32 petere Exp $
33

44
-- ODBC functions are described here:
55
-- <http://msdn.microsoft.com/library/en-us/odbc/htm/odbcscalar_functions.asp>
@@ -33,7 +33,7 @@ CREATE OR REPLACE FUNCTION concat(text, text) RETURNS text AS '
3333

3434
-- INSERT(string1, start, len, string2)
3535
CREATE OR REPLACE FUNCTION insert(text, integer, integer, text) RETURNS text AS '
36-
SELECT substring($1 from 1 for $2) || $4 || substring($1 from $2 + $3 + 1);
36+
SELECT substring($1 from 1 for $2 - 1) || $4 || substring($1 from $2 + $3);
3737
' LANGUAGE SQL;
3838

3939

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy