[SQL] Programatically Backup Database Using Visual Basic

2006-04-19 Thread Christian Paul B. Cosinas
Hi is there a way wherein I can interface the pg_dump of PostgreSQL Server in Visual basic. I mean for example I want to backup Databases "DB1", "BD12", "DB3" using pg_dump Thank You, Ian I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html ---

Re: [SQL] Function Parameters in GROUP BY clause cause errors

2006-03-22 Thread Christian Paul B. Cosinas
Title: Function Parameters in GROUP BY clause cause errors Just Put aggregate function to the fields you selected. Like this:   select to_char(to_timestamp(EXTRACT(HOUR FROM max(em.email_creation_datetime)) || ':' || (EXTRACT(MINUTE FROM max(em.email_creation_datetime))::integer/30) * 30

Re: [SQL] PostgreSQL Handling of Special Characters

2006-03-19 Thread Christian Paul B. Cosinas
Hi Markus, Can you please elaborate more on this. I'm really lost. Thank You So Much. -Original Message- From: Markus Bertheau [mailto:[EMAIL PROTECTED] Sent: Sunday, March 19, 2006 8:09 PM To: Christian Paul B. Cosinas Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] PostgreSQL Han

[SQL] PostgreSQL Handling of Special Characters

2006-03-19 Thread Christian Paul B. Cosinas
Hi to all, I am currently using PostgreSQL 8.0.3 My Database uses SQL_ASCII encoding. I have a program in Visual Basic that connects to PostgreSQL using ODBC Connection through File DSN. I insert a text in one fields of my table. For example, I insert a special character to that field. Let's s

[SQL] Constraint Error effect on PostgreSQL

2006-03-13 Thread Christian Paul B. Cosinas
Hi Fellow PostgreSQL users, Just a question here. Is there any bad effect on the PostgreSQL performance If I encounter many fails on inserting records to database with primary key column. For example I have this table CREATE TABLE unique_items ( item_id text NOT NULL, CONSTRAINT unique_item

Re: [SQL] Characters that needs escape characters when inserting to database

2006-01-17 Thread Christian Paul B. Cosinas
- From: Michael Fuhr [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 9:57 AM To: Michael Glaesemann Cc: Christian Paul B. Cosinas; pgsql-sql@postgresql.org Subject: Re: [SQL] Characters that needs escape characters when inserting to database On Tue, Jan 17, 2006 at 04:20:23PM +090

[SQL] Characters that needs escape characters when inserting to database

2006-01-16 Thread Christian Paul B. Cosinas
Hi, Can anyone give me a list of characters that needs to be preceded by an escape character before inserting to database. Aside from characters listed below what are the other characters? "\" "'" Thanks I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html

Re: [SQL] Problem with "NOT IN (subquery)

2005-11-13 Thread Christian Paul B. Cosinas
I think that query should work. Hmmm... Weird... I tried that in my database and it is working. What do you mean by this? " If i use a list instead of a subquery it works normaly but it's not easy to manage it like this." -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

Re: [SQL] How to speed up the database query?

2005-10-27 Thread Christian Paul B. Cosinas
Of course as long as your table increases its records, the longer will take your query. I think what you want is to minimize the run time even though you have large tables. You should fine tune your database server (which I am still looking for the best configuration for my server haha). And get t

[SQL] SETOF RECORD RETURN VALUE

2005-10-26 Thread Christian Paul B. Cosinas
Hi I am having some problem with function that returns SETOF RECORD Here is my function: CREATE OR REPLACE FUNCTION test_record(text) RETURNS SETOF RECORD AS $BODY$ DECLARE p_table_name ALIAS FOR $1; temp_rec RECORD; v_query text; BEGIN v_query = 'SELECT * FROM ' || p_table_name; FOR temp_