1. 16 7月, 1999 2 次提交
  2. 15 7月, 1999 1 次提交
  3. 03 7月, 1999 1 次提交
  4. 29 5月, 1999 1 次提交
  5. 26 5月, 1999 2 次提交
  6. 23 5月, 1999 1 次提交
  7. 22 5月, 1999 1 次提交
  8. 13 5月, 1999 1 次提交
    • T
      Rip out QueryTreeList structure, root and branch. Querytree · 507a0a2a
      Tom Lane 提交于
      lists are now plain old garden-variety Lists, allocated with palloc,
      rather than specialized expansible-array data allocated with malloc.
      This substantially simplifies their handling and eliminates several
      sources of memory leakage.
      Several basic types of erroneous queries (syntax error, attempt to
      insert a duplicate key into a unique index) now demonstrably leak
      zero bytes per query.
      507a0a2a
  9. 11 5月, 1999 1 次提交
    • J
      Changed debug options: · 50570109
      Jan Wieck 提交于
      -d4 now prints compressed trees from nodeToString()
      -d5 prints pretty trees via nodeDisplay()
      
      new pg_options: pretty_plan, pretty_parse, pretty_rewritten
      
      Jan
      50570109
  10. 10 5月, 1999 1 次提交
  11. 04 5月, 1999 1 次提交
    • B
      here are some patches for 6.5.0 which I already submitted but have never · 210055ad
      Bruce Momjian 提交于
      been applied. The patches are in the .tar.gz attachment at the end:
      
      varchar-array.patch     this patch adds support for arrays of bpchar() and
                              varchar(), which where always missing from postgres.
      
                              These datatypes can be used to replace the _char4,
                              _char8, etc., which were dropped some time ago.
      
      block-size.patch        this patch fixes many errors in the parser and other
                              program which happen with very large query statements
                              (> 8K) when using a page size larger than 8192.
      
                              This patch is needed if you want to submit queries
                              larger than 8K. Postgres supports tuples up to 32K
                              but you can't insert them because you can't submit
                              queries larger than 8K. My patch fixes this problem.
      
                              The patch also replaces all the occurrences of `8192'
                              and `1<<13' in the sources with the proper constants
                              defined in include files. You should now never find
                              8192 hardwired in C code, just to make code clearer.
      
      
      --
      Massimo Dal Zotto
      210055ad
  12. 02 5月, 1999 1 次提交
  13. 25 4月, 1999 1 次提交
  14. 20 4月, 1999 1 次提交
  15. 23 3月, 1999 1 次提交
    • B
      Hi, · 48ea8b76
      Bruce Momjian 提交于
      I have solved some problems with dynamic loading on NT. It is possible
      to
      run succesfully both trigger and plpgsql regression tests. The patch is
      in
      the included file "diff".
      
                              Dan
      48ea8b76
  16. 18 3月, 1999 1 次提交
  17. 21 2月, 1999 1 次提交
    • M
      · 8c3e8a8a
      Marc G. Fournier 提交于
      From: Tatsuo Ishii <t-ishii@sra.co.jp>
      
      Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
      NOT_USED" for current. I have tested these patches in that the
      postgres binaries are identical.
      8c3e8a8a
  18. 18 2月, 1999 2 次提交
  19. 16 2月, 1999 1 次提交
  20. 15 2月, 1999 1 次提交
  21. 14 2月, 1999 1 次提交
  22. 02 2月, 1999 1 次提交
  23. 18 1月, 1999 1 次提交
    • B
      Hi! · bd8ffc6f
      Bruce Momjian 提交于
      INTERSECT and EXCEPT is available for postgresql-v6.4!
      
      The patch against v6.4 is included at the end of the current text
      (in uuencoded form!)
      
      I also included the text of my Master's Thesis. (a postscript
      version). I hope that you find something of it useful and would be
      happy if parts of it find their way into the PostgreSQL documentation
      project (If so, tell me, then I send the sources of the document!)
      
      The contents of the document are:
        -) The first chapter might be of less interest as it gives only an
           overview on SQL.
      
        -) The second chapter gives a description on much of PostgreSQL's
           features (like user defined types etc. and how to use these features)
      
        -) The third chapter starts with an overview of PostgreSQL's internal
           structure with focus on the stages a query has to pass (i.e. parser,
           planner/optimizer, executor). Then a detailed description of the
           implementation of the Having clause and the Intersect/Except logic is
           given.
      
      Originally I worked on v6.3.2 but never found time enough to prepare
      and post a patch. Now I applied the changes to v6.4 to get Intersect
      and Except working with the new version. Chapter 3 of my documentation
      deals with the changes against v6.3.2, so keep that in mind when
      comparing the parts of the code printed there with the patched sources
      of v6.4.
      
      Here are some remarks on the patch. There are some things that have
      still to be done but at the moment I don't have time to do them
      myself. (I'm doing my military service at the moment) Sorry for that
      :-(
      
      -) I used a rewrite technique for the implementation of the Except/Intersect
         logic which rewrites the query to a semantically equivalent query before
         it is handed to the rewrite system (for views, rules etc.), planner,
         executor etc.
      
      -) In v6.3.2 the types of the attributes of two select statements
         connected by the UNION keyword had to match 100%. In v6.4 the types
         only need to be familiar (i.e. int and float can be mixed). Since this
         feature did not exist when I worked on Intersect/Except it
         does not work correctly for Except/Intersect queries WHEN USED IN
         COMBINATION WITH UNIONS! (i.e. sometimes the wrong type is used for the
         resulting table. This is because until now the types of the attributes of
         the first select statement have been used for the resulting table.
         When Intersects and/or Excepts are used in combination with Unions it
         might happen, that the first select statement of the original query
         appears at another position in the query which will be executed. The reason
         for this is the technique used for the implementation of
         Except/Intersect which does a query rewrite!)
         NOTE: It is NOT broken for pure UNION queries and pure INTERSECT/EXCEPT
               queries!!!
      
      -) I had to add the field intersect_clause to some data structures
         but did not find time to implement printfuncs for the new field.
         This does NOT break the debug modes but when an Except/Intersect
         is used the query debug output will be the already rewritten query.
      
      -) Massive changes to the grammar rules for SELECT and INSERT statements
         have been necessary (see comments in gram.y and documentation for
         deatails) in order to be able to use mixed queries like
         (SELECT ... UNION (SELECT ... EXCEPT SELECT)) INTERSECT SELECT...;
      
      -) When using UNION/EXCEPT/INTERSECT you will get:
         NOTICE: equal: "Don't know if nodes of type xxx are equal".
         I did not have  time to add comparsion support for all the needed nodes,
         but the default behaviour of the function equal met my requirements.
         I did not dare to supress this message!
      
         That's the reason why the regression test for union will fail: These
         messages are also included in the union.out file!
      
      -) Somebody of you changed the union_planner() function for v6.4
         (I copied the targetlist to new_tlist and that was removed and
         replaced by a cleanup of the original targetlist). These chnages
         violated some having queries executed against views so I changed
         it back again. I did not have time to examine the differences between the
         two versions but now it works :-)
         If you want to find out, try the file queries/view_having.sql on
         both versions and compare the results . Two queries won't produce a
         correct result with your version.
      
      regards
      
          Stefan
      bd8ffc6f
  24. 17 1月, 1999 1 次提交
  25. 16 12月, 1998 1 次提交
  26. 16 10月, 1998 1 次提交
    • B
      The problem is that read_pg_options needs DataDir to read its file but · 8fa2742d
      Bruce Momjian 提交于
      DataDir is set after read_pg_options if postgres is called
      interactively.  If postgres is forked by postgres DataDir is read from
      the PGDATA enviromnent variable set by the postmaster and this explains
      while the bug disappears.  I have written this patch but I don't like
      it. Any better idea?
      
      Massimo Dal Zotto
      8fa2742d
  27. 14 10月, 1998 2 次提交
    • M
      · 6edea913
      Marc G. Fournier 提交于
      This is plain wrong, but check to see if DataDir was set *before* running
      read_pg_options ... read_pg_options should probably be moved to after the
      getopt() instead?
      6edea913
    • M
      · 37f90d82
      Marc G. Fournier 提交于
      case statement in select call was missing a break...
      37f90d82
  28. 06 10月, 1998 1 次提交
  29. 02 10月, 1998 1 次提交
    • T
      Clean up some minor bugs concerning what was inside the main loop · e12f4162
      Tom Lane 提交于
      and what wasn't.  Also try to improve the comments so that doesn't happen
      again.  Changed SIGPIPE handling to SIG_IGN so that if frontend quits,
      we will finish out the current command and return to main loop before
      quitting.  This seems much safer than a forced abort mid-command.
      e12f4162
  30. 01 9月, 1998 2 次提交
  31. 31 8月, 1998 1 次提交
    • M
      · 6c498285
      Marc G. Fournier 提交于
      From: Massimo Dal Zotto <dz@cs.unitn.it>
      6c498285
  32. 26 8月, 1998 2 次提交
    • M
      · 7414d619
      Marc G. Fournier 提交于
      From: Massimo Dal Zotto <dz@cs.unitn.it>
      
      > tprintf.patch
      >
      >       tprintf.patch
      >
      >       adds functions and macros which implement a conditional trace package
      >       with the ability to change flags and numeric options of running
      >       backends at runtime.
      >       Options/flags can be specified in the command line and/or read from
      >       the file pg_options in the data directory.
      7414d619
    • M
      · 1a5fb654
      Marc G. Fournier 提交于
      From: Massimo Dal Zotto <dz@cs.unitn.it>
      
      assert.patch
      
              adds a switch to turn on/off the assert checking if enabled at compile
              time. You can now compile postgres with assert checking and disable it
              at runtime in a production environment.
      1a5fb654
  33. 25 8月, 1998 1 次提交
  34. 24 8月, 1998 1 次提交
    • B
      This is the final state of the rule system for 6.4 after the · 15cb32d9
      Bruce Momjian 提交于
          patch is applied:
      
      	Rewrite rules on relation level work fine now.
      
      	Event qualifications on insert/update/delete  rules  work
      	fine now.
      
      	I  added  the  new  keyword  OLD to reference the CURRENT
      	tuple. CURRENT will be removed in 6.5.
      
      	Update rules can  reference  NEW  and  OLD  in  the  rule
      	qualification and the actions.
      
      	Insert/update/delete rules on views can be established to
      	let them behave like real tables.
      
      	For  insert/update/delete  rules  multiple  actions   are
      	supported  now.   The  actions  can also be surrounded by
      	parantheses to make psql  happy.   Multiple  actions  are
      	required if update to a view requires updates to multiple
      	tables.
      
      	Regular users  are  permitted  to  create/drop  rules  on
      	tables     they     have     RULE     permissions     for
      	(DefineQueryRewrite() is  now  able  to  get  around  the
      	access  restrictions  on  pg_rewrite).  This enables view
      	creation for regular users too. This  required  an  extra
      	boolean  parameter  to  pg_parse_and_plan() that tells to
      	set skipAcl on all rangetable entries  of  the  resulting
      	queries.       There      is      a      new     function
      	pg_exec_query_acl_override()  that  could  be   used   by
      	backend utilities to use this facility.
      
      	All rule actions (not only views) inherit the permissions
      	of the event relations  owner.  Sample:  User  A  creates
      	tables    T1    and    T2,   creates   rules   that   log
      	INSERT/UPDATE/DELETE on T1 in T2 (like in the  regression
      	tests  for rules I created) and grants ALL but RULE on T1
      	to user B.  User B  can  now  fully  access  T1  and  the
      	logging  happens  in  T2.  But user B cannot access T2 at
      	all, only the rule actions can. And due to  missing  RULE
      	permissions on T1, user B cannot disable logging.
      
      	Rules  on  the  attribute  level are disabled (they don't
      	work properly and since regular users are  now  permitted
      	to create rules I decided to disable them).
      
      	Rules  on  select  must have exactly one action that is a
      	select (so select rules must be a view definition).
      
      	UPDATE NEW/OLD rules  are  disabled  (still  broken,  but
      	triggers can do it).
      
      	There are two new system views (pg_rule and pg_view) that
      	show the definition of the rules or views so the db admin
      	can  see  what  the  users do. They use two new functions
      	pg_get_ruledef() and pg_get_viewdef() that are  builtins.
      
      	The functions pg_get_ruledef() and pg_get_viewdef() could
      	be used to implement rule and view support in pg_dump.
      
      	PostgreSQL is now the only database system I  know,  that
      	has rewrite rules on the query level. All others (where I
      	found a  rule  statement  at  all)  use  stored  database
      	procedures  or  the  like  (triggers as we call them) for
      	active rules (as some call them).
      
          Future of the rule system:
      
      	The now disabled parts  of  the  rule  system  (attribute
      	level,  multiple  actions on select and update new stuff)
      	require a complete new rewrite handler from scratch.  The
      	old one is too badly wired up.
      
      	After  6.4  I'll  start to work on a new rewrite handler,
      	that fully supports the attribute level  rules,  multiple
      	actions on select and update new.  This will be available
      	for 6.5 so we get full rewrite rule capabilities.
      
      Jan
      15cb32d9