BUG #10949: Row security feature doesn't work.

Started by Nonamealmost 12 years ago2 messagesbugs
Jump to latest
#1Noname
a.magdenko@gmail.com

The following bug has been logged on the website:

Bug reference: 10949
Logged by: Alexander Magdenko
Email address: a.magdenko@gmail.com
PostgreSQL version: 9.4beta1
Operating system: Ubuntu 12.04
Description:

Hello,
I tried to install last Postgresql 9.4-beta version to check how RLS
features works
http://wiki.postgresql.org/wiki/Row-security

I have installed 9.4 version on Ubuntu 12.04 (precise) like described here
http://wiki.postgresql.org/wiki/Apt
http://wiki.postgresql.org/wiki/Apt/FAQ#I_want_to_try_the_beta_version_of_the_next_PostgreSQL_release

I checked that version is OK
$ dpkg -l postgresql-9.4
ii postgresql-9.4 9.4~beta1-2.pgdg12.4+1 object-relational SQL
database, version 9.4 server

And in file /usr/share/doc/postgresql-9.4/changelog.gz
first strings

* Rebuild for precise-pgdg (jenkins-postgresql-9.4-source-
distribution=precise-124, bzr revision 470)

-- apt.postgresql.org autobuilder <myon@debian.org> Fri, 30 May 2014
20:26:51 +0200

But when I created database 'mydb' with table
CREATE TABLE my_order (
my_order_id bigint PRIMARY KEY,
name text,
descr text,
owner text default current_user
);

I always get syntax error for
ALTER TABLE my_order SET ROW SECURITY FOR ALL TO (owner = current_user);

ERROR: syntax error at or near "ROW"
SQL-state: 42601
Symbol: 77

Why this syntax doesn't work in beta release? And how to install it with RLS
support?
We are going to include these features in production system with Postgresql
soon.
Any help?

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2Guillaume Lelarge
guillaume@lelarge.info
In reply to: Noname (#1)
Re: BUG #10949: Row security feature doesn't work.

Le 14 juil. 2014 18:49, <a.magdenko@gmail.com> a écrit :

The following bug has been logged on the website:

Bug reference: 10949
Logged by: Alexander Magdenko
Email address: a.magdenko@gmail.com
PostgreSQL version: 9.4beta1
Operating system: Ubuntu 12.04
Description:

Hello,
I tried to install last Postgresql 9.4-beta version to check how RLS
features works
http://wiki.postgresql.org/wiki/Row-security

I have installed 9.4 version on Ubuntu 12.04 (precise) like described here
http://wiki.postgresql.org/wiki/Apt

http://wiki.postgresql.org/wiki/Apt/FAQ#I_want_to_try_the_beta_version_of_the_next_PostgreSQL_release

I checked that version is OK
$ dpkg -l postgresql-9.4
ii postgresql-9.4 9.4~beta1-2.pgdg12.4+1 object-relational

SQL

database, version 9.4 server

And in file /usr/share/doc/postgresql-9.4/changelog.gz
first strings

* Rebuild for precise-pgdg (jenkins-postgresql-9.4-source-
distribution=precise-124, bzr revision 470)

-- apt.postgresql.org autobuilder <myon@debian.org> Fri, 30 May 2014
20:26:51 +0200

But when I created database 'mydb' with table
CREATE TABLE my_order (
my_order_id bigint PRIMARY KEY,
name text,
descr text,
owner text default current_user
);

I always get syntax error for
ALTER TABLE my_order SET ROW SECURITY FOR ALL TO (owner = current_user);

ERROR: syntax error at or near "ROW"
SQL-state: 42601
Symbol: 77

Why this syntax doesn't work in beta release?

Probably because RLS won't be included in 9.4. As the Wuhu page says, this
is an ongoing effort.

And how to install it with RLS
support?

You can't right now.