[unixODBC-support] missing semicolon in query generated of postgresql SQLForeignKeys() ?

Eric Sharkey sharkey at netrics.com
Thu Feb 24 20:09:38 GMT 2005

> I enabled the trace logging on postgreSQL, and found that the SQL 
> statements that are generated to fulfill these requests. For each 
> attempt at either SQLForeignKeys() or SQLPrimaryKeys(), I see the SQL 
> statement logged, but without a semicolon  terminator to the query. 
> Executing these SQL statements by hand does select the attributes I am 
> interested in. (So I know that the relationships exist, and can be queried.)

SQL does not have a concept of a statement terminator, like you
find in languages like C.  The ';' in SQL is a statement separator,
not a statement terminator.

The difference is that it is not required (or desired) to append a
semicolon on the end of a SQL statement.  When a SQL statement ends
with a ;, it's really two statements, with the second statement being
the empty statement.

I think the "missing" semicolon is not the source of your problem.


More information about the unixODBC-support mailing list