~ubuntu-branches/ubuntu/karmic/libgda4/karmic

« back to all changes in this revision

Viewing changes to providers/postgres/gda-postgres-util.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-09-18 14:41:56 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090918144156-z5uaoazrotyye0t1
Tags: 4.0.4-1ubuntu1
* Re-base on Debian unstable (LP: #432169), remaining changes:
  - debian/control: 
    + Change MySQL build-dep to 5.1 in main.
    + Add various conflicts/replaces to handle new binary package names.
    + Build-depend on rarian-compat rather than scrollkeeper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <glib/gi18n-lib.h>
26
26
#include "gda-postgres-util.h"
27
27
 
 
28
#include <libgda/sqlite/keywords_hash.h>
 
29
#include "keywords_hash.c" /* this one is dynamically generated */
 
30
 
28
31
static GdaConnectionEventCode
29
32
gda_postgres_sqlsate_to_gda_code (const gchar *sqlstate)
30
33
{
129
132
        else
130
133
                return G_TYPE_STRING;
131
134
}
 
135
 
 
136
#ifdef GDA_DEBUG
 
137
void
 
138
_gda_postgres_test_keywords (void)
 
139
{
 
140
        V82test_keywords();
 
141
        V83test_keywords();
 
142
        V84test_keywords();
 
143
}
 
144
#endif
 
145
 
 
146
GdaSqlReservedKeywordsFunc
 
147
_gda_postgres_get_reserved_keyword_func (PostgresConnectionData *cdata)
 
148
{
 
149
        if (cdata && cdata->short_version) {
 
150
                switch (*cdata->short_version) {
 
151
                case '8':
 
152
                        if (cdata->short_version[1] == '2')
 
153
                                return V82is_keyword;
 
154
                        if (cdata->short_version[1] == '3')
 
155
                                return V83is_keyword;
 
156
                        if (cdata->short_version[1] == '4')
 
157
                                return V84is_keyword;
 
158
                        return V84is_keyword;
 
159
                default:
 
160
                        return V84is_keyword;
 
161
                break;
 
162
                }
 
163
        }
 
164
        return V84is_keyword;
 
165
}