Hi, I've been charged with the administration of a couple of big
databases in an old 8.1 cluster. The databases have many
administrative issues, privileges being the most prominent for my job.
All objects have privileges for specific personal end-user roles
(dozens and dozens of privileges each obj
12 Jul 2011 00:45:01 +0000
2011/10/2, Diego Augusto Molina :
> solved if we use no composite at all! Instead of a field with an array
> of a composite of three instrinsics, use three fields, each of an
> intrinsic type. See your proposal:
Errata: "use three fields, each *one b
s.
It is written in C, so I assume it runs much, much faster (specially
needed for highly transactional DBs). But it's not proven to be binary
safe (which I don't remember what that is). Bugs: nothing known.
So, if you need to be able to restore your table as of any time, use
tablelo
or the next version,
which I hope that also checks some TODO's in the list. When I get home
I'll send the current code attached and when I get some fresh air at
work I'll make the changes and post the new version.
Any other ideas for the new version? (get some previews in the
shortening each time with the growing system.
The *real* system is very discreet with I/U/D operations: it's not
usual to have more than one of those operations per second. For higher
transactional systems I think this logging system would be more
noticeable (right now things go smooth). As
2011/9/27, Diego Augusto Molina :
> Honestly, I don't remember why I used triggers instead of rules in the
> "audit" and "audet" tables.
I remember now, that's because in my case, operations over tuples are
done very lightly (one or two in the same sentenc
many long-long lines, except for those whoch are comments.
Honestly, I don't remember why I used triggers instead of rules in the
"audit" and "audet" tables.
--
Diego Augusto Molina
diegoaugustomol...@gmail.com
ES: Por favor, evite adjuntar documentos de Microsoft Office. Se
/* Created by Diego Augusto Molina in 2011 for Tucuman
Government,
Argentina. */
/*
-- Execute the following accordingly to your needs.
CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql';
CREATE TRUSTED PROCEDURAL LANGUAGE 'plperl';
*/
CREATE ROLE auditor N
ote that
upgrading is not always a choice).
Will it worth pasting the little code in here or that'll be ignored?
--
Diego Augusto Molina
diegoaugustomol...@gmail.com
ES: Por favor, evite adjuntar documentos de Microsoft Office. Serán
desestimados.
EN: Please, avoid attaching Microsoft Office docu
Hi, this may be a start:
-- This will make our day better :)
with base_query (tstmp) as (
select DATE_TRUNC('hour',timestamp) as tstmp
FROM record
WHERE
record.timestamp BETWEEN ( CURRENT_TIMESTAMP + INTERVAL '-7 day') and
(CURRENT_TIMESTAMP) -- this I don't under
de for quiet a long time with no drawbacks; it worked
perfectly fine for me (tested it nice with a heavy load, in production
things were more quiet).
What's more, I find this approach very appropiate from the
"programming" point of view. Correct me if I'm wrong.
--
Diego Augusto Mo
e PK. This is slow! specially with large data sets.
Once you've got the data in one DB, you can use some replication
system if you want to have that DB in all your machines. One of that
systems is Slony-I, though I haven't tried it.
--
Diego Augusto Molina
diegoaugustomol...@gmail.com
so expect some comments and/or corrections.
NOTICE: the privileged function was already successfully tested in a
production environment between two 8.4 servers.
--
Diego Augusto Molina
diegoaugustomol...@gmail.com
ES: Por favor, evite adjuntar documentos de Microsoft Office. Serán
desestimados.
EN: P
www.postgresql.org/docs/9.0/interactive/catalog-pg-database.html.
But this would be the appropiate way of getting the value:
> SELECT CAST(current_setting('max_connections') AS integer);
You would rather use that form instead of messing up with the catalogs.
--
Diego Augusto Molin
ithout `EXECUTE') but couldn't find it. Sorry.
--
Diego Augusto Molina
diegoaugustomol...@gmail.com
ES: Por favor, evite adjuntar documentos de Microsoft Office. Serán
desestimados.
EN: Please, avoid attaching Microsoft Office documents. They shall be discarded.
LINK: http://www.gnu.org/
expression | DEFAULT }" syntax
you would have the "expression" syntax, which would include the case
of having just "DEFAULT" as an expression. It's just a matter of
understanding the syntax.
Cheers!
--
Diego Augusto Molina
diegoaugustomol...@gmail.com
ES: Por f
16 matches
Mail list logo