Re: [GENERAL] Practical question.

2007-03-17 Thread louis gonzales
N number of associated records in another table, would out perform 50K records in a single table referencing dedicated 'small' tables, please do share. Thanks though. hubert depesz lubaczewski wrote: On 3/16/07, louis gonzales [EMAIL PROTECTED] wrote: I want to write a statement-level trigg

Re: [GENERAL] Practical question.

2007-03-17 Thread louis gonzales
louis gonzales wrote: Dear Hubert, Two things 1) _*statement-level and row-level straight from PostgreSQL: http://www.postgresql.org/docs/8.1/interactive/trigger-datachanges.html*_ * _*Statement-level triggers*_ follow simple visibility rules: none of the changes made

Re: [GENERAL] Practical question.

2007-03-16 Thread louis gonzales
but many of them? Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/15/07 22:14, louis gonzales wrote: Hello List, I want to write a statement-level trigger - one that happens once per statement - such that, immediately after an insert into a table(which gets a unique integer

[GENERAL] Practical question.

2007-03-15 Thread louis gonzales
Hello List, I want to write a statement-level trigger - one that happens once per statement - such that, immediately after an insert into a table(which gets a unique integer value as an ID from a defined sequence, being the primary key on the table), a new table is created with foreign key

Re: [GENERAL] Practical question.

2007-03-15 Thread louis gonzales
the correct one. Does that sound plausible? Thanks, Tom Lane wrote: louis gonzales [EMAIL PROTECTED] writes: As an example: insertX which initiates the trigger reads the 'nextvalue' from the sequence and begins to create the associcated table insertY happens almost at the same time, so

Re: [GENERAL] Practical question.

2007-03-15 Thread louis gonzales
Hey Joshua, I appreciate the insight. That's clear. Thanks again, Joshua D. Drake wrote: Tom Lane wrote: louis gonzales [EMAIL PROTECTED] writes: As an example: insertX which initiates the trigger reads the 'nextvalue' from the sequence and begins to create the associcated table

[GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
Hello all, Is there an existing mechanism is postgresql that can automatically increment/decrement on a daily basis w/out user interaction? The use case I'm considering is where a student is in some type of contract with an instructor of some sort, and that contract puts a time limit on the

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
that are standard in the industry or are we stuck with this type of external influence? Thanks all! brian wrote: louis gonzales wrote: Hello all, Is there an existing mechanism is postgresql that can automatically increment/decrement on a daily basis w/out user interaction? The use case I'm

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
wrote: louis gonzales [EMAIL PROTECTED] schrieb: Hey Brian, Yeah I had considered this, using cron, I just feel like that is too dirty. Why? Actually I didn't see Andreas' post, can someone forward that? Sorry, i posted to the list, and i can see my mail. I'm running

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
* *function* pg_sleep() (Joachim Wieland): SELECT pg_sleep(1); AgentM wrote: On Nov 2, 2006, at 14:02 , Glen Parker wrote: louis gonzales wrote: Hey Brian, Yeah I had considered this, using cron, I just feel like that is too dirty. Actually I didn't see Andreas' post, can someone forward

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
A. Kretschmer wrote: am Thu, dem 02.11.2006, um 14:24:20 -0500 mailte louis gonzales folgendes: visit the student profile it will only show/flag the status if the time has elapsed. Is there like a sleep() function that postgresql has? That could be part of the plan. So sleep(24hours

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
the function redundantly. Glen Parker wrote: louis gonzales wrote: Fine so let's say when the instructor creates the user profile, this can trigger the creation of a sequence, say, but IF the instructor doesn't visit that student's profile for a month, I want something that, independent of any

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
Wes, Thanks. That is fair. Wes Sheldahl wrote: On 11/2/06, *AgentM* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Nov 2, 2006, at 14:02 , Glen Parker wrote: louis gonzales wrote: Hey Brian, Yeah I had considered this, using cron, I just feel like that is too

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
I suppose I'll just concede now :) Thanks for putting up with my sarcasm and humoring my other ideas. I really wanted to see if there were any other methods out there and do appreciate everyone's ideas. Thanks again, CRON it is. Glen Parker wrote: Wes Sheldahl wrote: if you did have a

Re: [GENERAL] postgresql books and convertion utilities

2006-10-29 Thread louis gonzales
Ganbold, There are man PDF files out there that outline all of the workings of postgresql. They are easy to read, but also have 'deep dive' information in them as well. The PDF's are really valuable, both for the novice and for those who are experienced. I'd start there. Ganbold wrote:

Re: [GENERAL] Maximum size of database

2006-10-18 Thread louis gonzales
also, run EXPLAIN on any command, show the results of this. In particular, if you have some commands that are taking 'even longer?' roopa perumalraja wrote: Thanks for your reply. I have answered your questions below. 1 2) System: Microsoft Windows XP Professional Version

Re: [GENERAL] Maximum size of database

2006-10-18 Thread louis gonzales
Scan on tk_20060403 (cost=0.00..95561.30 rows=3609530 width=407) (1 row) will this help? */louis gonzales [EMAIL PROTECTED]/* wrote: also, run EXPLAIN on any command, show the results of this. In particular, if you have some commands that are taking 'even longer?' roopa

Re: [GENERAL] not so sequential sequences

2006-10-17 Thread louis gonzales
Rhys, You could create a sequence, then make the seq attribute to your table have a default value of: seq integer default nextval('your_sequence') Then every time an insert is done into your table, the seq will increment. You alternatively could make your insert statement have for that

Re: [GENERAL] Is Postgres good for large Applications

2006-10-17 Thread louis gonzales
Is your server capable? Does it have enough resources to handle many connections? many = ??? 100, 200, 1,000,000,000 are they concurrent users? 'good for large applications' = ??? I'd say, how large your application is doesn't matter, right... cause that's the front end. How

[GENERAL] create table foo( ... ..., _date date default current_date, ... ... );

2006-10-01 Thread louis gonzales
Group, I want to set the default value of a date attribute _date to CURRENT_DATE. CURRENT_DATE gives a format-MM-DD my table is something similar to: create table foo( ... ..., _date date default current_date, ... ...); Now, everytime a new entry is inserted, is it going to get the

Re: [GENERAL] cannot open pg_database

2006-08-21 Thread louis gonzales
Also, what is you $PGDATA variable pointing to? Issue: env | grep PG see what that comes out with. Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-08-19 20:18:53 -0700: Installing with yum, Fedora core 5. Get error: could not open file global/pg_database: No such file or directory.

[GENERAL] Is it possible (postgresql/mysql)

2006-08-16 Thread louis gonzales
Hello List, PostgreSQL 8.0.1 (on Solaris 9) There is a PERL program that a friend purchased which is used to create tables on a MySQL database, and of course ;) I want to run this on a PostgreSQL database server instead. The below is the code: $sth=runSQL(CREATE TABLE someTable (

Re: [GENERAL] Is it possible (postgresql/mysql)

2006-08-16 Thread louis gonzales
); As you are working on transferring, maybe you like to drop those varchar(xx) and replace them with text. Saves a lot of hassle lateron. Harald On 8/16/06, *louis gonzales* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello List, PostgreSQL 8.0.1 (on Solaris 9

Re: [GENERAL] Tuning to speed select

2006-08-09 Thread louis gonzales
What about creating views on areas of the table that are queried often? I don't know if you have access or the ability to find what type of trends the table has, in terms of queries, but if you create some views on frequently visited information, this could also help. Tom Laudeman wrote:

Re: [GENERAL] Tuning to speed select

2006-08-09 Thread louis gonzales
I'm not so sure about that, when you create a view on a table - at least with Oracle - which is a subset(the trivial or 'proper' subset is the entire table view) of the information on a table, when a select is issued against a table, Oracle at least, determines if there is a view already on a

Re: [GENERAL] psql -h host ...

2006-06-27 Thread louis gonzales
James, the psql command as you know is just the command line program that requests connection to a database and depending how you issue the command, determines if it's attempting to connect to a local file, or via a network protocol (commonly TCP/IP). When you issue the command from a remote

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread louis gonzales
Florian, Are you certain: You can only create an FK if the fields you are referencing in the foreign table form a PK there. And creating a PK implicitly creates an index, which you can't drop without dropping the PK :-( I'm not sure I am convinced the necessity of a foreign key,

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread louis gonzales
, always have a 1-1 Index per row entry. At least that's the way I understand it, can someone else affirm this statement or redirect a misguided 'me ;)'? Thanks group, Florian G. Pflug wrote: louis gonzales wrote: Florian, Are you certain: You can only create an FK if the fields you

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread louis gonzales
and a foreign key that references the primary key of test. perhaps you can assert two constraints at the same time during an alter table ... not sure why your example syntax is failing louis gonzales wrote: Florian, I understand where you're coming from. Indexes are always unique and all

Re: [GENERAL] Problem Connecting to 5432

2006-06-14 Thread louis gonzales
Try using the following format in the pg_hba.conf file: host all all(or your_user_account) your_IP/32 trust (The 32 is the same as 255.255.255.255 but in CIDR format) As for the command line you started postmaster with, doesn't the -i require an interface such as an IP address too? If you

Re: [GENERAL] Problem Connecting to 5432

2006-06-14 Thread louis gonzales
your_PORT -l logfile(if you wish) start if you use your_IP = 0.0.0.0 it will listen on all valid TCP/IP interfaces, including 127.0.0.1(a.k.a. localhost) louis gonzales wrote: Try using the following format in the pg_hba.conf file: host all all(or your_user_account) your_IP/32 trust

Re: [GENERAL] PostgreSQL and Apache

2006-06-13 Thread louis gonzales
PHP is one alternative, another is PERL with CGI to write web based programs that can GET/POST with input/output from the browser, and to interface with *SQL - i.e. postgresql - you can use PERL's DBI interface Leif B. Kristensen wrote: On Tuesday 13. June 2006 15:39, jqpx37 wrote: I'm

Re: [GENERAL] PostgreSQL scalability concerns

2006-03-16 Thread Louis Gonzales
Hope this helps: http://www.postgresql.org/files/about/casestudies/wcgcasestudyonpostgresqlv1.2.pdf http://www.postgresql.org/about/users ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Clustered PostgreSQL

2006-03-14 Thread Louis Gonzales
Jojo Paderes wrote: Is it possible to cluster PostgreSQL? If yes where can I find the resource information on how to implement it? -- http://jojopaderes.multiply.com http://jojopaderes.wordpress.com ---(end of broadcast)--- TIP 4: Have you

Re: [GENERAL] Build failures on RedHat 3.0 with openssl/kerberos

2006-03-14 Thread Louis Gonzales
Wes, Did you try to ./configure w/out --enable-thread-safety? I recently compiled postgreSQL 8.0.1 on Solaris and _needed_ --enable-thread-safety strictly for building Slony-I against postgresql with that feature enabled. What is the reason you are compiling this _with_ the feature? If it's

Re: [GENERAL] 8.0 Client can't connect to 7.3 server?

2006-03-08 Thread Louis Gonzales
Jussi Saarinen wrote: I have following environment: Server1, rh9, ip:192.168.1.10: postgresql-7.3.4-3.rhl9 postgresql-libs-7.3.4-3.rhl9 postgresql-server-7.3.4-3.rhl9 postgresql-jdbc-7.3.4-3.rhl9 Server2, fc4, ip:192.168.1.11: postgresql-libs-8.0.7-1.FC4.1 postgresql-8.0.7-1.FC4.1

Re: [GENERAL] Triggers and Multiple Schemas.

2006-03-08 Thread Louis Gonzales
Paul Newman wrote: Hi, We run with multiple identical schemas in our db. Each schema actually represents a clients db. What wed like to do is have a common schema where trigger functions and the like are held whilst each trigger defined against the tables is in there own

Re: [GENERAL] Triggers and Multiple Schemas.

2006-03-08 Thread Louis Gonzales
Scott Marlowe wrote: On Wed, 2006-03-08 at 14:19, Louis Gonzales wrote: Paul, When you say "multiple identical schemas" are they all separate explicit schemas? Or are they all under a general 'public' schema. >From my understanding, when you create a new db instanc

Re: [GENERAL] Triggers and Multiple Schemas.

2006-03-08 Thread Louis Gonzales
Paul, What is the current schema layout for your db instances? I don't think it's possible to share across db instances like this: dbname1.myschema.sometable dbname2.myschema.sometable But you can share resources of the following type: dbname.myschema1.sometable dbname.myschema2.sometable