~ubuntu-branches/ubuntu/gutsy/pgeasy/gutsy

« back to all changes in this revision

Viewing changes to examples/pgmultiresult.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-06-22 11:50:41 UTC
  • Revision ID: james.westby@ubuntu.com-20050622115041-sb8xh3skqiukjcr0
Tags: 1:3.0.4-2
* Converted to cdbs.
* Transition to new PostgreSQL architecture. (closes: #315363)
* Install libpgeasy.h into /usr/include/ now.
* Added debian/patches/01_fix_examples.patch: Split out example fixes into
  separate patch.
* Added debian/patches/99_relibtoolize.patch: Split out autotools updates
  for MIPS support (see #243631)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
#include <stdio.h>
7
7
#include "libpq-fe.h"
 
8
#include "../halt.h"
8
9
#include "libpgeasy.h"
9
10
 
10
11
int
16
17
        PGresult        *res1, *res2;
17
18
        int                     res1_done = 0, res2_done = 0;
18
19
 
19
 
        if (argc != 2) {
20
 
                printf("Usage:  %s database\n", argv[0]);
21
 
                return 0;
22
 
        }
 
20
        if (argc != 2)
 
21
                halt("Usage:  %s database\n", argv[0]);
23
22
 
24
23
        snprintf(optstr, 256, "dbname=%s", argv[1]);
25
24
        connectdb(optstr);