Thread

  1. Re: Adding rest of SQL Standard

    Bruce Momjian <maillist@candle.pha.pa.us> — 1998-01-30T17:09:37Z

    [CC to hackers list].
    
    > 
    > Hi!
    > 
    > Do you still know me?
    > 
    > I'm the one who promised to work on the rest of the ANSI SQL Standard for
    > postgresql.
    
    Yep.  Funny thing, we are preparing a 6.3 beta release for Feb 1, and I
    just yesterday removed you name from the top of the TODO list because I
    hadn't heard anything for a while.
    
    > 
    > I know, I told you one year ago, that I would start my work immediately
    > but did nothing till now.
    > 
    > Now here's my question:
    > 
    >   Are you still interested in my working on that?
    
    Yes.
    
    >   I have finished all other important things of my studies so  I *really*
    >   start on Monday working on postgresql.
    
    Great.
    
    >   Maybe you remember, that I wanted this to be my Master's Thesis.
    >   Hope there is enough left for me!
    
    Sure is.  We really need someone who can focus on some big issues.
    
    >   I'm really still interested in it! The reason why I did not start so far
    >   is, that there have been a lot of examinations that have been very 
    >   important.
    > 
    > 
    > Hope you are not angry with me, this time I really want to do something
    > and I will try to finish this until summer (end of June), because I want
    > to finish my studies till that time.
    
    Not angry at all.  People offer to help, but things come up.  Any help
    is appreciated.
    
    Here is the developers FAQ.  You will probably have to study the source
    code for several weeks to get a clear idea of how everything works.  We
    can then get you started on items from the TODO list, if that is good
    for you, or any ideas you have after looking at the code.  I recommend
    you get the most current snapshot from ftp.postgresql.org, and start
    looking at it.
    
    ---------------------------------------------------------------------------
    
    Developers Frequently Asked Questions (FAQ) for PostgreSQL
    
    Last updated: Thu Jan 22 15:08:43 EST 1998
    
    Current maintainer: Bruce Momjian (maillist@candle.pha.pa.us)
    
    The most recent version of this document can be viewed at the postgreSQL Web
    site, http://postgreSQL.org.
    
      ------------------------------------------------------------------------
    
    Questions answered:
    
    1) General questions
    
    1) What tools are available for developers?
    2) What books are good for developers?
    3) Why do we use palloc() and pfree() to allocate memory?
    4) Why do we use Node and List to make data structures?
      ------------------------------------------------------------------------
    
    1) What tools are available for developers?
    
    Aside from the User documentation mentioned in the regular FAQ, there are
    several development tools available. First, all the files in the /tools
    directory are designed for developers.
    
            RELEASE_CHANGES         changes we have to make for each release
            SQL_keywords            standard SQL'92 keywords
            backend                 web flowchart of the backend directories
            ccsym                   find standard defines made by your compiler
            entab                   converts tabs to spaces, used by pgindent
            find_static             finds functions that could be made static
            find_typedef            get a list of typedefs in the source code
            make_ctags              make vi 'tags' file in each directory
            make_diff               make *.orig and diffs of source
            make_etags              make emacs 'etags' files
            make_keywords.README    make comparison of our keywords and SQL'92
            make_mkid               make mkid ID files
            mkldexport              create AIX exports file
            pgindent                indents C source files
    
    Let me note some of these. If you point your browser at the tools/backend
    directory, you will see all the backend components in a flow chart. You can
    click on any one to see a description. If you then click on the directory
    name, you will be taken to the source directory, to browse the actual source
    code behind it. We also have several README files in some source directories
    to describe the function of the module. The browser will display these when
    you enter the directory also. The tools/backend directory is also contained
    on our web page under the title Backend Flowchart.
    
    Second, you really should have an editor that can handle tags, so you can
    tag a function call to see the function definition, and then tag inside that
    function to see an even lower-level function, and then back out twice to
    return to the original function. Most editors support this via tags or etags
    files.
    
    Third, you need to get mkid from ftp.postgresql.org. By running
    tools/make_mkid, an archive of source symbols can be created that can be
    rapidly queried like grep or edited.
    
    make_diff has tools to create patch diff files that can be applied to the
    distribution.
    
    pgindent will format source files to match our standard format, which has
    four-space tabs, and an indenting format specified by flags to the your
    operating system's utility indent.
    
    2) What books are good for developers?
    
    I have two good books, An Introduction to Database Systems, by C.J. Date,
    Addison, Wesley and A Guide to the SQL Standard, by C.J. Date, et. al,
    Addison, Wesley.
    
    3) Why do we use palloc() and pfree() to allocate memory?
    
    palloc() and pfree() are used in place of malloc() and free() because we
    automatically free all memory allocated when a transaction completes. This
    makes it easier to make sure we free memory that gets allocated in one
    place, but only freed much later. There are several contexts that memory can
    be allocated in, and this controls when the allocated memory is
    automatically freed by the backend.
    
    4) Why do we use Node and List to make data structures?
    
    We do this because this allows a consistent way to pass data inside the
    backend in a flexible way. Every node has a NodeTag which specifies what
    type of data is inside the Node. Lists are lists of Nodes. lfirst(),
    lnext(), and foreach() are used to get, skip, and traverse throught Lists.
    
    -- 
    Bruce Momjian
    maillist@candle.pha.pa.us