This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Mesoconcepts\WordPress\Plugin\BugFixes\Component; | |
use Mesoconcepts\WordPress\Bridge\Component\WordPressInterface; | |
use Mesoconcepts\WordPress\Bridge\DependencyInjection\EagerLoadedInterface; | |
use Mesoconcepts\WordPress\Bridge\DependencyInjection\EventSubscriberInterface; | |
/** | |
* Subdir install fixes -- part of MIT-licensed `mesoconcepts/mc-bug-fixes` plugin | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Mesoconcepts\WordPress\Config; | |
/** | |
* Warning-free version of PHP's built-in \define() function. | |
* | |
* @param string $key | |
* @param mixed $value | |
* @param boolean $case_insensitive | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
denis=# \d test | |
Table "public.test" | |
Column | Type | Modifiers | |
--------+---------+----------- | |
id | integer | not null | |
Indexes: | |
"test_pkey" PRIMARY KEY, btree (id) | |
denis=# select * from test; | |
id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Copyright (c) Denis de Bernardy, 2011-2013 | |
-- MIT license | |
-- | |
CREATE SCHEMA IF NOT EXISTS system; | |
CREATE OR REPLACE FUNCTION system.typeof("any") | |
RETURNS regtype | |
AS 'pg_typeof' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> k = {} | |
=> {} | |
>> h = {k => :v} | |
=> {{}=>:v} | |
>> k[:broken] = :yes | |
=> :yes | |
>> h | |
=> {{:broken=>:yes}=>:v} | |
>> h[k] | |
=> nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table if exists parent cascade; | |
drop table if exists child cascade; | |
deallocate all; | |
create table parent (id serial primary key, val int unique); | |
create table child (id serial primary key, val int references parent(val)); | |
insert into parent (val) | |
select case when i % 11 <> 0 then i else null end | |
from generate_series(1,10000) i; |