Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 2:03 PM, John R Pierce wrote: > On 03/04/11 1:57 PM, Matt Warner wrote: > >> Not sure. I believe public and pg_catalog are in the path by default. Most >> of the create function declarations prepend pg_catalog, and I believe I saw >> somewher

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:56 PM, Bosco Rama wrote: > Matt Warner wrote: > > > > The function cannot be defined in the user's DB because "language C" is > > considered a security risk, so only the superuser can do that. Or that's > > what I get

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:51 PM, Andrew Sullivan wrote: > On Fri, Mar 04, 2011 at 01:41:34PM -0800, Matt Warner wrote: > > No luck: > > > > *** as postgres > > postgres=# GRANT all on function nvl(anyelement,anyelement) to public; > > GRANT > > post

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:49 PM, John R Pierce wrote: > On 03/04/11 1:41 PM, Matt Warner wrote: > >> No luck: >> >> *** as postgres >> postgres=# GRANT all on function nvl(anyelement,anyelement) to public; >> GRANT >> postgres=# >> >>

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:48 PM, Bosco Rama wrote: > Matt Warner wrote: > > No luck: > > > > *** as postgres > > postgres=# GRANT all on function nvl(anyelement,anyelement) to public; > > GRANT > > postgres=# > > > > *** as unprivileged user >

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
Here's how the script is defining the function, if that helps: CREATE FUNCTION nvl(anyelement, anyelement) RETURNS anyelement AS '$libdir/orafunc','ora_nvl' LANGUAGE C IMMUTABLE; On Fri, Mar 4, 2011 at 1:41 PM, Matt Warner wrote: > No luck: > > *** as

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
the given name and argument types. You might need to add explicit type casts. On Fri, Mar 4, 2011 at 1:34 PM, Vibhor Kumar wrote: > > On Mar 5, 2011, at 2:50 AM, John R Pierce wrote: > > > On 03/04/11 1:11 PM, Matt Warner wrote: > >> Good afternoon. > >> > >>

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
To be clear, this is open source Postgres I'm using, not the enterprise product. Matt On Fri, Mar 4, 2011 at 1:29 PM, Matt Warner wrote: > It's a "contrib" module: > > http://pgfoundry.org/projects/orafce/ > > Matt > > > On Fri, Mar 4, 2011 at 1:20

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
It's a "contrib" module: http://pgfoundry.org/projects/orafce/ Matt On Fri, Mar 4, 2011 at 1:20 PM, John R Pierce wrote: > On 03/04/11 1:11 PM, Matt Warner wrote: > >> Good afternoon. >> >> I've been looking at the Oracle Functionality package.

[GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
Good afternoon. I've been looking at the Oracle Functionality package. It's very interesting. However, the one place I'm stuck is that while user Postgres can access the functions, no other user seems to have access. I'm sure this is something simple I'm missing, but so far Google hasn't shown me

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Matt Warner
ot;gist" STATEMENT: create index test_idx on test using gist(columnname gist_trgm_ops); ERROR: operator class "gist_trgm_ops" does not exist for access method "gist" On Sun, Jan 30, 2011 at 10:36 AM, Tom Lane wrote: > Matt Warner writes: > > If I understand

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Matt Warner
his works? TIA, Matt On Sun, Jan 30, 2011 at 9:59 AM, Matt Warner wrote: > Aha! Thanks for pointing that out. It's indexing now. > > Thanks! > > Matt > > > On Sun, Jan 30, 2011 at 9:12 AM, Tom Lane wrote: > >> Matt Warner writes: >> > Doesn't

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Matt Warner
Aha! Thanks for pointing that out. It's indexing now. Thanks! Matt On Sun, Jan 30, 2011 at 9:12 AM, Tom Lane wrote: > Matt Warner writes: > > Doesn't seem to work either. Maybe something changed in 9.1? > > create index test_idx on testtable using gin(to_tsvector(wor

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Matt Warner
1) || reverse(substring($1, 1, > length($1)-1)) > > else '' end $$ language sql immutable strict; > > > > On Sat, 29 Jan 2011, Matt Warner wrote: > > 9.0.2 >> >> On Sat, Jan 29, 2011 at 9:35 AM, Oleg Bartunov wrote: >> >> What v

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
9.0.2 On Sat, Jan 29, 2011 at 9:35 AM, Oleg Bartunov wrote: > What version of Pg you run ? Try latest version. > > Oleg > > > On Sat, 29 Jan 2011, Matt Warner wrote: > > Reverse isn't a built-in Postgres function, so I found one and installed >> it. >>

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
nt. Is there a specific version of the reverse function you're using? Or am I just missing something obvious? This is Postgres 9, BTW. Thanks, Matt On Sat, Jan 29, 2011 at 6:46 AM, Matt Warner wrote: > Thanks Oleg. I'm going to have to experiment with this so that I understand &g

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
; again, it's possible to obtain tsvector by custom function, which aware > about reversing. > > Good luck and let me know if this help you. > > Oleg > > > On Fri, 28 Jan 2011, Matt Warner wrote: > > I'm in the process of migrating a project from Oracle to Postgr

[GENERAL] Full Text Index Scanning

2011-01-28 Thread Matt Warner
I'm in the process of migrating a project from Oracle to Postgres and have run into a feature question. I know that Postgres has a full-text search feature, but it does not allow scanning the index (as opposed to the data). Specifically, in Oracle you can do "select * from table where contains(coln