Re: [GENERAL] Simulating field-level permissions via stored SQL functions?

2001-08-17 Thread Bruce Richardson
On Fri, Aug 17, 2001 at 02:41:47PM -0400, Neal Lindsay wrote: I think that the subject line explains what I am trying to do. How can I create a stored function (in SQL, if that matters) that a user can call to update data in a table to which they normally only have read access? By using a

[GENERAL] Sequences and inheritance

2001-07-31 Thread Bruce Richardson
If I have a set of tables and I set their primary keys all to the same sequence, as in create sequence common_seq; create table alpha ( ID integer primary key default nextval('common_seq), other_field text ); create table beta ( ID integer primary key

[GENERAL] sysconfdir

2001-04-22 Thread Bruce Richardson
Is there any way to tell where postgres is looking for it's config file, or to tell it where to look? I compiled the 7.1RC4 source tarball with --prefix=/usr/local (and using stow to keep things tidy in /usr/local) but it is entirely ignoring the postgresql.conf and pg_hba.conf files. -- Bruce

[GENERAL] NULL parameters abort functions

2001-03-04 Thread Bruce Richardson
I discover that if a function is passed a NULL parameter then it simply doesn't operate and a NULL value is returned. Is there *any* way round that? It makes life incredibly complicated. -- Bruce ---(end of broadcast)--- TIP 1: subscribe and

Re: [GENERAL] Problems with RAISE EXCEPTION

2001-02-27 Thread Bruce Richardson
On Tue, Feb 27, 2001 at 08:40:27AM -0300, Tulio Oliveira wrote: But the RAISE EXCEPTION don't accept variables, only a CONTANT STRING. Nor strigs concatenation are supported You can add variables to the string, like this: RAISE EXCEPTION "Record % has same name as record %",

[GENERAL] Function reference

2001-02-22 Thread Bruce Richardson
Is there a Postgresql function reference somewhere? I can't find it in the documentation and I'm not getting far without it. -- Bruce

[GENERAL] Function reference

2001-02-17 Thread Bruce Richardson
Is there a function reference for Postgresql anywhere? I can't find one in the standard documentation. -- Bruce

[GENERAL] Default values?

2001-02-17 Thread Bruce Richardson
If I wanted to create a table in such a way that the default value of one column is the value of another column (or the oid value), is there a way to do that in the CREATE TABLE statement (with the DEFAULT keyword, I'd imagine)? Or would I need to create a trigger? -- Bruce