Marc G. Fournier
8adc838ff6
Various cleanups for the i386_solaris environment
1998-01-13 19:28:39 +00:00
Marc G. Fournier
374bb5d261
Some *very* major changes by darrenk@insightdist.com (Darren King)
...
==========================================
What follows is a set of diffs that cleans up the usage of BLCKSZ.
As a side effect, the person compiling the code can change the
value of BLCKSZ _at_their_own_risk_. By that, I mean that I've
tried it here at 4096 and 16384 with no ill-effects. A value
of 4096 _shouldn't_ affect much as far as the kernel/file system
goes, but making it bigger than 8192 can have severe consequences
if you don't know what you're doing. 16394 worked for me, _BUT_
when I went to 32768 and did an initdb, the SCSI driver broke and
the partition that I was running under went to hell in a hand
basket. Had to reboot and do a good bit of fsck'ing to fix things up.
The patch can be safely applied though. Just leave BLCKSZ = 8192
and everything is as before. It basically only cleans up all of the
references to BLCKSZ in the code.
If this patch is applied, a comment in the config.h file though above
the BLCKSZ define with warning about monkeying around with it would
be a good idea.
Darren darrenk@insightdist.com
(Also cleans up some of the #includes in files referencing BLCKSZ.)
==========================================
1998-01-13 04:05:12 +00:00
Marc G. Fournier
f0445dcbc4
> It seems there is a mistake in substr function:
...
> then you try get substr, which consists only of last char in string
> you get all string
>
> For example:
> userbase=> select substr('123456', 6,1) ;
> substr
> ------
> 123456
> (1 row)
>
From Edmund Mergl <E.Mergl@bawue.de >
1998-01-13 03:49:51 +00:00
Bruce Momjian
8f125413b0
Cleanup of varchar.
1998-01-08 06:18:18 +00:00
Bruce Momjian
84ef6aae18
Re-install working varchar() with compress size.
1998-01-08 04:58:19 +00:00
Bruce Momjian
5fe090c559
Completion of varchar rollback.
1998-01-08 04:19:16 +00:00
Bruce Momjian
35be73027e
Cleanup of varchar.
1998-01-08 03:15:06 +00:00
Bruce Momjian
c098f309e3
Rollback varchar size change.
1998-01-08 03:05:01 +00:00
Bruce Momjian
1c9fcfb683
Fix for varchar I missed.
1998-01-07 22:08:23 +00:00
Bruce Momjian
e6c6146eb8
Allow varchar() to only store needed bytes. Remove PALLOC,PALLOCTYPE,PFREE. Clean up use of VARDATA.
1998-01-07 18:47:07 +00:00
Bruce Momjian
deea69b90e
Change some ABORTS to ERROR. Add line number when COPY Failure.
1998-01-05 16:40:20 +00:00
Bruce Momjian
0d9fc5afd6
Change elog(WARN) to elog(ERROR) and elog(ABORT).
1998-01-05 03:35:55 +00:00
Thomas G. Lockhart
37f17d39c1
Define text_substr().
...
Change declarations from "struct varlena *" to "text *".
Remove register variables since compiler should do better on its own.
1998-01-01 05:50:50 +00:00
Bruce Momjian
a544b605e2
Change some mallocs to palloc.
1997-12-29 05:13:57 +00:00
Thomas G. Lockhart
ca23837ade
Fix format to produce actual German style. Affects new "GERMAN" feature only.
1997-12-23 19:26:31 +00:00
Thomas G. Lockhart
ed14f88512
Change logic slightly to avoid one unnecessary calculation. No big deal.
1997-12-23 19:24:43 +00:00
Thomas G. Lockhart
c06331a47d
Change a few routine names back to full length now that pg_proc allows
...
names over 16 characters. datet_datetime() -> datetime_datetime(), etc.
1997-12-23 19:23:09 +00:00
Marc G. Fournier
6e337eef45
Major cleanout of PORTNAME variables from Makefiles...bound to screw up
...
some of the ports...
1997-12-20 00:29:35 +00:00
Marc G. Fournier
10ff1eea60
First clean compile without a "PORTNAME" variable being set...
1997-12-20 00:11:13 +00:00
Marc G. Fournier
5379b84eff
More cleanups. I can now compile without PORTNAME being defined n
...
Makefile.global.
End result, if all goes well, should allow for much easier porting, since
there will no longer be a concept of a "port". Most, if not everything,
*should* be determined by configure, or by the compiler itself. Still
work to be done though :)
1997-12-19 02:09:10 +00:00
Thomas G. Lockhart
d451a3b3bc
Enable timespan_finite() and text_timespan() routines (was commented out).
...
Define an "ISO-style" timespan output format with "hh:mm:ss" fields.
Enabled by DateStyle = USE_ISO_DATES.
1997-12-17 23:22:17 +00:00
Thomas G. Lockhart
6316f4d3db
Define text, varchar, and bpchar string length functions.
1997-12-16 15:59:11 +00:00
Bruce Momjian
53026db75e
More VARHDRSZ additions.
1997-12-08 04:42:48 +00:00
Bruce Momjian
a68a132a6c
Add VARHDRSZ where needed. Many places just used 4.
1997-12-06 22:57:36 +00:00
Thomas G. Lockhart
352b36877f
Add 'GERMAN' style to date/time output.
...
Probably have it wrong (dd.mm/yyyy) but can change it when we know.
Input routines always handled it.
1997-12-04 23:30:52 +00:00
Bruce Momjian
f7f2e18f8e
Remove tqual.h includes not needed.
1997-11-24 05:09:50 +00:00
Bruce Momjian
1409819a87
Fix for textcat on varchar() fields.
1997-11-23 21:39:12 +00:00
Bruce Momjian
e9e1ff226f
Remove all time travel stuff. Small parser cleanup.
1997-11-20 23:24:03 +00:00
Thomas G. Lockhart
2fa330284c
Use limits.h for INT, SHRT, and SCHAR min and max values rather than
...
hardcoded values.
1997-11-17 16:26:27 +00:00
Thomas G. Lockhart
174f984b76
Use SHRT_MIN and SHRT_MAX for 2-byte integer limits.
1997-11-17 16:24:17 +00:00
Thomas G. Lockhart
e7946a53ad
Allow fractional values for delta times (e.g. '2.5 days').
...
Check valid numeric input more carefully for delta times.
Implement day of year as possible input to datetime_part().
1997-11-17 16:23:33 +00:00
Bruce Momjian
4e9df155f0
Add new \df psql option and oid8types() function.
1997-11-15 16:32:25 +00:00
Thomas G. Lockhart
c934ee7859
Change phrasing of input error message.
...
Add istrue() and isfalse() routines to implement SQL3 IS TRUE and IS FALSE.
1997-11-07 06:30:20 +00:00
Vadim B. Mikheev
32cd09ac6d
Good Bye, Time Travel!
1997-11-02 15:27:14 +00:00
Bruce Momjian
6cc0a00dec
Fix acl error, and remove duplicate pqtrace.
1997-11-01 05:21:57 +00:00
Thomas G. Lockhart
cc1b420cfd
Add routines istrue() and isfalse() to directly evaluate boolean type.
1997-10-30 16:45:12 +00:00
Bruce Momjian
06d88ecb17
Fix for when POSIX time not defined.
1997-10-30 14:06:47 +00:00
Thomas G. Lockhart
4fa25b8c99
Shorten routine names to <= 16 characters to fit in pg_proc table.
1997-10-25 05:22:58 +00:00
Thomas G. Lockhart
c0087c9faf
Add conversion routines for oid to and from text.
1997-10-25 05:21:54 +00:00
Thomas G. Lockhart
08b1a09ee0
Clean up comments.
1997-10-25 05:21:10 +00:00
Thomas G. Lockhart
317acd0818
Add conversions for int2 and int4 to and from text.
1997-10-25 05:19:22 +00:00
Thomas G. Lockhart
2c1557a2ff
Fix occasional uninitialized variable fractional seconds
...
in DecodeTimeOnly(). Only present when seconds are not specified
for input.
1997-10-25 05:18:17 +00:00
Thomas G. Lockhart
9f99e4c6b6
Add conversion from datetime to time data type.
...
Rename date+time conversion to datetime to ensure less than 16 characters
in routine name (required to fit in pg_proc table).
1997-10-25 05:16:09 +00:00
Thomas G. Lockhart
0d6facbad6
Modify one last line to complete changes for StrNCpy() macro addition.
...
Before, char16 was missing last character for output.
1997-10-25 05:12:38 +00:00
Thomas G. Lockhart
4677f0a255
Add debugging statement enabled by CASHDEBUG symbol definition.
1997-10-25 05:11:06 +00:00
Thomas G. Lockhart
3eb1bc67b1
Check explicitly for valid input strings for both TRUE and FALSE.
...
Allow true/false, yes/no, 1/0. Throw elog warning if anything else.
Allow shorter strings, so "t", "tr", "tru" and "true" match "true".
Old behavior accepted anything starting with "t" as TRUE,
everything else as FALSE.
1997-10-25 05:09:58 +00:00
Bruce Momjian
f3af1368bd
Rename strNcpy to StrNCpy, and change third parameter.
1997-10-25 01:10:58 +00:00
Thomas G. Lockhart
962c8bd66d
Accept additional values for TRUE: y, Y, 1.
...
Leave all other input values to return FALSE.
In next version, do more checking for valid inputs for both TRUE and FALSE.
1997-10-17 05:38:32 +00:00
Thomas G. Lockhart
9c800b8e48
Fix delta time decoding for 12 AM/PM.
1997-10-17 05:36:01 +00:00
Thomas G. Lockhart
a21c3e353a
Allow 't', 'T', and even/odd ASCII characters to denote true/false
...
rather than just 't' and 'T'. This allows yes/no and 1/0
to be interpreted as one might expect.
Clean up function declarations to use bool as the type for arguments
and return values.
1997-10-09 05:06:12 +00:00