[GENERAL] Index question

2011-03-02 Thread Michael Black
Ok. I have been working with databases a few years but my first real venture in to PostgreSql. I just want a plain simple index regardless if there are duplicates or not. How do I accomplish this in PostgreSql? Michael

[GENERAL] Grant question

2011-03-02 Thread Michael Black
Ok. What am I missing here? B_USER is a defined Group Role CREATE ROLE "B_USER" NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; GRANT SELECT PRIVILEGES ON b.config_itm TO ROLE B_USER; Nets this --- ERROR: syntax error at or near "B_USER" LI

Re: [GENERAL] Index question

2011-03-02 Thread Michael Black
Wed, Mar 02, 2011 at 06:31:57PM +, Michael Black wrote: > > > > > > Ok. I have been working with databases a few years but my first real > > > venture in to PostgreSql. I just want a plain simple index regardless if > > > there are duplicates or not. How d

Re: [GENERAL] script errors or PEBKAC?

2011-03-04 Thread Michael Black
I would check the order in which things are being created in your process. What I usually do is create all the tables sans indexing or constraints (except primary key). Once the table are done, load the data in to the tables that need to be populated. Then constraints, triggers and then index

Re: [GENERAL] First production install - general advice

2011-03-07 Thread Michael Black
One thing that comes to mind... Have you tested the install process from start to end? Other than that, a week until to go live is a is time to relax, exhale, prop your feet on the desk, and visualize the process thinking of every step, automated and manual, what could happen here and is a res

[GENERAL] 9.1 Trigger question

2011-03-09 Thread Michael Black
The following from 9.1 documentation on triggers "SQL allows you to define aliases for the "old" and "new" rows or tables for use in the definition of the triggered action (e.g., CREATE TRIGGER ... ON tablename REFERENCING OLD ROW AS somename NEW ROW AS othername ..

Re: [GENERAL] 9.1 Trigger question

2011-03-10 Thread Michael Black
Thank you for the link Merlin. > Date: Thu, 10 Mar 2011 08:22:13 -0600 > Subject: Re: [GENERAL] 9.1 Trigger question > From: mmonc...@gmail.com > To: michaelblack75...@hotmail.com > CC: pgsql-general@postgresql.org > > On Wed, Mar 9, 2011 at 8:24 PM, Michael Black >

Re: [GENERAL] How to use RETURN TABLE in Postgres 8.4

2009-07-03 Thread Michael Black
Actually, since pgsql does not rely on the names but rather the position of the columns returned to fill the returned table, it would be better to use something like CREATE OR REPLACE FUNCTION buggy_procedure() RETURNS TABLE (rv_id INT8, rv_test VARCHAR) AS $$ BEGIN -- @todo hide pass

Re: [GENERAL] Store derived data or use view?

2009-07-03 Thread Michael Black
In addition to the amount of data that will be captured, you will need take in to consideration how often each user will be accessing this data as well as the number of users. For example, if you have 10 users running the query once an hour every hour of the day, you might get away with calculati

Re: [GENERAL] Select count with offset returns nothing.

2011-08-05 Thread Michael Black
My question is why would you put an offset in a query designed to return a row count without grouping and ordering? > Date: Fri, 5 Aug 2011 22:51:24 +1200 > Subject: [GENERAL] Select count with offset returns nothing. > From: timuc...@gmail.com > To: pgsql-general@postgresql.org > > I am using

[GENERAL] Relation not gfound in view Error

2008-07-12 Thread Michael Black
I created two tables populated both with valid data including forgien key values. I create a view that uses both of these tables in a view that. When I select from the view, I get this error ERROR: relation "vwsinglelevellist" does not existSQL state: 42P01 But when I run the defination as a

Re: [GENERAL] Chart of Accounts

2008-11-09 Thread Michael Black
James, It is not good practice to delete an account with out first transfering the amount in that account to another account. You will also need to make sure the account has a zero balance before deleting it. You will also need to log the transactions if funds are moved between accounts wit

[GENERAL] ALTER TABLE and adding FK Constraints - Assistance Requested

2009-03-29 Thread Michael Black
First, I am relatively new to postgres, but have been using database (design not administering) for about 20 years (you would think that I could figure this out - lol). At an rate, I am trying to create tables that have forgein keys via a script. What happens is if the table that is referred

Re: [GENERAL] ALTER TABLE and adding FK Constraints - Assistance No longer needed

2009-03-29 Thread Michael Black
Thanks to all that responded. I got it figured out. The one I was testing did not have the associated table created yet (error message did not point me to a solution). Created the referenced table and it worked like a chump, er champ. Michael From: michaelblack75...@hotmail.com To: pg

FW: [GENERAL] [GENEAL] dynamically changing table

2009-03-30 Thread Michael Black
From: michaelblack75...@hotmail.com To: gentosa...@gmail.com Subject: RE: [GENERAL] [GENEAL] dynamically changing table Date: Mon, 30 Mar 2009 16:05:52 + The simplest way is to plan for the maximum number of columns that will be required (say 14 - 2 weeks of data assuming that is dail

Re: [GENERAL] Looking for advice on database encryption

2009-04-16 Thread Michael Black
public/private key process. You could create a schema that contains views of the data with out the sensitive data and have the users use that schema for their needs, assumes that it basically used to view or report on the data. Just some thoughts. Michael Black > Date: Thu, 16

[GENERAL] Alternate locations

2000-03-19 Thread Michael Black
I have attempted to configure PostgreSQL as described on the website to use a different location to no avail. Any hints, suggestions or instructions would be appreciated. RedHat 6.1 and the version of PostgreSQL that came with it. Michael Black