~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to src/interfaces/ecpg/test/preproc/strings.pgc

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdlib.h>
 
2
 
 
3
exec sql include ../regression;
 
4
 
 
5
exec sql begin declare section;
 
6
char *s1, *s2, *s3, *s4, *s5, *s6;
 
7
exec sql end declare section;
 
8
 
 
9
int main(void)
 
10
{
 
11
  ECPGdebug(1, stderr);
 
12
 
 
13
  exec sql connect to REGRESSDB1;
 
14
 
 
15
  exec sql select 'abcdef',
 
16
                  N'abcdef' AS foo,
 
17
                  E'abc\bdef' AS "foo",
 
18
                  U&'d\0061t\0061' AS U&"foo",
 
19
                  U&'d!+000061t!+000061' uescape '!',
 
20
                  $foo$abc$def$foo$
 
21
                  into :s1, :s2, :s3, :s4, :s5, :s6;
 
22
 
 
23
  printf("%s %s %s %s %s %s\n", s1, s2, s3, s4, s5, s6);
 
24
 
 
25
  exec sql disconnect;
 
26
  exit (0);
 
27
}