From 5ed27e35f35f6c354b1a7120ec3a3ce57f93e73e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 22 Apr 2003 00:08:07 +0000 Subject: Another round of protocol changes. Backend-to-frontend messages now all have length words. COPY OUT reimplemented per new protocol: it doesn't need \. anymore, thank goodness. COPY BINARY to/from frontend works, at least as far as the backend is concerned --- libpq's PQgetline API is not up to snuff, and will have to be replaced with something that is null-safe. libpq uses message length words for performance improvement (no cycles wasted rescanning long messages), but not yet for error recovery. --- src/backend/commands/async.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/async.c') diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index 169c4ce278c..1d9fbf65809 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.92 2003/02/18 02:53:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.93 2003/04/22 00:08:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -847,10 +847,14 @@ NotifyMyFrontEnd(char *relname, int32 listenerPID) { StringInfoData buf; - pq_beginmessage(&buf); - pq_sendbyte(&buf, 'A'); + pq_beginmessage(&buf, 'A'); pq_sendint(&buf, listenerPID, sizeof(int32)); pq_sendstring(&buf, relname); + if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 3) + { + /* XXX Add parameter string here later */ + pq_sendstring(&buf, ""); + } pq_endmessage(&buf); /* -- cgit v1.2.3