Skip to content

Commit f9e083f

Browse files
author
Michael Meskes
committed
Added ECPGget_PGconn() function to ecpglib, courtesy of Mike Aubury.
Removed one include file from connect-test1.
1 parent 15364ea commit f9e083f

File tree

5 files changed

+31
-16
lines changed

5 files changed

+31
-16
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,4 +2331,9 @@ Sun, 02 Mar 2008 11:50:48 +0100
23312331
Thu, 20 Mar 2008 16:54:27 +0100
23322332

23332333
- Changed statement escaping to not escape continuation line markers.
2334+
- Added ECPGget_PGconn() function to ecpglib, courtesy of Mike Aubury.
2335+
- Set pgtypes library version to 3.1.
2336+
- Set compat library version to 3.1.
2337+
- Set ecpg library version to 6.2.
2338+
- Set ecpg version to 4.5.
23342339

src/interfaces/ecpg/ecpglib/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.56 2008/02/26 06:41:24 petere Exp $
8+
# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.57 2008/03/20 16:29:44 meskes Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -15,7 +15,7 @@ include $(top_builddir)/src/Makefile.global
1515

1616
NAME= ecpg
1717
SO_MAJOR_VERSION= 6
18-
SO_MINOR_VERSION= 1
18+
SO_MINOR_VERSION= 2
1919
DLTYPE= library
2020

2121
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \

src/interfaces/ecpg/ecpglib/connect.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.48 2007/11/15 21:14:45 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.49 2008/03/20 16:29:44 meskes Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -565,3 +565,13 @@ ECPGdisconnect(int lineno, const char *connection_name)
565565

566566
return true;
567567
}
568+
569+
PGconn* ECPGget_PGconn(const char *connection_name)
570+
{
571+
struct connection * con;
572+
573+
con=ecpg_get_connection(connection_name);
574+
if (con==NULL) return NULL;
575+
576+
return con->connection;
577+
}

src/interfaces/ecpg/include/ecpglib.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* this is a small part of c.h since we don't want to leak all postgres
33
* definitions into ecpg programs
4-
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.75 2008/02/14 12:22:36 meskes Exp $
4+
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.76 2008/03/20 16:29:45 meskes Exp $
55
*/
66

77
#ifndef _ECPGLIB_H
@@ -47,11 +47,13 @@ bool ECPGdo(const int, const int, const int, const char *, const bool, const in
4747
bool ECPGtrans(int, const char *, const char *);
4848
bool ECPGdisconnect(int, const char *);
4949
bool ECPGprepare(int, const char *, const int, const char *, const char *);
50-
bool ECPGdeallocate(int, int, const char *connection_name, const char *name);
51-
bool ECPGdeallocate_all(int, int, const char *connection_name);
52-
char *ECPGprepared_statement(const char *connection_name, const char *name, int);
50+
bool ECPGdeallocate(int, int, const char *, const char *);
51+
bool ECPGdeallocate_all(int, int, const char *);
52+
char *ECPGprepared_statement(const char *, const char *, int);
53+
PGconn *ECPGget_PGconn(const char *);
5354

54-
char *ECPGerrmsg(void);
55+
56+
char *ECPGerrmsg(void);
5557

5658
/* print an error message */
5759
void sqlprint(void);
@@ -63,18 +65,17 @@ void sqlprint(void);
6365

6466
/* dynamic SQL */
6567

66-
bool ECPGdo_descriptor(int line, const char *connection,
67-
const char *descriptor, const char *query);
68-
bool ECPGdeallocate_desc(int line, const char *name);
69-
bool ECPGallocate_desc(int line, const char *name);
68+
bool ECPGdo_descriptor(int, const char *, const char *, const char *);
69+
bool ECPGdeallocate_desc(int, const char *);
70+
bool ECPGallocate_desc(int, const char *);
7071
bool ECPGget_desc_header(int, const char *, int *);
71-
bool ECPGget_desc(int, const char *, int,...);
72+
bool ECPGget_desc(int, const char *, int, ...);
7273
bool ECPGset_desc_header(int, const char *, int);
73-
bool ECPGset_desc(int, const char *, int,...);
74+
bool ECPGset_desc(int, const char *, int, ...);
7475

7576
void ECPGset_noind_null(enum ECPGttype, void *);
7677
bool ECPGis_noind_null(enum ECPGttype, void *);
77-
bool ECPGdescribe(int, bool, const char *,...);
78+
bool ECPGdescribe(int, bool, const char *, ...);
7879

7980
/* dynamic result allocation */
8081
void ECPGfree_auto_mem(void);

src/interfaces/ecpg/test/expected/connect-test1.c.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* Processed by ecpg (regression mode) */
22
/* These include files are added by the preprocessor */
3-
#include <ecpgtype.h>
43
#include <ecpglib.h>
54
#include <ecpgerrno.h>
65
#include <sqlca.h>

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