Re: GET DIAGNOSTICS (was Re: Open 7.1 items)
От | Philip Warner |
---|---|
Тема | Re: GET DIAGNOSTICS (was Re: Open 7.1 items) |
Дата | |
Msg-id | 3.0.5.32.20010219144206.02d936e0@mail.rhyme.com.au обсуждение исходный текст |
Ответ на | GET DIAGNOSTICS (was Re: Open 7.1 items) (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: GET DIAGNOSTICS (was Re: Open 7.1 items)
Re: GET DIAGNOSTICS (was Re: Open 7.1 items) Re: GET DIAGNOSTICS (was Re: Open 7.1 items) |
Список | pgsql-hackers |
At 20:40 18/02/01 -0500, Tom Lane wrote: >Philip Warner <pjw@rhyme.com.au> writes: >>> Hmm, that's definitely what SQL99 uses for the syntax. I wonder where >>> Jan got the SELECT INTO syntax --- did he borrow it from Oracle? > >> Sadly, we made it up. > >Ah so. Well, friendliness aside, I'd go with the spec's syntax. Probably a reasonably defensible position, too. >> We *do* need to support ROW_COUNT, but allowing > >> GET DIAGNOSTICS Select ROW_COUNT, SQLCODE, OID Into :a,:b:,:c; > >> is a lot friendlier than the standard: > >> GET DIAGNOSTICS :a = ROW_COUNT; >> GET DIAGNOSTICS EXCEPTION 1 :b = SQLCODE; >> GET DIAGNOSTICS :c = OID; > >It looks to me like SQL99 allows > > GET DIAGNOSTICS :a = ROW_COUNT, :b = OID, ...; Yes, but condition information (eg. SPI RESULT or SQLCODE), needs a separate statement to row information (eg. ROW_COUNT). ie. GET DIAGNOSTICS :a = ROW_COUNT, :c = OID; GET DIAGNOSTICS EXCEPTION 1 :b = SQLCODE; but it's not much of a problem, really. And I agree the 'x = y' syntax is better. Unfortunately, I don't have an awful lot of free time at the moment, so I won't be able to look at this for at *least* as week. ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.B.N. 75 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 0500 83 82 82 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/
В списке pgsql-hackers по дате отправления: