1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-12 02:37:31 +03:00

pgindent run.

This commit is contained in:
Bruce Momjian
2003-08-04 00:43:34 +00:00
parent 63354a0228
commit 089003fb46
554 changed files with 24888 additions and 21245 deletions

View File

@@ -25,9 +25,9 @@ main(int argc, char **argv)
j;
/*
* If the user supplies a parameter on the command line, use it as
* the conninfo string; otherwise default to setting dbname=template1
* and using environment variables or defaults for all other connection
* If the user supplies a parameter on the command line, use it as the
* conninfo string; otherwise default to setting dbname=template1 and
* using environment variables or defaults for all other connection
* parameters.
*/
if (argc > 1)
@@ -48,7 +48,7 @@ main(int argc, char **argv)
/*
* Our test case here involves using a cursor, for which we must be
* inside a transaction block. We could do the whole thing with a
* inside a transaction block. We could do the whole thing with a
* single PQexec() of "select * from pg_database", but that's too
* trivial to make a good example.
*/

View File

@@ -3,23 +3,23 @@
* Test of the asynchronous notification interface
*
* Start this program, then from psql in another window do
* NOTIFY TBL2;
* NOTIFY TBL2;
* Repeat four times to get this program to exit.
*
* Or, if you want to get fancy, try this:
* populate a database with the following commands
* (provided in src/test/examples/testlibpq2.sql):
*
* CREATE TABLE TBL1 (i int4);
* CREATE TABLE TBL1 (i int4);
*
* CREATE TABLE TBL2 (i int4);
* CREATE TABLE TBL2 (i int4);
*
* CREATE RULE r1 AS ON INSERT TO TBL1 DO
* (INSERT INTO TBL2 VALUES (new.i); NOTIFY TBL2);
* CREATE RULE r1 AS ON INSERT TO TBL1 DO
* (INSERT INTO TBL2 VALUES (new.i); NOTIFY TBL2);
*
* and do this four times:
*
* INSERT INTO TBL1 VALUES (10);
* INSERT INTO TBL1 VALUES (10);
*/
#include <stdio.h>
#include <stdlib.h>
@@ -45,9 +45,9 @@ main(int argc, char **argv)
int nnotifies;
/*
* If the user supplies a parameter on the command line, use it as
* the conninfo string; otherwise default to setting dbname=template1
* and using environment variables or defaults for all other connection
* If the user supplies a parameter on the command line, use it as the
* conninfo string; otherwise default to setting dbname=template1 and
* using environment variables or defaults for all other connection
* parameters.
*/
if (argc > 1)
@@ -67,7 +67,8 @@ main(int argc, char **argv)
}
/*
* Issue LISTEN command to enable notifications from the rule's NOTIFY.
* Issue LISTEN command to enable notifications from the rule's
* NOTIFY.
*/
res = PQexec(conn, "LISTEN TBL2");
if (PQresultStatus(res) != PGRES_COMMAND_OK)
@@ -88,9 +89,9 @@ main(int argc, char **argv)
while (nnotifies < 4)
{
/*
* Sleep until something happens on the connection. We use select(2)
* to wait for input, but you could also use poll() or similar
* facilities.
* Sleep until something happens on the connection. We use
* select(2) to wait for input, but you could also use poll() or
* similar facilities.
*/
int sock;
fd_set input_mask;

View File

@@ -13,9 +13,9 @@
* The expected output is:
*
* tuple 0: got
* i = (4 bytes) 1
* t = (11 bytes) 'joe's place'
* b = (5 bytes) \000\001\002\003\004
* i = (4 bytes) 1
* t = (11 bytes) 'joe's place'
* b = (5 bytes) \000\001\002\003\004
*
*/
#include <stdio.h>
@@ -50,9 +50,9 @@ main(int argc, char **argv)
b_fnum;
/*
* If the user supplies a parameter on the command line, use it as
* the conninfo string; otherwise default to setting dbname=template1
* and using environment variables or defaults for all other connection
* If the user supplies a parameter on the command line, use it as the
* conninfo string; otherwise default to setting dbname=template1 and
* using environment variables or defaults for all other connection
* parameters.
*/
if (argc > 1)

View File

@@ -1,5 +1,5 @@
/*
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.57 2003/07/27 21:49:55 tgl Exp $
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.58 2003/08/04 00:43:34 momjian Exp $
*/
#include "postgres.h"
@@ -218,7 +218,7 @@ typedef struct
} WIDGET;
WIDGET *widget_in(char *str);
char *widget_out(WIDGET *widget);
char *widget_out(WIDGET * widget);
extern Datum pt_in_widget(PG_FUNCTION_ARGS);
#define NARGS 3
@@ -250,7 +250,7 @@ widget_in(char *str)
}
char *
widget_out(WIDGET *widget)
widget_out(WIDGET * widget)
{
char *result;