[BUGS] BUG #6080: information_schema.columns.column_default contains NULL inconsistently
The following bug has been logged online: Bug reference: 6080 Logged by: Chris Bandy Email address: bandy.ch...@gmail.com PostgreSQL version: 9.0.3 Operating system: Gentoo Description:information_schema.columns.column_default contains NULL inconsistently Details: While using the information_schema to examine my tables, I found that "columns"."column_default" does not consistently represent the DEFAULT constraint/definition of a column. I would expect a column without a DEFAULT definition to return a null value, while a column with a DEFAULT definition would return the defined expression as a character value. In the following log, columns "a", "b" and "c" appear identical though their definitions differ. -- Chris $ psql -P null='' testing psql (9.0.3) Type "help" for help. testing=> select version(); version --- PostgreSQL 9.0.3 on x86_64-pc-linux-gnu, compiled by GCC x86_64-pc-linux-gnu-gcc (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5, 64-bit (1 row) testing=> create table tt (a varchar, b varchar default null, c varchar default null::varchar, d varchar(1) default null, e varchar(1) default null::varchar); CREATE TABLE testing=> \d tt Table "public.tt" Column | Type |Modifiers +--+- a | character varying| b | character varying| c | character varying| d | character varying(1) | default NULL::character varying e | character varying(1) | default NULL::character varying testing=> select column_name, data_type, column_default from information_schema.columns where table_name = 'tt'; column_name | data_type | column_default -+---+- a | character varying | b | character varying | c | character varying | d | character varying | NULL::character varying e | character varying | NULL::character varying (5 rows) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #6079: Wrong select result
> 2011/6/28 Renat : >> >> create table foo ( >> id bigint not null, >> date_to timestamp without time zone, >> CONSTRAINT foo_pkey PRIMARY KEY (id) >> ); >> >> CREATE INDEX foo_date_to_index >> ON foo >> USING btree >> (date_to) >> >> insert into foo (id, date_to) values (1, now()); >> insert into foo (id, date_to) values (2, NULL); >> >> select * from foo where date_to is null and date_to > '2011-01-01' >> >> Expected: 0 rows >> >> But: it return 1 row with id=2 >> I get the same error on HEAD too. An even simpler test case is this: create table foo(a int); create index foo_a_idx on foo(a); insert into foo values (10),(NULL); select 1 from foo where a is null and a > 1; ?column? -- 1 (1 row) The problem seems to be in _bt_preprocess_keys(), which discards the "a > 1" predicate in favour of the "a is null" predicate on the grounds that "null > 1" in a nulls-last index. It looks like a previous revision had the right check, based on the logic that x IS NULL is incompatible with any other predicate. Regards, Dean nbtutils.patch Description: Binary data -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] Ident authentication fails due to bind error on server (8.4.8)
On Sat, 18 Jun 2011 04:55:59 +0200, Marinos Yannikos wrote: sysctl -w net.ipv4.tcp_tw_reuse=1 This fixed the issue apparently, so bind() seems to choose ports in TIME_WAIT state for some reason with sin_port=0 and that caused it. Regards, Marinos -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #6078: borrar usuario
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Jun 26, 2011 at 05:27:47AM +, jose javier cabrera centeno wrote: > > The following bug has been logged online: > > Bug reference: 6078 > Logged by: jose javier cabrera centeno Ésto no es un bug de PostgreSQL. Por eso te sugiero que te dirijas a , donde encontrarás ayuda en castellano. Saludos - -- tomás -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFOCirsBcgs9XrR2kYRAukZAJ93i0b1oSrr6GaxSdoA19oztRbTggCeMsSB lieE3TqINm+RLujHsstRWIE= =8ev4 -END PGP SIGNATURE- -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #6079: Wrong select result
Hello It working as expected on 9.0.4 Linux. Please, can you recheck your application? Try to use a console - psql, postgres=# select * from foo where date_to is null and date_to > '2011-01-01'; id | date_to +- (0 rows) Regards Pavel Stehule 2011/6/28 Renat : > > The following bug has been logged online: > > Bug reference: 6079 > Logged by: Renat > Email address: renat.nasy...@itv.ru > PostgreSQL version: 9.0.4 > Operating system: Windows > Description: Wrong select result > Details: > > INPUT: > > create table foo ( > id bigint not null, > date_to timestamp without time zone, > CONSTRAINT foo_pkey PRIMARY KEY (id) > ); > > CREATE INDEX foo_date_to_index > ON foo > USING btree > (date_to) > > insert into foo (id, date_to) values (1, now()); > insert into foo (id, date_to) values (2, NULL); > > select * from foo where date_to is null and date_to > '2011-01-01' > > Expected: 0 rows > > But: it return 1 row with id=2 > > If we will replace foo_date_to_index to: > > CREATE INDEX foo_date_to_index > ON foo > USING btree > (date_to) > WHERE date_to is NOT NULL > > Then: > > SELECT * FROM foo where date_to is null and date_to > '2011-01-01' > > Return: 0 rows > > Please explain for me what happens? > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs > -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6079: Wrong select result
The following bug has been logged online: Bug reference: 6079 Logged by: Renat Email address: renat.nasy...@itv.ru PostgreSQL version: 9.0.4 Operating system: Windows Description:Wrong select result Details: INPUT: create table foo ( id bigint not null, date_to timestamp without time zone, CONSTRAINT foo_pkey PRIMARY KEY (id) ); CREATE INDEX foo_date_to_index ON foo USING btree (date_to) insert into foo (id, date_to) values (1, now()); insert into foo (id, date_to) values (2, NULL); select * from foo where date_to is null and date_to > '2011-01-01' Expected: 0 rows But: it return 1 row with id=2 If we will replace foo_date_to_index to: CREATE INDEX foo_date_to_index ON foo USING btree (date_to) WHERE date_to is NOT NULL Then: SELECT * FROM foo where date_to is null and date_to > '2011-01-01' Return: 0 rows Please explain for me what happens? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs