Re: How to use record variable with non-null domain in plpgsql
От
Andrus
Тема
Re: How to use record variable with non-null domain in plpgsql
Дата
Msg-id
4615C04672CE45D4971088CC35984D04@dell2
Ответ на
Список
Дерево обсуждения
Converting char to varchar automatically "Andrus" <kobruleht2@hot.ee>
Re: Converting char to varchar automatically Andy Colson <andy@squeakycode.net>
How to use record variable with non-null domain in plpgsql "Andrus" <kobruleht2@hot.ee>
Re: How to use record variable with non-null domain in plpgsql Tom Lane <tgl@sss.pgh.pa.us>
How to speed up delete where not in "Andrus" <kobruleht2@hot.ee>
Re: How to speed up delete where not in David Rowley <david.rowley@2ndquadrant.com>
How to drop user if objects depend on it "Andrus" <kobruleht2@hot.ee>
Ynt: How to drop user if objects depend on it Neslisah Demirci <neslisah.demirci@markafoni.com>
Re: Ynt: How to drop user if objects depend on it Jerry Sievers <gsievers19@comcast.net>
Re: How to drop user if objects depend on it Thom Brown <thom@linux.com>
Re: How to drop user if objects depend on it "Andrus" <kobruleht2@hot.ee>
Re: How to drop user if objects depend on it Adrian Klaver <adrian.klaver@aklaver.com>
Re: How to drop user if objects depend on it "Andrus" <kobruleht2@hot.ee>
Re: How to drop user if objects depend on it Tom Lane <tgl@sss.pgh.pa.us>
Re: How to drop user if objects depend on it Tom Lane <tgl@sss.pgh.pa.us>
Re: How to drop user if objects depend on it "Andrus" <kobruleht2@hot.ee>
Re: How to drop user if objects depend on it Tom Lane <tgl@sss.pgh.pa.us>
Re: How to drop user if objects depend on it "Andrus" <kobruleht2@hot.ee>
Re: How to drop user if objects depend on it Tom Lane <tgl@sss.pgh.pa.us>
How to get correct local time "Andrus" <kobruleht2@hot.ee>
Re: How to get correct local time Vitaly Burovoy <vitaly.burovoy@gmail.com>
Re: How to get correct local time Vitaly Burovoy <vitaly.burovoy@gmail.com>
Re: How to get correct local time Adrian Klaver <adrian.klaver@aklaver.com>
How to use row values as function parameters "Andrus" <kobruleht2@hot.ee>
Re: How to use row values as function parameters Adrian Klaver <adrian.klaver@aklaver.com>
Re: How to use row values as function parameters "David G. Johnston" <david.g.johnston@gmail.com>
Re: How to use row values as function parameters "Andrus" <kobruleht2@hot.ee>
Re: How to use row values as function parameters Adrian Klaver <adrian.klaver@aklaver.com>
Re: How to use row values as function parameters "David G. Johnston" <david.g.johnston@gmail.com>
Re: How to drop user if objects depend on it "Andrus" <kobruleht2@hot.ee>
Re: How to drop user if objects depend on it Adrian Klaver <adrian.klaver@aklaver.com>
Re: How to drop user if objects depend on it Melvin Davidson <melvin6925@gmail.com>
Re: How to drop user if objects depend on it "Andrus" <kobruleht2@hot.ee>
Re: How to drop user if objects depend on it Melvin Davidson <melvin6925@gmail.com>
Re: How to drop user if objects depend on it "Andrus" <kobruleht2@hot.ee>
Re: How to drop user if objects depend on it Melvin Davidson <melvin6925@gmail.com>
Re: How to speed up delete where not in Melvin Davidson <melvin6925@gmail.com>
Re: How to use record variable with non-null domain in plpgsql "Andrus" <kobruleht2@hot.ee>
Re: Converting char to varchar automatically Melvin Davidson <melvin6925@gmail.com>
Re: Converting char to varchar automatically "Andrus" <kobruleht2@hot.ee>
Re: Converting char to varchar automatically "Andrus" <kobruleht2@hot.ee>
Re: Converting char to varchar automatically Melvin Davidson <melvin6925@gmail.com>
Re: Converting char to varchar automatically "Andrus" <kobruleht2@hot.ee>
Re: Converting char to varchar automatically Melvin Davidson <melvin6925@gmail.com>
Re: Converting char to varchar automatically "Andrus" <kobruleht2@hot.ee>
Re: Converting char to varchar automatically Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Converting char to varchar automatically "Andrus" <kobruleht2@hot.ee>
Hi! >TBH, the problem here is with the not-null constraint on the domain. >Get rid of that and you'll be much happier. Is the only reasonable way is to change domain using ALTER DOMAIN tebool DROP NOT NULL ? bool types of columns are never used in database. Instead of them tebool type is alway used. There are alrge number of tebool columns in database. In different installations there may be additional tebool columns not know at design time. Will everything work after such change ? How to disable null values in tebool columns then ? Should script created which loops over all tebool columns in all tables and adds not null constraint to them ? Or is there some better solution ? > Data types that try to >insist on not being NULL are fundamentally incompatible with SQL >semantics --- to take one example, what do you think will happen >to a column of such a type when it's on the outside of a LEFT JOIN? I tried: create temp table test ( test tebool, test2 numeric ) on commit drop ; create temp table test1 ( test tebool, test2 numeric ) on commit drop ; insert into test values (false,1); select test1.test from test left join test1 on false; query returns null value. I also tried to cast result to tebool select test1.test::tebool from test left join test1 on false; and select null::ebool This returns also null. So Postgres allows null values in this type instance. There are no problems. Andrus.
В списке pgsql-general по дате отправления
От: Igor Sosa Mayor
Дата: