Skip to content

Instantly share code, notes, and snippets.

Avatar

Jehan-Guillaume (ioguix) de Rorthais ioguix

  • Dalibo
  • Paris
View GitHub Profile
@ioguix
ioguix / btree_bloat-7.4.sql
Last active Aug 29, 2015
B-tree index bloat estimation for PostgreSQL 7.4
View btree_bloat-7.4.sql
/* The bloat estimation queries moved to this respository:
* https://github.com/ioguix/pgsql-bloat-estimation
*/
@ioguix
ioguix / table_bloat-74-81.sql
Last active Aug 29, 2015
Table bloat estimation for PostgreSQL 7.4 to 8.1
View table_bloat-74-81.sql
/* The bloat estimation queries moved to this respository:
* https://github.com/ioguix/pgsql-bloat-estimation
*/
@ioguix
ioguix / table_bloat-82-84.sql
Last active Aug 29, 2015
Table bloat estimation for PostgreSQL 8.2 to 8.4
View table_bloat-82-84.sql
/* The bloat estimation queries moved to this respository:
* https://github.com/ioguix/pgsql-bloat-estimation
*/
@ioguix
ioguix / table_bloat.sql
Last active Aug 29, 2015
Table bloat estimation for 9.0 and more
View table_bloat.sql
/* The bloat estimation queries moved to this respository:
* https://github.com/ioguix/pgsql-bloat-estimation
*/
@ioguix
ioguix / btree_bloat-8.0-8.1.sql
Last active Aug 29, 2015
B-tree index bloat estimation for PostgreSQL 8.0 to 8.1
View btree_bloat-8.0-8.1.sql
/* The bloat estimation queries moved to this respository:
* https://github.com/ioguix/pgsql-bloat-estimation
*/
@ioguix
ioguix / btree_bloat.sql
Last active Mar 28, 2018
B-tree index bloat estimation
View btree_bloat.sql
/* The bloat estimation queries moved to this respository:
* https://github.com/ioguix/pgsql-bloat-estimation
*/
@ioguix
ioguix / 8.3 operator workaround.sql
Created Jun 2, 2014
Workaround using operators to implicit cast removed in PostgreSQL 8.3
View 8.3 operator workaround.sql
CREATE FUNCTION pg_catalog.texteqint(text, integer) RETURNS BOOLEAN STRICT IMMUTABLE LANGUAGE SQL AS $$SELECT textin(int4out($2)) = $1;$$;
CREATE FUNCTION pg_catalog.texteqint2(text, smallint) RETURNS BOOLEAN STRICT IMMUTABLE LANGUAGE SQL AS $$SELECT textin(int2out($2)) = $1;$$;
CREATE FUNCTION pg_catalog.texteqoid(text, oid) RETURNS BOOLEAN STRICT IMMUTABLE LANGUAGE SQL AS $$SELECT textin(oidout($2)) = $1;$$;
CREATE FUNCTION pg_catalog.texteqdate(text, date) RETURNS BOOLEAN STRICT IMMUTABLE LANGUAGE SQL AS $$SELECT textin(date_out($2)) = $1;$$;
CREATE FUNCTION pg_catalog.texteqfloat8(text, double precision) RETURNS BOOLEAN STRICT IMMUTABLE LANGUAGE SQL AS $$SELECT textin(float8out($2)) = $1;$$;
CREATE FUNCTION pg_catalog.texteqreal(text, real) RETURNS BOOLEAN STRICT IMMUTABLE LANGUAGE SQL AS $$SELECT textin(float4out($2)) = $1;$$;
CREATE FUNCTION pg_catalog.texteqtimetz(text, time WITH time zone) RETURNS BOOLEAN STRICT IMMUTABLE LANGUAGE SQL AS $$SELECT textin(timetz_out($2)) = $1;$$;
CREATE FUNCTION pg_cata
You can’t perform that action at this time.