Re: [GENERAL] Row values

2004-07-02 Thread Juan Jose Costello Levien
Alvaro, Sorry, but, where are the log file and core you mentioned? I tried /var/log/postgresql but is in 0 file size. TIA On Fri, Jul 02, 2004 at 07:36:50AM -0300, Juan Jose Costello Levien wrote: I am writing my first trigger in C for PostgreSQL. It compiles Ok, and added it to the database

Re: [GENERAL] Row-level security--is it possible?

2004-07-02 Thread Doug McNaught
Michal Taborsky <[EMAIL PROTECTED]> writes: > Doug McNaught wrote: >> But why not create a "products_restricted" view that uses the >> CURRENT_USER function to see who's running it? >> CREATE VIEW products_restricted AS >> SELECT * FROM products WHERE Producer_ID = get_producer_id(CURRENT_USER); >

Re: [GENERAL] Row-level security--is it possible?

2004-07-02 Thread Bruno Wolff III
On Fri, Jul 02, 2004 at 17:32:07 +0200, Michal Taborsky <[EMAIL PROTECTED]> wrote: > Doug McNaught wrote: > >But why not create a "products_restricted" view that uses the > >CURRENT_USER function to see who's running it? > > > >CREATE VIEW products_restricted AS > >SELECT * FROM products WHERE Pr

Re: [GENERAL] Row values

2004-07-02 Thread Tom Lane
Juan Jose Costello Levien <[EMAIL PROTECTED]> writes: > I don't know if tgargs[] return the row values or the field names. Neither --- it's the (fixed) arguments you used in the CREATE TRIGGER command. You'll need to do something involving extracting field values from the tuple that is passed to

Re: [GENERAL] How to add an userA to login postgresadmin

2004-07-02 Thread joseph speigle
stephen, try adding the user like you normally would. Did you know the system users and database users are not necessarily the same person? With that in mind, after adding the user, create an alias in .bashrc like alias psql='/usr/local/psql -U postgresadmin -d my_db_name' Furthermore, in /hom

[GENERAL] per-session (or persistent) table (and column) aliases

2004-07-02 Thread David Garamond
CREATE TABLE somereallylongname1 (...); CREATE TABLEALIAS name1 somereallylongname1; SELECT * FROM name1 ...; Is there such a thing? I know there's alias in SELECT and completion in psql (or even views). But this is more like a filesystem symlink/hardlink. Would this be cool/useful? -- dave -

Re: [GENERAL] per-session (or persistent) table (and column) aliases

2004-07-02 Thread Peter Eisentraut
David Garamond wrote: > CREATE TABLE somereallylongname1 (...); > CREATE TABLEALIAS name1 somereallylongname1; > SELECT * FROM name1 ...; > > Is there such a thing? A view does exactly what you need. ---(end of broadcast)--- TIP 9: the planne

[GENERAL] Interpreting query plan

2004-07-02 Thread Chris Smith
I've just noticed in the regular profiling information from our web application that a particular query on a fairly small database is taking about 15 seconds. The query is generated from software on the fly, hence its quirkiness -- if any of that is the problem, then I'll go ahead and fix it, but

Re: [GENERAL] incremental backups?

2004-07-02 Thread Jan Wieck
On 6/22/2004 11:51 PM, mike g wrote: Slony version 1 is supposed to be live very soon. You can test beta3 if you like. Slony-I version 1.0 is out now. It does not contain incremental backup. This feature is on the TODO list for 1.1. Jan Perhaps pgpool could help you. Version 2 was just released

Re: [GENERAL] Interpreting query plan

2004-07-02 Thread Stephan Szabo
On Fri, 2 Jul 2004, Chris Smith wrote: > I've just noticed in the regular profiling information from our web > application that a particular query on a fairly small database is taking about > 15 seconds. The query is generated from software on the fly, hence its > quirkiness -- if any of that is

Re: [GENERAL] Row values

2004-07-02 Thread Alvaro Herrera
On Fri, Jul 02, 2004 at 09:56:43AM -0300, Juan Jose Costello Levien wrote: > Alvaro, > > Sorry, but, where are the log file and core you mentioned? I tried > /var/log/postgresql but is in 0 file size. Your server may be misconfigured (most linux distros are). Make sure your init script does not