diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/common/indextuple.c | 10 | ||||
-rw-r--r-- | src/backend/access/index/istrat.c | 4 | ||||
-rw-r--r-- | src/backend/libpq/auth.c | 32 | ||||
-rw-r--r-- | src/backend/libpq/hba.c | 33 | ||||
-rw-r--r-- | src/backend/libpq/password.c | 8 | ||||
-rw-r--r-- | src/backend/libpq/portal.c | 6 | ||||
-rw-r--r-- | src/backend/libpq/pqcomm.c | 21 | ||||
-rw-r--r-- | src/backend/libpq/pqformat.c | 4 | ||||
-rw-r--r-- | src/backend/libpq/util.c | 16 | ||||
-rw-r--r-- | src/backend/tcop/postgres.c | 12 | ||||
-rw-r--r-- | src/backend/utils/mmgr/palloc.c | 4 |
11 files changed, 79 insertions, 71 deletions
diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index 7daa5974bd3..77d878591d2 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.38 1999/07/19 07:07:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.39 1999/10/23 03:13:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -44,10 +44,10 @@ index_formtuple(TupleDesc tupleDescriptor, uint16 tupmask = 0; int numberOfAttributes = tupleDescriptor->natts; - if (numberOfAttributes > MaxIndexAttributeNumber) - elog(ERROR, "index_formtuple: numberOfAttributes of %d > %d", - numberOfAttributes, MaxIndexAttributeNumber); - + /* XXX shouldn't this test be '>' ? */ + if (numberOfAttributes >= INDEX_MAX_KEYS) + elog(ERROR, "index_formtuple: numberOfAttributes %d >= %d", + numberOfAttributes, INDEX_MAX_KEYS); for (i = 0; i < numberOfAttributes && !hasnull; i++) { diff --git a/src/backend/access/index/istrat.c b/src/backend/access/index/istrat.c index cab6e584609..77918725e13 100644 --- a/src/backend/access/index/istrat.c +++ b/src/backend/access/index/istrat.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.36 1999/09/18 19:06:04 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.37 1999/10/23 03:13:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -544,7 +544,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy, StrategyMap map; AttrNumber attributeNumber; int attributeIndex; - Oid operatorClassObjectId[MaxIndexAttributeNumber]; + Oid operatorClassObjectId[INDEX_MAX_KEYS]; if (!IsBootstrapProcessingMode()) { diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index 97d21cb68bc..8c45e6231f8 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.41 1999/09/27 03:12:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.42 1999/10/23 03:13:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -96,23 +96,25 @@ pg_krb4_recvauth(Port *port) version); if (status != KSUCCESS) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, - "pg_krb4_recvauth: kerberos error: %s\n", krb_err_txt[status]); + snprintf(PQerrormsg, PQERRORMSG_LENGTH, + "pg_krb4_recvauth: kerberos error: %s\n", + krb_err_txt[status]); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); return STATUS_ERROR; } if (strncmp(version, PG_KRB4_VERSION, KRB_SENDAUTH_VLEN)) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, - "pg_krb4_recvauth: protocol version != \"%s\"\n", PG_KRB4_VERSION); + snprintf(PQerrormsg, PQERRORMSG_LENGTH, + "pg_krb4_recvauth: protocol version != \"%s\"\n", + PG_KRB4_VERSION); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); return STATUS_ERROR; } if (strncmp(port->user, auth_data.pname, SM_USER)) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "pg_krb4_recvauth: name \"%s\" != \"%s\"\n", port->user, auth_data.pname); fputs(PQerrormsg, stderr); @@ -126,8 +128,8 @@ pg_krb4_recvauth(Port *port) static int pg_krb4_recvauth(Port *port) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, - "pg_krb4_recvauth: Kerberos not implemented on this server.\n"); + snprintf(PQerrormsg, PQERRORMSG_LENGTH, + "pg_krb4_recvauth: Kerberos not implemented on this server.\n"); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); @@ -220,7 +222,7 @@ pg_krb5_recvauth(Port *port) *hostp = '\0'; if (code = krb5_parse_name(servbuf, &server)) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "pg_krb5_recvauth: Kerberos error %d in krb5_parse_name\n", code); com_err("pg_krb5_recvauth", code, "in krb5_parse_name"); return STATUS_ERROR; @@ -253,7 +255,7 @@ pg_krb5_recvauth(Port *port) (krb5_ticket **) NULL, (krb5_authenticator **) NULL)) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "pg_krb5_recvauth: Kerberos error %d in krb5_recvauth\n", code); com_err("pg_krb5_recvauth", code, "in krb5_recvauth"); krb5_free_principal(server); @@ -268,7 +270,7 @@ pg_krb5_recvauth(Port *port) */ if ((code = krb5_unparse_name(client, &kusername))) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "pg_krb5_recvauth: Kerberos error %d in krb5_unparse_name\n", code); com_err("pg_krb5_recvauth", code, "in krb5_unparse_name"); krb5_free_principal(client); @@ -277,7 +279,7 @@ pg_krb5_recvauth(Port *port) krb5_free_principal(client); if (!kusername) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "pg_krb5_recvauth: could not decode username\n"); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); @@ -286,7 +288,7 @@ pg_krb5_recvauth(Port *port) kusername = pg_an_to_ln(kusername); if (strncmp(username, kusername, SM_USER)) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "pg_krb5_recvauth: name \"%s\" != \"%s\"\n", port->user, kusername); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); @@ -301,7 +303,7 @@ pg_krb5_recvauth(Port *port) static int pg_krb5_recvauth(Port *port) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "pg_krb5_recvauth: Kerberos not implemented on this server.\n"); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); @@ -356,7 +358,7 @@ pg_passwordv0_recvauth(void *arg, PacketLen len, void *pkt) if (user == NULL || password == NULL) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "pg_password_recvauth: badly formed password packet.\n"); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 14291560322..194119922ae 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -5,7 +5,7 @@ * wherein you authenticate a user by seeing what IP address the system * says he comes from and possibly using ident). * - * $Id: hba.c,v 1.48 1999/09/27 03:12:59 momjian Exp $ + * $Id: hba.c,v 1.49 1999/10/23 03:13:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,9 +19,18 @@ #include <unistd.h> #include "postgres.h" + #include "libpq/libpq.h" #include "miscadmin.h" + +#define MAX_TOKEN 80 +/* Maximum size of one token in the configuration file */ + +#define IDENT_USERNAME_MAX 512 + /* Max size of username ident server can return */ + + /* Some standard C libraries, including GNU, have an isblank() function. Others, including Solaris, do not. So we have our own. */ @@ -32,7 +41,6 @@ isblank(const char c) } - static void next_token(FILE *fp, char *buf, const int bufsz) { @@ -302,9 +310,8 @@ process_hba_record(FILE *file, hbaPort *port, bool *matches_p, bool *error_p) return; syntax: - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "process_hba_record: invalid syntax in pg_hba.conf file\n"); - fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); @@ -397,7 +404,7 @@ find_hba_entry(hbaPort *port, bool *hba_ok_p) { /* Old config file exists. Tell this guy he needs to upgrade. */ close(fd); - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "A file exists by the name used for host-based authentication " "in prior releases of Postgres (%s). The name and format of " "the configuration file have changed, so this file should be " @@ -421,7 +428,7 @@ find_hba_entry(hbaPort *port, bool *hba_ok_p) { /* The open of the config file failed. */ - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "find_hba_entry: Host-based authentication config file " "does not exist or permissions are not setup correctly! " "Unable to open file \"%s\".\n", @@ -553,7 +560,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr, sock_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); if (sock_fd == -1) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "Failed to create socket on which to talk to Ident server. " "socket() returned errno = %s (%d)\n", strerror(errno), errno); @@ -590,7 +597,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr, } if (rc != 0) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "Unable to connect to Ident server on the host which is " "trying to connect to Postgres " "(IP address %s, Port %d). " @@ -610,7 +617,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr, rc = send(sock_fd, ident_query, strlen(ident_query), 0); if (rc < 0) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "Unable to send query to Ident server on the host which is " "trying to connect to Postgres (Host %s, Port %d)," "even though we successfully connected to it. " @@ -627,7 +634,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr, rc = recv(sock_fd, ident_response, sizeof(ident_response) - 1, 0); if (rc < 0) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "Unable to receive response from Ident server " "on the host which is " "trying to connect to Postgres (Host %s, Port %d)," @@ -692,7 +699,7 @@ parse_map_record(FILE *file, return; } } - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "Incomplete line in pg_ident: %s", file_map); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); @@ -775,7 +782,7 @@ verify_against_usermap(const char *pguser, if (usermap_name[0] == '\0') { *checks_out_p = false; - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "verify_against_usermap: hba configuration file does not " "have the usermap field filled in in the entry that pertains " "to this connection. That field is essential for Ident-based " @@ -813,7 +820,7 @@ verify_against_usermap(const char *pguser, *checks_out_p = false; - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "verify_against_usermap: usermap file for Ident-based " "authentication " "does not exist or permissions are not setup correctly! " diff --git a/src/backend/libpq/password.c b/src/backend/libpq/password.c index 3e3b8401e15..3722d2bd7f5 100644 --- a/src/backend/libpq/password.c +++ b/src/backend/libpq/password.c @@ -1,7 +1,7 @@ /* * Copyright (c) 1994, Regents of the University of California * - * $Id: password.c,v 1.25 1999/07/17 20:17:02 momjian Exp $ + * $Id: password.c,v 1.26 1999/10/23 03:13:21 tgl Exp $ * */ @@ -34,7 +34,7 @@ verify_password(char *auth_arg, char *user, char *password) #endif if (!pw_file) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "verify_password: couldn't open password file '%s'\n", pw_file_fullname); fputs(PQerrormsg, stderr); @@ -79,7 +79,7 @@ verify_password(char *auth_arg, char *user, char *password) return STATUS_OK; } - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "verify_password: password mismatch for '%s'.\n", user); fputs(PQerrormsg, stderr); @@ -91,7 +91,7 @@ verify_password(char *auth_arg, char *user, char *password) } } - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "verify_password: user '%s' not found in password file.\n", user); fputs(PQerrormsg, stderr); diff --git a/src/backend/libpq/portal.c b/src/backend/libpq/portal.c index abc69686e6d..754e283fabe 100644 --- a/src/backend/libpq/portal.c +++ b/src/backend/libpq/portal.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: portal.c,v 1.27 1999/07/17 20:17:02 momjian Exp $ + * $Id: portal.c,v 1.28 1999/10/23 03:13:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -66,7 +66,7 @@ in_range(char *msg, int value, int min, int max) { if (value < min || value >= max) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "FATAL: %s, %d is not in range [%d,%d)\n", msg, value, min, max); pqdebug("%s", PQerrormsg); fputs(PQerrormsg, stderr); @@ -80,7 +80,7 @@ valid_pointer(char *msg, void *ptr) { if (!ptr) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, "FATAL: %s\n", msg); + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "FATAL: %s\n", msg); pqdebug("%s", PQerrormsg); fputs(PQerrormsg, stderr); return 0; diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 38ddcd28d3f..7fc86d4ede3 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -28,7 +28,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqcomm.c,v 1.84 1999/09/27 03:12:59 momjian Exp $ + * $Id: pqcomm.c,v 1.85 1999/10/23 03:13:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -195,7 +195,7 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP) if ((fd = socket(family, SOCK_STREAM, 0)) < 0) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "FATAL: StreamServerPort: socket() failed: %s\n", strerror(errno)); fputs(PQerrormsg, stderr); @@ -211,7 +211,7 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP) if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(one))) == -1) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "FATAL: StreamServerPort: setsockopt(SO_REUSEADDR) failed: %s\n", strerror(errno)); fputs(PQerrormsg, stderr); @@ -266,20 +266,19 @@ StreamServerPort(char *hostName, unsigned short portName, int *fdP) err = bind(fd, &saddr.sa, len); if (err < 0) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, - "FATAL: StreamServerPort: bind() failed: %s\n", + snprintf(PQerrormsg, PQERRORMSG_LENGTH, + "FATAL: StreamServerPort: bind() failed: %s\n" + "\tIs another postmaster already running on that port?\n", strerror(errno)); - strcat(PQerrormsg, - "\tIs another postmaster already running on that port?\n"); if (family == AF_UNIX) - { snprintf(PQerrormsg + strlen(PQerrormsg), - ERROR_MSG_LENGTH - strlen(PQerrormsg), + PQERRORMSG_LENGTH - strlen(PQerrormsg), "\tIf not, remove socket node (%s) and retry.\n", sock_path); - } else - strcat(PQerrormsg, "\tIf not, wait a few seconds and retry.\n"); + snprintf(PQerrormsg + strlen(PQerrormsg), + PQERRORMSG_LENGTH - strlen(PQerrormsg), + "\tIf not, wait a few seconds and retry.\n"); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); return STATUS_ERROR; diff --git a/src/backend/libpq/pqformat.c b/src/backend/libpq/pqformat.c index 098c41dc525..28f6d48db35 100644 --- a/src/backend/libpq/pqformat.c +++ b/src/backend/libpq/pqformat.c @@ -15,7 +15,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqformat.c,v 1.10 1999/09/12 22:27:47 scrappy Exp $ + * $Id: pqformat.c,v 1.11 1999/10/23 03:13:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -213,7 +213,7 @@ pq_endmessage(StringInfo buf) { if (pq_putmessage('\0', buf->data, buf->len)) { - snprintf(PQerrormsg, ERROR_MSG_LENGTH, + snprintf(PQerrormsg, PQERRORMSG_LENGTH, "FATAL: pq_endmessage failed: errno=%d\n", errno); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); diff --git a/src/backend/libpq/util.c b/src/backend/libpq/util.c index c331298dbd5..755554fb0d9 100644 --- a/src/backend/libpq/util.c +++ b/src/backend/libpq/util.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: util.c,v 1.13 1999/07/17 20:17:03 momjian Exp $ + * $Id: util.c,v 1.14 1999/10/23 03:13:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -23,6 +23,15 @@ /* ---------------- + * global variables for backend libpq + * ---------------- + */ +char PQerrormsg[PQERRORMSG_LENGTH]; + +int PQtracep = 0; /* 1 to print out debugging messages */ +FILE *debug_port = (FILE *) NULL; + +/* ---------------- * exceptions * ---------------- */ @@ -30,15 +39,12 @@ Exception MemoryError = {"Memory Allocation Error"}; Exception PortalError = {"Invalid arguments to portal functions"}; Exception PostquelError = {"Sql Error"}; Exception ProtocolError = {"Protocol Error"}; -char PQerrormsg[ERROR_MSG_LENGTH]; - -int PQtracep = 0; /* 1 to print out debugging messages */ -FILE *debug_port = (FILE *) NULL; /* ---------------------------------------------------------------- * PQ utility routines * ---------------------------------------------------------------- */ + void pqdebug(char *target, char *msg) { diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 8358e116980..ddf6c280e4f 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.134 1999/10/08 05:36:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.135 1999/10/23 03:13:22 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -22,16 +22,10 @@ #include <sys/time.h> #include <sys/types.h> #include <fcntl.h> -#include <sys/param.h> +#include <sys/socket.h> #include "postgres.h" -#ifndef MAXHOSTNAMELEN -#include <netdb.h> -#endif -#ifndef MAXHOSTNAMELEN /* for MAXHOSTNAMELEN under sco3.2v5.0.2 */ -#include <sys/socket.h> -#endif #include <errno.h> #if HAVE_SYS_SELECT_H #include <sys/select.h> @@ -1500,7 +1494,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.134 $ $Date: 1999/10/08 05:36:58 $\n"); + puts("$Revision: 1.135 $ $Date: 1999/10/23 03:13:22 $\n"); } /* diff --git a/src/backend/utils/mmgr/palloc.c b/src/backend/utils/mmgr/palloc.c index 5b2cc419e84..afc52b4b5b4 100644 --- a/src/backend/utils/mmgr/palloc.c +++ b/src/backend/utils/mmgr/palloc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.14 1999/07/17 20:18:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.15 1999/10/23 03:13:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -35,7 +35,7 @@ pstrdup(char *string) int len; nstr = palloc(len = strlen(string) + 1); - MemoryCopy(nstr, string, len); + memcpy(nstr, string, len); return nstr; } |