Tom Lane [Fri, 26 Mar 1999 07:32:42 +0000 (07:32 +0000)]
Remove a bunch of dead entries exposed by findoidjoins crosschecks.
Apparently, whatever these things used to link to got recycled into
something else ... but the dependent entries didn't.
Bruce Momjian [Mon, 22 Mar 1999 16:45:30 +0000 (16:45 +0000)]
Hi,
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".
Tom Lane [Sun, 21 Mar 1999 01:07:07 +0000 (01:07 +0000)]
Hmm, it seems some versions of flex declare yytext as extern char[]
but others declare it as extern char *. gcc complains (quite rightly too).
Worked around it by rearranging the order of inclusions so that we don't
have to explicitly declare yytext; this should work with either variant.
Bruce Momjian [Fri, 19 Mar 1999 18:56:43 +0000 (18:56 +0000)]
I suggest the following portability patch, which does not
change functionality, but makes the code more ANSI C'ish.
My AIX xlc compiler barfs on all of these. Can someone please
review and apply to current.
Bruce Momjian [Tue, 16 Mar 1999 03:02:55 +0000 (03:02 +0000)]
Hmmm. It had to do with tcl/tk on FreeBSD. The configure scripts are
in
different directories. The patch gave the option of specifying a dir
for
the tk script and if they were both in the same directory then it didn't
mind being empty. It's small so I'm including it. It was tested with
autoconf 2.12.
Bruce Momjian [Mon, 15 Mar 1999 02:18:37 +0000 (02:18 +0000)]
> > > This patches src/bin/psql/psql.c.
> > >
> > > This patch is in responce to the following TODO list item:
> > > * have psql \d on a view show the query
> > > -Ryan
Bruce Momjian [Mon, 15 Mar 1999 00:34:53 +0000 (00:34 +0000)]
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.
Bruce Momjian [Sun, 14 Mar 1999 16:46:21 +0000 (16:46 +0000)]
This is another example of why not allowing utility functions in SPI
would be a Bad Thing.
For what it's worth, I found another case in libpq where you can get a T
message without a D that my utility patch needs to handle. I have
attached
the updated patch against the 6.4.2 version of
src/interfaces/libpq/fe-exec.c
Bruce Momjian [Sun, 14 Mar 1999 16:44:02 +0000 (16:44 +0000)]
Attempting to insert a value of 'now' into a datetime type
results in a bogus datetime value under AlphaLinux. (Note that
the link to submit a port-specific bug on your website is broken)
Solution:
---------
The basic problem is the typedefs of AbsoluteTime and RelativeTime,
which are both 'int32'. These types appear to be used synonymously
with the 'time_t' type, which on AlphaLinux is typedef'd as a 'long
int', which is 64-bits (not 32). The solution included here fixes
the datetime type (it now passes the regression test), but does not
pass the absolute and relative time regression tests. Presumably, a
more thorough investigation of how these types are used is warranted.
The included patch is from the v6.3.2 source, but can be applied to
the v6.4.2 source. Please note that there is also a RedHat-specific
patch distributed with the PostgreSQL source package from RedHat
that was applied first.
Bruce Momjian [Sun, 14 Mar 1999 16:42:15 +0000 (16:42 +0000)]
Hi,
Just in case you'd like to see what I was talking about, I am
attaching
my patch to src/interfaces/libpq/fe-exec.c to prevent utility functions
called from SPI from locking up the client.
Bruce Momjian [Sun, 14 Mar 1999 16:06:43 +0000 (16:06 +0000)]
I've been having also sorts of fun trying to get kerberos 4
authentifica
tion
working with postgresql-6.4.2 and KTH-KRB Ebones
(http://www.pdc.kth.se/kth-kr
b) on a dec alpha running DU 4.0D using the native compiler. The
following
patch does the trick.
The rationale behind this is as follows. The KTH-KRB code header files
defines
lots of lengths like INST_SZ,REALM_SZ and KRB_SENDAUTH_VLEN. It also has
a
habit of doing things like
chararray[LENGTH] = '\0'
to ensure null terminated strings. In my instance this just happens to
blat
the kerberos principal instance string leading to error like
The application code that comes with KTH-KRB uses "KRB_SENDAUTH_VLEN +
1" and
sometimes uses "INST_SZ + 1" so it seems safest to put that 1 char
buffer in
the appropriate place.
Bruce Momjian [Sun, 14 Mar 1999 16:03:33 +0000 (16:03 +0000)]
We have tested the patches on three platforms:
NetBSD/macppc
LinuxPPC
FreeBSD 2.2.6-RELEASE
All of them seem happy with the regression test. Note that, however,
compiling with optimization enabled on NetBSD/macppc causes an initdb
failure (other two platforms are ok). After checking the asm code, we
are suspecting that might be a compiler(egcs) bug.
Bruce Momjian [Sun, 14 Mar 1999 16:00:55 +0000 (16:00 +0000)]
This patch improves the destroyuser script's behaviour in checking whether
the user is allowed to detroy users. It also allows for a possible incorrect
empty reply to a yes/no question.
Bruce Momjian [Sun, 14 Mar 1999 15:22:15 +0000 (15:22 +0000)]
Fixup for src/tutorial/func.c and src/tutorial/func.source
Removed char16 and replaced with an example using Point
as suggested by Tom Lane. The dept field was changed to
the cubicle field denoting the row(x) and column(y) of
the employee's cube in the corporate jungle. The C function
builds a 'compromise' cubicle from two suggested ones.
Bruce Momjian [Sun, 14 Mar 1999 05:15:08 +0000 (05:15 +0000)]
I have a problem with Access97 not working properly when entering new
records using a sub form, i.e. entering a new order/orderlines or master
and
detail tables. The problem is caused by a SQL statement that Access97
makes
involving NULL. The syntax that fails is "column_name" = NULL. The
following attachment was provided by -Jose'-. It contains a very small
enhancement to gram.y that will allow Access97 to work properly with sub
forms. Can this enhancement be added to release 6.5?