Hello,
>From what I know, in pure SQL, it is not possible to perform what you want.
But it is feasible in PL/pgSQL (and this script language is supported
by default by postgresql...).
Regards,
Brice
2013/8/28 Herouth Maoz :
> Hello.
>
> I want to run an automatic archiving SQL script, that look
Brice
2013/5/27 Guillaume Lelarge
> Hi,
>
> On Sun, 2013-05-26 at 20:35 +0200, Brice André wrote:
> > [...]
> > Thanks for your answer.
> >
> > Your example is working fine on my computer too (I had to adapt some
> > includes because my client is und
Hi Wolfe,
First, thanks for your help.
I tried your code, but it does not work... the function returns a string :
"0". When I check, this command properly modifies one row, as expected.
I don't know if it may help, but just in case... The DELETE operation is
not performed on a table : it is perf
Dear all,
I am trying to translate a code written in php to C++. So, I am now using
lipq in order to access my postgresql database from C++.
As performance is an important feature, I am using prepared statements.
I have a SQL statement that performs a 'DELETE ... RETURNING ... ' stuff
and I exec
Hello,
I wrote an aplication where I store data from different users whithin the
same database. There is no link between data of different users.
In my current implementation, I added a column "user_id" in each table,
and, with views and rules mechanisms, I am able to hide data from other
users.
Hello,
This is a normal behaviour of the sequence. In case of rollback, a sequence
is never decremented. Read the note at the end of this page for more info :
http://www.postgresql.org/docs/8.1/static/functions-sequence.html
Regards,
Brice
2012/1/25 Francisco Calderón
> Hello,
>
> I am having
Just my 2 cents...
Why don't you use a date column type instead of a string ? In this case, at
insertion, you could simply do this :
INERT INTO tablename (insertion_time, ...) VALUES (now(), ...)
and, for the select, you could simply write :
SELECT * FROM tablename WHERE insertion_time >= (now(
uot;Clients" TO "AgendaSubscript";
But, when I execute the content of this dump in a fresh database (for
backup and restore stuff), those commands are rejected and thus, my
restored database has not the proper access rights.
Is this a bug with the pg_dump tool or am I doing something wrong ?
Regards,
Brice André
Thanks very much for those info.
>From what I read, I think Veil will do the trick.
I already use ROLES, but there are a few probems with them :
- first, as I mix the data from different users in the same table, ROLES
do not solve the complete problem.
- second, this forces me to use a dedi
ve write access. But maybe is
it not a good idea to handle this at db level ?
Do you have any suggestion on those aspects?
Regards,
Brice André
but you can use dynamic SQL:
>
> test=# select * from drop_role ;
>t
>
> foobar
> (1 row)
>
> test=*# do $$ declare r text; begin for r in select t from drop_role loop
> execute 'drop role ' || quote_ident(r) || ';'; end loop; end; $
Hello everyone,
I would want to implement an SQL query where I would be able to suppress all
information from a registered user. I am currenlty able to suppress
everything except the user role. The name of the role is present in a table
and so, I would want to perform something like this :
DROP RO
12 matches
Mail list logo