diff options
author | Michael Meskes <meskes@postgresql.org> | 2008-03-02 10:54:11 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2008-03-02 10:54:11 +0000 |
commit | fb7b1df083cc95ac79cdda836686933e6408f693 (patch) | |
tree | e2ba6aa88211d2554a982ef157ad991f151d9029 /src/interfaces/ecpg/test/preproc/array_of_struct.pgc | |
parent | 0f855d621b407bfa7b4a4ef188ad261ca8e405ca (diff) | |
download | postgresql-fb7b1df083cc95ac79cdda836686933e6408f693.tar.gz postgresql-fb7b1df083cc95ac79cdda836686933e6408f693.zip |
Fixed bug that caused arrays of varchar to be output with incomplete name.
In the process expanded one test case,
Diffstat (limited to 'src/interfaces/ecpg/test/preproc/array_of_struct.pgc')
-rw-r--r-- | src/interfaces/ecpg/test/preproc/array_of_struct.pgc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/test/preproc/array_of_struct.pgc b/src/interfaces/ecpg/test/preproc/array_of_struct.pgc index 52f952d639f..50fde0662ab 100644 --- a/src/interfaces/ecpg/test/preproc/array_of_struct.pgc +++ b/src/interfaces/ecpg/test/preproc/array_of_struct.pgc @@ -42,6 +42,7 @@ int main( int argc, char * argv[] ) int phone; } custs4; int r; + varchar onlyname[2][50]; EXEC SQL end declare section; ECPGdebug(1, stderr); @@ -81,6 +82,13 @@ int main( int argc, char * argv[] ) printf( "name - %s\n", custs4.name.arr ); printf( "phone - %d\n", custs4.phone ); + EXEC SQL select c INTO :onlyname from customers limit 2; + printf("\nname:\n"); + for (r = 0; r < 2; r++) + { + printf( "name - %s\n", onlyname[r].arr ); + } + EXEC SQL disconnect all; return( 0 ); |