| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | Carlos Moreno <moreno(at)mochima(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Is this legal SQL? Is it a good practice? |
| Date: | 2004-08-24 21:09:44 |
| Message-ID: | 200408242309.44134.peter_e@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Carlos Moreno wrote:
> I just noticed that from a C or C++ program using
> libpq or libpq++, I can send *one* command that
> contains several SQL statements separated by
> semicolon.
> But I'm wondering -- is this a PostgreSQL extension,
> or is it "legal SQL"?
The whole libpq API is made up out of thin air, so it's not conforming
to any public standard.
> In particular, I'm wondering
> if it is a feature that in the future you might
> decide to eliminate for not being ANSI-SQL compliant.
Because of the above, that cannot be a reason for eliminating any
interfaces.
> What happens if the first command is ok but the second
> one fails?
All the commands are run in one transaction, so if one fails, the whole
sequence is rolled back.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Doug McNaught | 2004-08-24 21:15:23 | Re: Problem to connect to the Windows Port |
| Previous Message | Tom Lane | 2004-08-24 21:07:06 | Re: Problem to connect to the Windows Port |