From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-xxxfer.readnews.com!news-out.readnews.com!postnews7.readnews.com!not-for-mail Date: Wed, 02 Mar 2011 09:36:50 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <31c357bd-c8dc-4583-a454-86d9c579e5f4@m13g2000yqb.googlegroups.com> <05a3673e-fb97-449c-94ed-1139eb085c32@x1g2000yqb.googlegroups.com> <4d4c232a$0$28967$882e7ee2@usenet-news.net> <4D4D6506.50909@obry.net> <4d50095f$0$22393$882e7ee2@usenet-news.net> <4d6d56c4$0$11509$882e7ee2@usenet-news.net> <16u9ka51wbukr$.1fj2sb73j9rv6.dlg@40tude.net> <4d6d627b$0$11509$882e7ee2@usenet-news.net> <29c4lixc0ght$.14kkfz1kij135.dlg@40tude.net> <4d6d6afb$0$11509$882e7ee2@usenet-news.net> <1gz9984wwizn5.r619fw4z9o56.dlg@40tude.net> In-Reply-To: <1gz9984wwizn5.r619fw4z9o56.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4d6e5614$0$21954$882e7ee2@usenet-news.net> NNTP-Posting-Host: d4e592a2.usenet-news.net X-Trace: DXC=aS=1j?mhXn94@K7B>b86h=QFZ3T]GPM]7mX0AG3X_jU?EREK78_1jB;VjKk:Lk^BN1cR12TN^Bg7>[3hNl4]a6J?YoLCIT2AA@5 X-Complaints-To: abuse@usenet-news.net Xref: g2news1.google.com comp.lang.ada:17723 Date: 2011-03-02T09:36:50-05:00 List-Id: On 3/2/2011 3:42 AM, Dmitry A. Kazakov wrote: > On Tue, 01 Mar 2011 16:54:04 -0500, Hyman Rosen wrote: >> On 3/1/2011 4:37 PM, Dmitry A. Kazakov wrote: >>> They must do it this way, because the database interface is untyped. >> That makes no sense. They are providing a programming interface >> for Ada to SQL. > No, they do to the PostgreSQL client, which is in C. > SQL cannot be interfaced at all, unless embedded. No. They are providing the client programmer an interface to SQL in Ada. That they then have to implement this interface via the C Postgres SQL client should be irrelevant to what the client Ada programmer sees. Isn't that what Ada programmers want? > I don't understand this. Try not clipping out the last half of my sentence, then. > All problems are on the client size, which is untyped because C cannot > capture the set of DB types, and RDBMS is unable to describe the semantics > and internal representation of these types. Ada cannot save you of you are > sitting on top of a cesspit. You are already there, enjoy it! You may wave your hands and rant all you like, but in fact the error was a simple one - the programmer of the SQL interface made a mistake and added quotes to strings which were being bound to parameters, where this should not be done. Ada is great at avoiding out-of-bounds array access and null pointer indirection. It's great at making sure you don't forget a case in a case statement. It won't protect you against the same old dumb logic errors that creep into any program.