SLONIK_DEFINE(7)
π DEFINE π
okay so bestie, we're reading slonik define(7) today β straight out of the Slony-I 2.2.11 documentation. it's a tiny page but it's lowkey iconic, so let's go π¦
β¨ NAME β¨
DEFINE β defining a named symbol. yes that's the whole name section. short king. π
β¨ SYNOPSIS β¨
define [ name ] [ value ]
β¨ DESCRIPTION β¨
so this bad boy defines a named symbol. that's it, that's the job. πΈ
but there are rules, bestie, and you WILL respect them:
- symbol names have to follow the slonik rules for constructing identifiers β so they start with a letter, and after that it's letters, numbers, and underscores. no starting with a number, no starting with a vibe. periodt. β¨
- symbol values are way more chill β they may contain spaces, and they may recursively contain symbol references. yes, symbols inside symbols. it's giving inception, it's giving nesting dolls, it's giving main character energy. π
to actually reference a symbol, you use an @ followed by the symbol name. that's the whole handshake. π€
β οΈ but listen β symbol referencing is suppressed inside string literals. so if you put an @symbol inside quotes, it just... sits there. as text. do not expect the glow-up. π
π EXAMPLE π
here's the whole flex, verbatim, because I would never edit a legend:
define cluster movies;
define sakai 1;
define chen 2;
define fqn fully qualified name;
cluster name = @cluster;
node @sakai admin conninfo = 'service=sakai-replication';
node @chen admin conninfo = 'service=chen-replication';
define setMovies id = 1;
define sakaiMovies @setMovies, origin = @sakai;
create set ( @sakaiMovies, comment = 'movies' );
set add table( set @sakaiMovies, id = 1, @fqn = 'public.customers',
comment = 'sakai customers' );
set add table( set @sakaiMovies, id = 2, @fqn = 'public.tapes',
comment = 'sakai tapes' );
echo 'But @sakaiMovies will display as a string, and is not expanded';
see that last echo line? yeah. that's the string literal thing I was yelling about. @sakaiMovies inside those quotes is NOT expanding, bestie, it's just vibing as plain text. π go off I guess.
β VERSION INFORMATION β
this command was introduced in Slony-I 1.1. old money. π
and that's the whole page!! π«Ά sourced from the Slony-I 2.2.11 Documentation, and dated 19 September 2024. love that for us. slay, stay defined, and don't forget the @. πβ¨π§
π¦ where this page comes from
- debian trixie: slony1-2-doc 2.2.11-6
- ubuntu questing: slony1-2-doc 2.2.11-6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms