parsav  Diff

Differences From Artifact [b916bb0a63]:

To Artifact [a4ebd0c2e8]:


106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
	body		text,
	posted		bigint,
	discovered	bigint,
	edited		bigint,
	parent		bigint,
	convoheaduri text,
	chgcount	integer,

-- ephemeral
	accent		smallint,
	rtdby		bigint, -- note that these must be 0 if the record
	rtdat		bigint, -- in question does not represent an RT!
	rtid		bigint, -- (this one too)
	n_likes		integer,
	n_rts		integer,
................................................................................
pg_temp.parsavpg_translate_post(parsav_posts,bigint,bigint,bigint)
returns pg_temp.parsavpg_intern_post as $$
	select a.origin is null,
		($1).id,     ($1).author,
		($1).subject,($1).acl,         ($1).body,
		($1).posted, ($1).discovered,  ($1).edited,
		($1).parent, ($1).convoheaduri,($1).chgcount,
		coalesce(c.value, -1)::smallint,
		$2 as rtdby, $3 as rtdat, $4 as rtid,
		re.likes, re.rts,
		($1).parent in (select id from parsav_posts)
	from parsav_actors as a 
		left join parsav_actor_conf_ints as c
		          on c.key = 'ui-accent' and
		             c.uid = a.id







>







 







|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
	body		text,
	posted		bigint,
	discovered	bigint,
	edited		bigint,
	parent		bigint,
	convoheaduri text,
	chgcount	integer,
	uri         text,
-- ephemeral
	accent		smallint,
	rtdby		bigint, -- note that these must be 0 if the record
	rtdat		bigint, -- in question does not represent an RT!
	rtid		bigint, -- (this one too)
	n_likes		integer,
	n_rts		integer,
................................................................................
pg_temp.parsavpg_translate_post(parsav_posts,bigint,bigint,bigint)
returns pg_temp.parsavpg_intern_post as $$
	select a.origin is null,
		($1).id,     ($1).author,
		($1).subject,($1).acl,         ($1).body,
		($1).posted, ($1).discovered,  ($1).edited,
		($1).parent, ($1).convoheaduri,($1).chgcount,
		($1).uri, coalesce(c.value, -1)::smallint,
		$2 as rtdby, $3 as rtdat, $4 as rtid,
		re.likes, re.rts,
		($1).parent in (select id from parsav_posts)
	from parsav_actors as a 
		left join parsav_actor_conf_ints as c
		          on c.key = 'ui-accent' and
		             c.uid = a.id