Commit Graph

105 Commits

Author SHA1 Message Date
Bruce Momjian 1c5aec60bb I finish devel. of Oracle compatible DateTime routines TO_CHAR(),
TO_DATE()
and PgSQL extension FROM_CHAR().

TO_CHAR() routine allow formating text output with a datetime values:

        SELECT TO_CHAR('now'::datetime, '"Now is: "HH24:MI:SS');
        to_char
        ----------------
        Now is: 21:04:10

FROM_CHAR() routine allow convert text to a datetime:

        SELECT FROM_CHAR('September 1999 10:20:30', 'FMMonth YYYY
HH:MI:SS');
        from_char
        -----------------------------
        Wed Sep 01 10:20:30 1999 CEST

TO_DATE() is equal with FROM_CHAR(), but output a Date only:

        SELECT TO_DATE('September 1999 10:20:30', 'FMMonth YYYY
HH:MI:SS');
        to_date
        ----------
        09-01-1999


In attache is compressed dir for the contrib. All is prepared, but I'am
not
sure if Makefile is good (probably yes).

Comments & suggestions ?


Thomas, thank you for your good advices.

                                                        Karel


------------------------------------------------------------------------------

Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
1999-11-29 23:26:18 +00:00
Bruce Momjian 1f747c6722 Attached are the C-routines that implement a BIT and BIT VARYING type.
Adriaan Joubert
1999-11-29 22:34:36 +00:00
Bruce Momjian 676404d5dc Add pginterface into main tree, called pgeasy. 1999-10-11 17:47:02 +00:00
Bruce Momjian 3202f45354 Update contrib/README. 1999-10-09 01:31:36 +00:00
Bruce Momjian 16b996d105 Remove contrib/int8. 1999-10-09 01:08:51 +00:00
Bruce Momjian 5a017b96ad Apply contrib patch from Massimo 1999-09-27 20:04:14 +00:00
Tom Lane bd272cace6 Mega-commit to make heap_open/heap_openr/heap_close take an
additional argument specifying the kind of lock to acquire/release (or
'NoLock' to do no lock processing).  Ensure that all relations are locked
with some appropriate lock level before being examined --- this ensures
that relevant shared-inval messages have been processed and should prevent
problems caused by concurrent VACUUM.  Fix several bugs having to do with
mismatched increment/decrement of relation ref count and mismatched
heap_open/close (which amounts to the same thing).  A bogus ref count on
a relation doesn't matter much *unless* a SI Inval message happens to
arrive at the wrong time, which is probably why we got away with this
sloppiness for so long.  Repair missing grab of AccessExclusiveLock in
DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi.
Recommend 'make clean all' after pulling this update; I modified the
Relation struct layout slightly.
Will post further discussion to pghackers list shortly.
1999-09-18 19:08:25 +00:00
Bruce Momjian 4cf595bf88 Update from Massimo 1999-06-05 20:07:54 +00:00
Bruce Momjian 27b8143944 Hi,
I have updated my contrib code for version 6.5. In the attachment you will
find the directories array, datetime, miscutil, string, tools and userlocks
which replace the corresponding directories under contrib.

In contrib/tools you will find some developement scripts which I use while
hacking the sources. I hope they will be useful for some other people.

I have also added a contrib/Makefile which tries to compile and install all
the contribs. Unfortunately many of them don't have a Makefile or don't
compile cleanly.

--
Massimo Dal Zotto
1999-06-05 19:09:48 +00:00
Vadim B. Mikheev bbf37e9477 typedef struct LTAG
{
    Oid             relId;
    Oid             dbId;
    union
    {
        BlockNumber     blkno;
        TransactionId   xid;
    }               objId;
>
> Added:
>    /*
>     * offnum should be part of objId.tupleId above, but would increase
>     * sizeof(LOCKTAG) and so moved here; currently used by userlocks only.
>     */
>    OffsetNumber    offnum;
    uint16          lockmethod;     /* needed by userlocks */
} LOCKTAG;

gmake clean required...
User locks are ready for 6.5 release...
1999-06-01 09:35:39 +00:00
Bruce Momjian fcff1cdf4e Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
Bruce Momjian 4eadfe8754 Make 0x007f -> (unsigned)0x7f to make pgindent happy. 1999-05-25 22:04:56 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Bruce Momjian 57455fc565 Remove more -B parameters not needed. 1999-05-23 19:01:18 +00:00
Bruce Momjian 716b8e2dba Updates for 6.5. 1999-05-17 06:06:35 +00:00
Tom Lane cf11642e92 Undo collateral damage from recent patch: Makefile had
lost most of target list and thus 'make clean' didn't clean up very well.
1999-05-16 14:56:17 +00:00
Bruce Momjian 1a87c14c9c I am sorry, I misinterpreted the still failing trigger regression test.
The
offending code
has been removed, the action is now always dependent :-)

I suggest the following patch, to finally make trigger regression happy
again:

 <<refint1.patch>>
After that you can remove the following from TODO:
Remove ERROR:  check_primary_key: even number of arguments should be
specified
Trigger regression test fails

Andreas
1999-05-12 12:47:24 +00:00
Bruce Momjian d489fdfc7f I send you a attach of my modified refint.c that
works with a new policy  in cascade mode .

Please Read README.MAX .
I do not know if you are the author of refint.c ,
but if not please tell me who is .


Thank you ( excuse me for my bad english) .
Massimo Lambertini massimo.lambertini@everex.it
1999-05-10 15:12:29 +00:00
Bruce Momjian 9e4e33c996 This patch is to add more comments
to postgres.init.sh , clairify the options
available, and to add easy support
for installation of postgres into the
runlevel system.

"sh postgres.init.sh install"

Will now install "postgres" in the
/etc/rc.d/init.d directory and execute
/sbin/chkconfig to hook up the symbolic
links.  An uninstall option is also added.

Enclosed is the patch and the patched file

Clark
1999-05-10 04:57:07 +00:00
Bruce Momjian 40457dfde9 add mention of large object orphaning 1999-05-10 04:19:30 +00:00
Peter Mount 94bb87f94b vacuumlo deals with large objects not referenced by any tables and removes them. 1999-04-10 16:48:05 +00:00
Tom Lane 763a7ab6b0 Delete unused system table pg_parg. 1999-03-27 17:26:26 +00:00
Tom Lane 85e9e03e0b Update findoidjoins for 6.5: remove workaround for long-dead bug,
use NOT EXISTS() which is a lot faster than NOT IN (),
update documentation.
1999-03-26 07:21:58 +00:00
Bruce Momjian 787786085f contrib/array_iterator/array_iterator.c won't compile.
Included patches should fix the problem.
--
Tatsuo Ishii
1999-03-16 03:09:51 +00:00
Bruce Momjian 98ad3fcfaf Hi All,
I've changed the check_primary_key() function code to allow for either
the "automatic insert key rule" or "dependent insert key rule".
Previously it restricted the addtion of a child entry if the
corresponding parent entry was not there. Now if the option is
"automatic" it will add an entry in the parent too ( it will be
successful if there are no no-null fields in the parent apart from the
primary key).
The way to use it now is:
:/*
 * check_primary_key () -- check that key in tuple being
inserted/updated
 *                       references existing tuple in "primary" table.
 * Though it's called without args You have to specify referenced
 * table/keys while creating trigger:  key field names in triggered
table,
 * referenced table name, referenced key field names,type of action
[automatic|dependent]:
 * EXECUTE PROCEDURE
 * check_primary_key ('Fkey1', 'Fkey2', 'Ptable', 'Pkey1', 'Pkey2',
'[automatic|dependent]').
 */
I am attaching the new ../contrib/spi/refint.c file which will do this.
I will be glad to help in case of any problems.

- Anand.
1999-03-15 00:34:53 +00:00
Bruce Momjian 7311da9ec4 i have made minor changes to array_iterator to make it work with
pgsql-6.3.2. I think array_iterator is a great thing to have!!!

With best regards,


Tobias Gabele
1999-01-21 22:40:16 +00:00
Tom Lane 21badba151 Replace direct inclusions of c.h with inclusion of postgres.h,
to ensure that config.h is included as well.
1999-01-17 03:04:57 +00:00
Bruce Momjian f722af618a OK, here is a diff for the README file in /usr/src/pgsql/contrib/spi/.
For the 6.5 tree.

Have a great night.
Terry
1998-12-14 05:13:39 +00:00
Bruce Momjian 14f9dde379 New moddatetime contrib from Terry Mackintosh. 1998-12-12 20:20:49 +00:00
Vadim B. Mikheev 971175fa0c New HeapTuple structure/interface. 1998-11-27 20:09:56 +00:00
Thomas G. Lockhart 4d7188039a csh and sh examples were reversed.
Update the csh example with new comments and fixes from Thomas' linux box.
1998-11-25 02:57:27 +00:00
Marc G. Fournier 4f4edb8307 Thanks to Vince Vielhaber <vev@michvhf.com>
Here is an os2 psql client, with libpq.a library
1998-10-31 04:10:53 +00:00
Bruce Momjian 3abf496b8e > > There is a bug in check_foreign_key of refint.c which is bundled with
> > the standard distribution. It occurs when a trigger calling this
> > function recursively fires another trigger which calls the same
> > function. The calling check_foreign_key loses its plan informantion and
> > when it tries to use it the backend closes its channel. You can check it
> > with the sql script I am attaching below.
> > The solution to this is to do a find_plan again before executing it at
> > line 483 of refint.c.
> > Therefore two more lines should be added before line 483:

Anand Surelia
1998-10-06 03:12:59 +00:00
Bruce Momjian 2d69fd90b9 Integrate new IP type from Tom Ivar Helbekkmo. 1998-10-03 05:41:01 +00:00
Bruce Momjian 3700981108 Add new make_oidjoin_check utility and template1_check.sql. Fix some
pg_operator problems.
1998-09-14 01:14:49 +00:00
Bruce Momjian 8133867f51 update pginterface 1998-09-11 05:18:12 +00:00
Bruce Momjian a5d4642578 Update pginterface for 6.4. add manual page. 1998-09-11 05:14:08 +00:00
Marc G. Fournier 7f3630e270 sequence contrib directory removed, as already integrated into the main
backend...
1998-08-30 19:39:01 +00:00
Marc G. Fournier eec4c7366f From: Massimo Dal Zotto <dz@cs.unitn.it>
Here is a tar file the new directories, which substitute the old ones
in contrib. Please remove the old directories array, datetime, miscutil,
string and userlock before unpacking the tar file in contrib.

Note that as the modules are now installed in lib/modules I install all
my sql code in lib/sql. In my opinion also the other contributors should
follow these rules.
1998-08-30 19:37:51 +00:00
Bruce Momjian 0c5e541a9a move plpgsql to src/pl for Jan. 1998-08-24 19:14:51 +00:00
Bruce Momjian 985f4ab98a fulltext copy script. 1998-08-22 12:54:58 +00:00
Bruce Momjian 863a62064c As proposed, here is the current version of PL/pgSQL. The
test isn't that complete up to now,  but  I  think  it  shows
    enough of the capabilities of the module.

    The  Makefile  assumes  it  is  located  in a directory under
    pgsql/src/pl.   Since   it   includes   Makefile.global   and
    Makefile.port  and doesn't use any own compiler/linker calls,
    it should build on most of our supported  platforms  (I  only
    tested  under Linux up to now).  It requires flex and bison I
    think. Maybe we should ship prepared gram.c etc. like for the
    main parser too?


Jan
1998-08-22 12:38:39 +00:00
Marc G. Fournier 3fa676a74c From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Here is some more contrib-fodder, based on TIH's IP address type,
for ISBN and ISSN identifiers (which I just happened to need to keep
track of the things in my library).
1998-08-17 03:35:05 +00:00
Bruce Momjian 79c8d2e3a0 Change owner from oid to int4 type. 1998-08-11 18:28:49 +00:00
Bruce Momjian 22cc0e1645 Remove NOBTREE defines, and make findoidlinks handle regproc. 1998-08-11 05:32:46 +00:00
Bruce Momjian 85c165cd4c New findoidjoins examines oid columns to find join relationships. 1998-08-11 02:32:00 +00:00
Bruce Momjian 60baf183b3 Add contributor name to fulltextindex, and clean up contrib/README. 1998-07-20 09:30:13 +00:00
Bruce Momjian 0de96f82dc Update fti README and stopwords. 1998-07-20 02:45:03 +00:00
Bruce Momjian 39282daa12 Update list of contrib directories. 1998-07-20 02:31:10 +00:00
Bruce Momjian 8f0ca623ff I finally got the time to put together some stuff for fti for
inclusion in pgsql. I have included a README which should be enough
to start using it, plus a BENCH file that describes some timings
I have done.

Please have a look at it, and if you think everything is OK, I
would like it seen included in the contrib-section of pgsql.

I don't think I will do any more work in this, but maybe it inspires
somebody else to improve on it.

Maarten Boekhold
1998-07-19 18:26:41 +00:00