/[sql]/access_fix.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /access_fix.sql

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Fri Feb 22 17:28:19 2002 UTC revision 1.2 by dpavlin, Fri Feb 22 17:46:58 2002 UTC
# Line 1  Line 1 
1    -- you will need this function if you are using row versioning
2    -- according to http://odbc.postgresql.org/psqlodbc.php?DocID=faq-advanced#rowversioning you might not need it at all...
3    
4  drop function int4eq(xid,int4);  drop function int4eq(xid,int4);
5  drop operator = (xid,int4) ;  drop operator = (xid,int4) ;
6    
# Line 17  create operator = ( Line 20  create operator = (
20  );  );
21    
22    
23    -- we need operators which can complare int and bool (because boolean type
24    -- in Access are really integers when they finish thair way through optimizer
25    
26  DROP OPERATOR = (bool, int4);  DROP OPERATOR = (bool, int4);
27  DROP OPERATOR = (int4, bool);  DROP OPERATOR = (int4, bool);
# Line 51  CREATE OPERATOR = ( Line 56  CREATE OPERATOR = (
56    JOIN = EQJOINSEL    JOIN = EQJOINSEL
57  );  );
58    
59    -- this is reverse of above
60    
61  DROP FUNCTION MsAccessBool2 (int4, bool);  DROP FUNCTION MsAccessBool2 (int4, bool);
62  CREATE FUNCTION MsAccessBool2 (int4, bool) RETURNS BOOL AS '  CREATE FUNCTION MsAccessBool2 (int4, bool) RETURNS BOOL AS '
# Line 82  CREATE OPERATOR = ( Line 88  CREATE OPERATOR = (
88    JOIN = EQJOINSEL    JOIN = EQJOINSEL
89  );  );
90    
91  DROP FUNCTION not (int4);  -- this is generaly not possible. However, when using boolean fields in
92  CREATE FUNCTION not (int4) RETURNS BOOL AS '  -- PostgreSQL and Access you will need not on int type.
93    -- so, if possible, rename this function to not
94    
95    DROP FUNCTION xnot (int4);
96    CREATE FUNCTION xnot (int4) RETURNS BOOL AS '
97  BEGIN  BEGIN
98    IF $1 IS NULL THEN    IF $1 IS NULL THEN
99      RETURN NULL;      RETURN NULL;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.26