~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to contrib/mysql/my2pg.diff

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
*** /laptop/my2pg.pl    Mon Apr 19 18:51:44 2004
 
2
--- my2pg.pl    Mon Apr 19 18:59:09 2004
 
3
***************
 
4
*** 38,43 ****
 
5
--- 38,50 ----
 
6
  # $My2pg: my2pg.pl,v 1.28 2001/12/06 19:32:20 fonin Exp $
 
7
  # $Id: my2pg.diff,v 1.1 2004-04-19 23:18:12 momjian Exp $
 
8
  
 
9
+ # Custom patch
 
10
+ # Revision 1.9  2002/08/22 00:01:39  tgl
 
11
+ # Add a bunch of pseudo-types to replace the behavior formerly associated
 
12
+ # with OPAQUE, as per recent pghackers discussion.  I still want to do some
 
13
+ # more work on the 'cstring' pseudo-type, but I'm going to commit the bulk
 
14
+ # of the changes now before the tree starts shifting under me ...
 
15
 
16
  #
 
17
  # $Log: my2pg.diff,v $
 
18
  # Revision 1.1  2004-04-19 23:18:12  momjian
 
19
  # Update to my2pg version 1.28, add docs, update URL for newest version.
 
20
  #
 
21
  # Create diff of custom changes Tom made to the utility for CREATE
 
22
  # FUNCTION.
 
23
  #
 
24
  # This will make moving this utility out of CVS easier.
 
25
  #
 
26
  # Revision 1.28  2002/11/30 12:03:48  fonin
 
27
***************
 
28
*** 332,342 ****
 
29
            print LIBTYPES "\n * Types for table ".uc($table_name);
 
30
            print LIBTYPES "\n */\n";
 
31
  
 
32
!           $types.="\nCREATE FUNCTION $typename"."_in (opaque)
 
33
        RETURNS $typename
 
34
        AS '$libtypename'
 
35
        LANGUAGE 'c'
 
36
!       WITH (ISCACHABLE);\n";
 
37
  
 
38
  # creating output function
 
39
            my $func_out="
 
40
--- 339,349 ----
 
41
            print LIBTYPES "\n * Types for table ".uc($table_name);
 
42
            print LIBTYPES "\n */\n";
 
43
  
 
44
!           $types.="\nCREATE FUNCTION $typename"."_in (cstring)
 
45
        RETURNS $typename
 
46
        AS '$libtypename'
 
47
        LANGUAGE 'c'
 
48
!       WITH (ISSTRICT, ISCACHABLE);\n";
 
49
  
 
50
  # creating output function
 
51
            my $func_out="
 
52
***************
 
53
*** 386,396 ****
 
54
      return (*a>=*b);
 
55
  }\n";
 
56
  
 
57
!           $types.="\nCREATE FUNCTION $typename"."_out (opaque)
 
58
!       RETURNS opaque
 
59
        AS '$libtypename'
 
60
        LANGUAGE 'c'
 
61
!       WITH (ISCACHABLE);\n";
 
62
  
 
63
            $types.="\nCREATE TYPE $typename (
 
64
        internallength = 2,
 
65
--- 393,403 ----
 
66
      return (*a>=*b);
 
67
  }\n";
 
68
  
 
69
!           $types.="\nCREATE FUNCTION $typename"."_out ($typename)
 
70
!       RETURNS cstring
 
71
        AS '$libtypename'
 
72
        LANGUAGE 'c'
 
73
!       WITH (ISSTRICT, ISCACHABLE);\n";
 
74
  
 
75
            $types.="\nCREATE TYPE $typename (
 
76
        internallength = 2,
 
77
***************
 
78
*** 532,538 ****
 
79
            print LIBTYPES "\n * Types for table ".uc($table_name);
 
80
            print LIBTYPES "\n */\n";
 
81
  
 
82
!           $types.="\nCREATE FUNCTION $typename"."_in (opaque)
 
83
        RETURNS $typename
 
84
        AS '$libtypename'
 
85
        LANGUAGE 'c';\n";
 
86
--- 539,545 ----
 
87
            print LIBTYPES "\n * Types for table ".uc($table_name);
 
88
            print LIBTYPES "\n */\n";
 
89
  
 
90
!           $types.="\nCREATE FUNCTION $typename"."_in (cstring)
 
91
        RETURNS $typename
 
92
        AS '$libtypename'
 
93
        LANGUAGE 'c';\n";
 
94
***************
 
95
*** 584,591 ****
 
96
  
 
97
  \n";
 
98
  
 
99
!           $types.="\nCREATE FUNCTION $typename"."_out (opaque)
 
100
!       RETURNS opaque
 
101
        AS '$libtypename'
 
102
        LANGUAGE 'c';\n";
 
103
  
 
104
--- 591,598 ----
 
105
  
 
106
  \n";
 
107
  
 
108
!           $types.="\nCREATE FUNCTION $typename"."_out ($typename)
 
109
!       RETURNS cstring
 
110
        AS '$libtypename'
 
111
        LANGUAGE 'c';\n";
 
112