Re: [SQL] duplicated oid

2001-09-06 Thread Carolyn Lu Wong
anyone knows if duplicated oid is possible?? is there a possible way to remove the duplicate row, now that i don't know which ID to use? any suggestions? Carolyn Lu Wong wrote: > > i'm using V6.5. > > >From my understanding, the oid should be unique in all rows of

[SQL] duplicated oid

2001-09-03 Thread Carolyn Lu Wong
i'm using V6.5. >From my understanding, the oid should be unique in all rows of database. However, I'm getting duplicated data on one particular table, including the oid is the same! I don't recall trying to restore nor import any data. Any idea why? ---(end of broadcast

[SQL] database location question

2001-08-20 Thread Carolyn Lu Wong
I'm using V6.5.3. Is there a way to move the database to another directory location instead in /var/lib/pgsql? As this is on the root file system on the server and it's using to much spaces. ---(end of broadcast)--- TIP 6: Have you searched our lis

[SQL] what does this error mean?

2001-08-08 Thread Carolyn Lu Wong
When trying to delete data from a table, get the following error: ExecutePlan: (junk) `ctid' is NULL!=ODBC.QueryDef Please advice. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq

[SQL] pg_dump question

2001-02-12 Thread Carolyn Lu Wong
When dumping database, is it possible to dump datetime values without the timezone info? I'm currentlyl using 6.5.

[SQL] Question about 'copy' and datetime

2001-01-21 Thread Carolyn Lu Wong
I'm using V6.5. I find that when I try to restore a backup database (done by pg_dump), the datetime value seem inconsistent. I've checked the dumped file, the data seems alright. However, the imported date is +16hr of the date in the data file. The system uses EST. The data dumped also has EST p

[SQL] Re: update help

2001-01-17 Thread Carolyn Lu Wong
Forgot to mention that I'm using V6.5. It doesn't seem to like subqueries, got the following error: ERROR: parser: parse error at or near "select" What I really want to do is follows t2: ID Amount --- 1 1 .. 1

[SQL] Re: update help

2001-01-17 Thread Carolyn Lu Wong
This update field with the sum of all amounts in t2. I want to update sum of each individual IDs. Tubagus Nizomi wrote: > > update t1 > set amount = sum(b.amount) > from ts b > where a.id=b.id > > On Thursday 18 January 2001 09:54, Carolyn Wong wrote: > > I'd like to know what's the correct SQ

[SQL] Urgent trigger problem.

2000-11-03 Thread Carolyn Lu Wong
I'm using V6.5. I want to write trigger to update database transaction logs. I have followed the examples, but have now run into some problems. I'm using plpsql to create a function for the trigger. I don't want to end up with very large transaction log tables and not all fields from a table wil

[SQL] quote in function

2000-10-24 Thread Carolyn Lu Wong
I'd like to create a function which deals with string manipulation. How do you specify a string as 'abc' in a function?

Re: [SQL] trigger examples

2000-10-02 Thread Carolyn Lu Wong
[EMAIL PROTECTED] wrote: > > Carolyn Lu Wong wrote: > > > > I need to write a trigger to create a new record in log table if it's a > > new record or if column A and B changes. Can someone give me an example > > how to do this. > > > >

[SQL] DB backup and connection questions

2000-10-02 Thread Carolyn Lu Wong
Can someone help me with the following? 1) Is there a command I can check which users are currently connecting to a particular database? Is it possible to disconnect certain users who are currently using the database? Can it also apply to connections to the database via ODBC? 2) When doing datab

[SQL] trigger examples

2000-10-02 Thread Carolyn Lu Wong
I need to write a trigger to create a new record in log table if it's a new record or if column A and B changes. Can someone give me an example how to do this. Are there any sites that gives trigger examples?? Thanks.

[SQL] trigger question

2000-10-02 Thread Carolyn Lu Wong
I have created a trigger when updating/inserting into a table, the row is inserted into a log table. I get the following error when i tried to update the table: ERROR: Unable to locate type oid 0 in catalog what does this mean?

[SQL] What is happening?

2000-08-02 Thread Carolyn Lu Wong
I was trying to dump data, drop then recreate table, and import data back to the table. There were errors during the process and the transaction was not committed. The table is there when I do '\d' and the table definition is there. However, I can't drop table nor select from this table. I always

[SQL] Transactions

2000-07-28 Thread Carolyn Lu Wong
Does postgreSQL support nested transactions?

[SQL] primary key question

2000-07-20 Thread Carolyn Lu Wong
create table aaa( field1 not null, field2 , , primary key (field1, field2) ); Based on the above table definition, field2 allows null values. But after the table created based on the above script, field2 becomes not null. The only conclusion I come u

[SQL] from not null field to nullable field?

2000-07-19 Thread Carolyn Lu Wong
I have a field in a table that has been defined 'not null'. Is it possible to remove this constraint? I don't see this option under 'alter table'.

[SQL] Database authentication and configuration

2000-07-17 Thread Carolyn Lu Wong
Are there anywhere to configure so that whenever I call 'psql dbname', it'll always prompt for user authentication instead of getting into the database directly? In addition, I'd like to default various database settings when I connect to the database. Where is the place to do such configuration?

Re: [SQL] SQL question

2000-07-16 Thread Carolyn Lu Wong
Philip Warner wrote: > > At 12:07 17/07/00 +1000, Carolyn Lu Wong wrote: > >I have table with the following definition: > > > > create table table1( > > account_no int4, > > start_date_tme datetime > >

[SQL] SQL question

2000-07-16 Thread Carolyn Lu Wong
I have table with the following definition: create table table1( account_no int4, start_date_tme datetime ); The table may contain null values for start_date_time. When I run the following SQL query, it fails: s

[SQL] Trigger

2000-07-14 Thread Carolyn Lu Wong
I'm using V6.5.3. I'm trying to create transaction logs for particular table, so I need to write trigger on insert/delete/update on each row. Are there any examples/documents that can help me with this? In the "Interaction with the Trigger Manager" from the online document, it states that it's f