summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2002-09-12> Sean Chittenden <sean@chittenden.org> writes:Bruce Momjian
> >>::sigh:: Is it me or does it look like all >>of pl/pgsql is schema un-aware (ie, all of the declarations). -sc > > > Yeah. The group of routines parse_word, parse_dblword, etc that are > called by the lexer certainly all need work. There are some > definitional issues to think about, too --- plpgsql presently relies on > the number of names to give it some idea of what to look for, and those > rules are probably all toast now. Please come up with a sketch of what > you think the behavior should be before you start hacking code. Attached is a diff -c format proposal to fix this. I've also attached a short test script. Seems to work OK and passes all regression tests. Here's a breakdown of how I understand plpgsql's "Special word rules" -- I think it illustrates the behavior reasonably well. New functions added by this patch are plpgsql_parse_tripwordtype and plpgsql_parse_dblwordrowtype: Joe Conway
2002-09-12Joe Conway wrote:Bruce Momjian
> Hannu Krosing wrote: > >> It seems that my last mail on this did not get through to the list >> ;( >> >> Please consider renaming the new builtin function >> split(text,text,int) >> >> to something else, perhaps >> >> split_part(text,text,int) >> >> (like date_part) >> >> The reason for this request is that 3 most popular scripting >> languages (perl, python, php) all have also a function with similar >> signature, but returning an array instead of single element and the >> (optional) third argument is limit (maximum number of splits to >> perform) >> >> I think that it would be good to have similar function in (some >> future release of) postgres, but if we now let in a function with >> same name and arguments but returning a single string instead an >> array of them, then we will need to invent a new and not so easy to >> recognise name for the "real" split function. >> > > This is a good point, and I'm not opposed to changing the name, but > it is too bad your original email didn't get through before beta1 was > rolled. The change would now require an initdb, which I know we were > trying to avoid once beta started (although we could change it > without *requiring* an initdb I suppose). > > I guess if we do end up needing an initdb for other reasons, we > should make this change too. Any other opinions? Is split_part an > acceptable name? > > Also, if we add a todo to produce a "real" split function that > returns an array, similar to those languages, I'll take it for 7.4. No one commented on the choice of name, so the attached patch changes the name of split(text,text,int) to split_part(text,text,int) per Hannu's recommendation above. This can be applied without an initdb if current beta testers are advised to run: update pg_proc set proname = 'split_part' where proname = 'split'; in the case they want to use this function. Regression and doc fix is also included in the patch. Joe Conway
2002-09-12> BTW, clusterdb is not schema-aware and will surely fail in any databaseBruce Momjian
> where more than one schema is in use, because it doesn't trouble to > schema-qualify table names. Ok, the following patch should solve this concern. It also tries to connect as little times as possible (the previous one would connect one time per table plus one per database; this one connects two times per database). Alvaro Herrera
2002-09-11Add sprompt.obj to Win32 makefiles.Bruce Momjian
2002-09-11Add comment about sharing of sprompt.c file.Bruce Momjian
2002-09-11Tweak querytree-dependency-extraction code so that columns of tablesTom Lane
that are explicitly JOINed are not considered dependencies unless they are actually used in the query: mere presence in the joinaliasvars list of a JOIN RTE doesn't count as being used. The patch touches a number of files because I needed to generalize the API of query_tree_walker to support an additional flag bit, but the changes are otherwise quite small.
2002-09-11Patches submitted by Kris Jurka (jurka@ejurka.com) for the following bugs:Barry Lind
- Properly drop tables in jdbc regression tests with cascade for 7.3 - problem with Statement.execute() and executeUpdate() not clearing binds - problem with ResultSet not correctly handling default encoding - changes to correctly support show transaction isolation level in 7.3 - changed DatabaseMetaDataTest to handle differences in FK names in 7.3 - better fix for dynamically checking server NAME data length (With the fixes above the jdbc regression tests pass on jdbc2 and jdbc3 against both a 7.2 and 7.3 server) Patchs submitted by David Wall (d.wall@computer.org): - problem with getBlob when largeobject oid is null - improvements to BlobOutputStream Patch submitted by Haris Peco (snpe@snpe.co.yu): - problem with callable statement not supporting prepared statement methods Modified Files: jdbc/org/postgresql/Driver.java.in jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java jdbc/org/postgresql/largeobject/BlobOutputStream.java jdbc/org/postgresql/largeobject/LargeObject.java jdbc/org/postgresql/test/TestUtil.java jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java jdbc/org/postgresql/test/jdbc2/UpdateableResultTest.java jdbc/org/postgresql/test/jdbc2/optional/BaseDataSourceTest.java jdbc/org/postgresql/test/jdbc2/optional/ConnectionPoolTest.java jdbc/org/postgresql/test/jdbc2/optional/SimpleDataSourceTest.java
2002-09-10Fix portability problem (size_t != int).Tom Lane
2002-09-10Powerup defaults for LC_foo GUC variables should match what main.c does.Tom Lane
2002-09-09Use different sed separator for configure arguments.Peter Eisentraut
2002-09-08Fixed DatabaseMetaData to correctly handle NAME size of 64Barry Lind
Fixed Statement to correctly DEALLOCATE any prepared statements Modified Files: jdbc/org/postgresql/PGStatement.java jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2002-09-07Changes to documentation and the regression tests for the defaultBruce Momjian
NAMEDATALEN of 64. Kris Jurka
2002-09-07Allow pg_dumpall to work with previous releases again. Don't pass the -cPeter Eisentraut
option down to pg_dump, where it's useless, and clarify the meaning of -c in the documentation.
2002-09-07Fix help output.Peter Eisentraut
2002-09-06Make sure the pg_dump tar archiver can handle members larger than 2 GB, butPeter Eisentraut
does not create members larger than allowed by the tar format. Also, fix the generation of the tar header to conform to POSIX.
2002-09-06Run pgjindent for Java folks.Bruce Momjian
2002-09-06Fix printf() quote handling and improper exit(), per Tom.Bruce Momjian
2002-09-06Remove heap_mark4update from AlterTableCreateToastTable. This hasTom Lane
never been the correct procedure for locking a relation, and the recently-found ALTER TABLE bug with adding a constraint and a toast table in the same command shows why it's a bad idea.
2002-09-05Fix some operator-precedence problems. New constructs IS DISTINCT FRMTom Lane
and IS [NOT] OF were not being parsed consistently with other IS forms. Also, make the world a little safer for functions named LEFT, RIGHT, etc.
2002-09-05Fix compile error.Bruce Momjian
2002-09-05Remove PGPASSWORDFILE and default to always trying $HOME/.pgpass.Bruce Momjian
Cleanup up memory allocation for $HOME in related psql places. Update mention of $HOME/.pgpass in the docs; add mention in pg_dumpall.
2002-09-05Improve opr_sanity regression test to check oprltcmpop and opgtcmpopTom Lane
mergejoin links.
2002-09-05Update oidjoins regression test for 7.3 catalogs.Tom Lane
2002-09-05Seems like a good idea for template1 to contain ANALYZE stats for theTom Lane
system tables.
2002-09-05Assorted fixes for Cygwin:Peter Eisentraut
Eliminate the mysterious games that the Cygwin build plays with the linker flag variables. DLLLIBS is gone, use SHLIB_LINK like everyone else. Detect cygipc in configure, after the linker flags are set up, otherwise configure might not work at all. Make sure everything is covered by make clean. Fix the build of the new conversion procedure modules. Add new DLLIMPORT markers where required. Finally, the compiler complains if we use an explicit -I/usr/local/include, so don't do that. Curiously, -L/usr/local/lib is still necessary.
2002-09-05Don't use gethostbyname2(). It's not portable and we don't claim toPeter Eisentraut
support IPv6 anyway.
2002-09-05Fix compilation warning. (Cygwin has char* as second argument ofPeter Eisentraut
recvfrom(), not void*.)
2002-09-05Be careful to include postgres.h *before* any system headers, to ensureTom Lane
that the right flavors of largefile-related definitions are seen. Most of these changes are probably unnecessary, but better safe than sorry.
2002-09-04Guard against send-lots-and-lots-of-data DoS attack from unauthenticatedTom Lane
users, by limiting the length of string we will accept for a password. Patch by Serguei Mokhov, some editorializing by Tom Lane.
2002-09-04Remove leftovers from subproject removals. Fixes for Python and KerberosPeter Eisentraut
configuration.
2002-09-04Fix compile warning.Peter Eisentraut
2002-09-04Fix includes for plperl: ensure postgres.h is included first,Tom Lane
remove unnecessary inclusions.
2002-09-04pgindent run.Bruce Momjian
2002-09-04Update symbols for 7.3.Bruce Momjian
2002-09-04Update for 7.3 typedefs.Bruce Momjian
2002-09-04Update to reflect Tom's suggestions.Bruce Momjian
2002-09-04Remove sh -x option that snuck in somehow.Peter Eisentraut
2002-09-04Avoid multiple scans of utils/mb/conversion_procs/ subdirectories duringTom Lane
'make install'; there are enough of 'em that this slowed down the make noticeably. Ensure that 'all' is the default make target in all these directories (defaulting to 'make install' is surprising and dangerous IMHO). Fix a couple small typos.
2002-09-04File list cleanup.Bruce Momjian
2002-09-04Update files to be changed.Bruce Momjian
2002-09-04Brand 7.3. Ready for beta!Bruce Momjian
2002-09-04Refrect the changes to src/test/regress/sql/conversion.sql By Tom.Tatsuo Ishii
2002-09-03EXTRACT(EPOCH FROM timestamp) gave wrong answers in the int64-timestampTom Lane
case for timestamptz input, and differently wrong answers in the float- timestamp case for timestamp input.
2002-09-03Arrange for the default permissions on a database to allow temp tableTom Lane
creation to world, but disallow temp table creation in template1. Per latest round of pghackers discussion. I did not force initdb, but the permissions lockdown on template1 will not take effect unless you do one (or manually REVOKE TEMP ON DATABASE template1 FROM public).
2002-09-03conversion test fails if there is an existing user named foo. Choose a nameTom Lane
somewhat less likely to provoke a conflict.
2002-09-03Remove all traces of multibyte and locale options. Clean up commentsPeter Eisentraut
referring to "multibyte" where it really means character encoding.
2002-09-03Work around mktime() brain damage in recent versions of glibc by usingTom Lane
a series of localtime() calls to determine the local timezone offset when mktime() fails. This eliminates regression failures on RHL 7.3, and should continue to work until it occurs to the glibc boys to break localtime() as well. By then I hope we'll have our own timezone code...
2002-09-03Eliminate unnecessary dependency on mktime(), and consequent 'Unable toTom Lane
convert date to tm' failures, by using DetermineLocalTimeZone() instead.
2002-09-03Workaround for format strings that are concatenated from macrosPeter Eisentraut
(INT64_FORMAT), which gettext cannot handle.
2002-09-03AIX shlib fix for building libpq.so from Tomoyuki NiijimaBruce Momjian