Skip to content

Commit

Permalink
Add some error checking for SPI_connect
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Jan 8, 2010
1 parent 821e790 commit c9755c5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/handler/plparrot.c
Expand Up @@ -25,11 +25,15 @@ int execq(text *sql, int cnt);
int
execq(text *sql, int cnt)
{
char *command;
int ret;
//char *command;
int proc;
int ret;

SPI_connect();
ret = SPI_connect();
if ( ret == SPI_ERROR_CONNECT ) {
printf("SPI connect error!\n");
return 1;
}

SPI_finish();
//pfree(command);
Expand Down

0 comments on commit c9755c5

Please sign in to comment.