such as bpchar(char_expression, N), and pull out the attrtypmod that
the function is coercing to. This allows correct deduction of the
column type in examples such as
CREATE VIEW v AS SELECT f1::char(8) FROM tbl;
Formerly we labeled v's column as char-of-unknown-length not char(8).
Also, this change causes the parser not to insert a redundant length
coercion function if the user has explicitly casted an INSERT or UPDATE
expression to the right length.
fields, nor with bpchar and varchar fields that have typmod -1. The
latter effectively have an unspecified length, so I made them display
as char() and varchar() rather than falsely equating them to char(1)
and varchar(1).
it's a good idea to choose the directory size based on the expected
number of entries. But ShmemInitHash was using a hard-wired constant.
Boo hiss. This accounts for recent report of postmaster failure when
asking for 64K or more buffers.
platform (psql and libpq):
The file "config.h.win32" in the include\ directory (from my patch from
2000-01-18) is missing from the tree. It needs to be put back :-)
The following patch has to be applied in the interfaces\libpq directory.
//Magnus
thinks the connection is idle, the error message is displayed as if
it were a NOTICE. This seems better than dropping the message on
the floor ... particularly if the message is the backend telling us
why it's about to close the connection. The previous behavior was
Backend message type 0x45 arrived while idle
pqReadData() -- backend closed the channel unexpectedly.
which is not real helpful.
as a unary minus operator for numeric. Now that long numeric constants
will get converted to NUMERIC in early parsing, it's essential to have
numeric->int8 conversion to avoid 'can't convert' errors on undecorated
int8 constants. Threw in the rest for completeness while I was in the
area.
I did not force an initdb for this, since the system will still run
without the new pg_proc/pg_operator entries. Possibly I should've.
and produce either FLOAT8 or NUMERIC output depending on whether the
value fits in a float8 or not. This is almost back to the way the
code was before I changed T_Float, but there is a critical difference:
now, when a numeric constant doesn't fit in float8, it will be treated
as type NUMERIC instead of type UNKNOWN.
2. Regression tests fail for types int2 and int4 (which can easily be
fixed by adding entries to resultmap) aswell as float8 and geometry,
where floating point numbers appear to be rounded a little differently
than in your expected results (besides that I also need the positive
zeros file). I'm including a patch for the first 2, but I don't know
whether the latter two are actually a bug in postgres or a bug in the
OS or even allowed difference. I'm including my results for reference.
Rolf Grossmann
tests for the Foreign Key support in 7.0 which
was made against a CVS copy from this
afternoon.
This modifies
src/test/regress/sql/run_check.tests
src/test/regress/sql/alter_table.sql
src/test/regress/expected/alter_table.out
src/test/regress/sql/foreign_key.sql
src/test/regress/expected/foreign_key.out
sszabo@bigpanda.co
integers) to be strings instead of 'double'. We convert from string form
to internal representation only after type resolution has determined the
correct type for the constant. This eliminates loss-of-precision worries
and gets rid of the change in behavior seen at 17 digits with the
previous kluge.
portion of the query result that will be retrieved. As far as I could
tell, the consensus was that we should let the planner do the best it
can with a LIMIT query, and require the user to add ORDER BY if he
wants consistent results from different LIMIT values.
as representing a type coercion request in more cases than we did before.
It will work now whenever no underlying function is required, ie if the
coercion is binary-compatible or if the argument is a previously untyped
string constant. Otherwise, you still need a real function to exist.
represent the result of a binary-compatible type coercion. At runtime
it just evaluates its argument --- but during type resolution, exprType
will pick up the output type of the RelabelType node instead of the type
of the argument. This solves some longstanding problems with dropped
type coercions, an example being 'select now()::abstime::int4' which
used to produce date-formatted output, not an integer, because the
coercion to int4 was dropped on the floor.
agg_select_candidate, which could cause them to keep more candidates
than they should and thus fail to select a single match. I had
previously fixed the identical bug in oper_select_candidate, but
didn't realize that the same error was repeated over here.
Also, repair func_select_candidate's curious notion that it could
scribble on the input type-OID vector. That was causing failure to
apply necessary type coercion later on, leading to malfunction of
examples such as select date('now').