473,545 Members | 1,288 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PostgreSQL Database Forum

PostgreSQL ORDBMS database - Ask questions about PostgreSQL development, administration replication, clustering, connection pooling, tables, indexes, databases, performance, SQL, queries and more.
16
18,354
priyan
thread by: priyan | last post Sep 21 '07 by: priyan
Hi all, I had created a view from a table employee from my database. View is created sucuessfully and when i inserted data into employee table it is also updated in the view but i tried to insert data into my view but it shows an error. create view empp as select * from employee Name DOB id...
0
2,775
YuriyRusinov
thread by: YuriyRusinov | last post Sep 20 '07 by: YuriyRusinov
Hello ! I have database linkdb with UTF8 encoding. Script \encoding WIN1251 begin; \i ./database_schema.sql
3
4,412
thread by: kavi2012 | last post Sep 20 '07 by: kavi2012
Hi all I need to get a 2'nd top Salary from the table Employee. I don't know how to write a query for this in postgresql. Could you please help me out to write. I tried in MSSQL. It is working fine. select top 3 salary from employee But it is not working in Postgre. What is the equivalent for Top in postgre. Thanks
12
3,941
priyan
thread by: priyan | last post Sep 20 '07 by: henryhcface
Hi all, I want to check the difference between the truncate and delete command. I know the difference between them ie., truncate is DDL and delete is DML statement. Delete can be rollbacked know but i tried it but it does not work out. I tried this command update employee set name='arun' where id=1; ROLLBACK;
2
3,090
thread by: henryhcface | last post Sep 20 '07 by: henryhcface
i am so sorry! the english is not my mother language. but i need everyone help actually. it takes 16 seconds to query the this sql SELECT count(*) FROM Sold_Listing_V as slv WHERE slv.Is_Paid ='1' so , we ask for help the sold_listing_v is a View ,
1
3,135
thread by: bennyg96 | last post Sep 19 '07 by: bennyg96
Hi there, to make it short, my server crashed some days ago, and I could only save the data folder of one tablespace, witch was located on another HDD. Now I am trying to restore my database, but it does not work! What I did: Installed postgresql-8.2 created an new tablespace named as it was before created a new database named as it was...
0
3,264
thread by: glubber | last post Sep 19 '07 by: glubber
I have a cronned perl script that runs on a different server. when I try to restore it to the server below things dont copy across correctly. the target server is described below. debian 4.0 - Linux testbox.jumboentertainment.com.au 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux with the latest apt-get installation of...
5
3,315
priyan
thread by: priyan | last post Sep 19 '07 by: priyan
hai all, If anybody know please help me to how to use array in a function and how to return a integer array from a function thanks in advance priyan.
0
2,685
thread by: thefreecat | last post Sep 19 '07 by: thefreecat
I wrote a function to list the content of a group : create or replace function members(int,char) returns setof int as... To list the content of group 2 I execute : select * from members(2,'*') memberid; Now I want to list all the members of each group but I can't figure out the correct syntax (despite several semantically heretic tries)....
1
4,491
thread by: Adam Smith | last post Sep 18 '07 by: HansH
Hello, Been away from PostgreSQL for a while and probably needs retraining in the basics. How do I close a database? Can't even find it in the Manual Case: testdb=# testdb=# EXIT; ERROR: syntax error at or near "EXIT" at character 1
6
5,149
thread by: bogie | last post Sep 18 '07 by: bogie
Hi again I have another question, I would like to add NOT NULL column in my table. I have done like this : ALTER TABLE patent ALTER COLUMN patent_pri_date SET NOT NULL; but it doesn't work and give the following error : ERROR: ALTER TABLE: Attribute "patent_pri_date" contains NULL values is any body can help me how can i add NOT NULL...
0
2,351
thread by: coolminded | last post Sep 17 '07 by: coolminded
i am using vb6 and postgresql. i have connected this with odbc. i have created two databases, one test1 and next is test2 when i create a database as CREATE DATABASE test1 WITH OWNER = postgres ENCODING = 'SQL_ASCII' TABLESPACE = pg_default; it works fine, it is connected through vb6
3
4,038
thread by: Mitramirsa | last post Sep 15 '07 by: rski
I want to write a trigger so that rows deleted from the table are logically-deleted, rather than being actually removed. That is, such rows are marked as being deleted, rather than actually being deleted from the table. in sql server I know that we can use INSTEAD OF DELETE trigger but I don`t know how can I do the same action in PostgreSQL....
2
3,143
thread by: bogie | last post Sep 13 '07 by: bogie
Dear Postgresql forum, I have some question related to the rules in postgresql. I have a table invention with the following rules Rules : rule_invention_insert, rule_invention_update, rule_invention_delete. I need to know the inside of this rule, i mean how the relation and so on. Is there any command to see the...
1
22,815
thread by: edwige | last post Sep 13 '07 by: rski
I just installed PostgreSQL on ubuntu linux. the installer does everything for, but I try to use "createuser" I get this message: { FATAL: role "root" does not exist } I have tried different suggestions from the Net, nothing seems to work. How do I correct the problem?
6
5,566
thread by: henryhcface | last post Sep 13 '07 by: rski
i use the comman , initdb in my postgresql as followers initdb henryDB means ,i want to create the database henryDB but wrong .syntax error at or near "initdb" at character 1
1
2,773
sokoun
thread by: sokoun | last post Sep 13 '07 by: henryhcface
Hi all, could you tell me about the differences between MySQL and PostgreSQL in term of datatype? thanks.
3
2,543
thread by: kavi2012 | last post Sep 12 '07 by: rski
Hi all I want to know how to write a Stored Procedure and triggers in PostgreSql. If anybody know please send me.. Thanks Kavitha
7
4,679
thread by: kavi2012 | last post Sep 12 '07 by: amitpatel66
Hi All I want to Retrieve Records from the table based on the DOB. All the Dateformat in mm/dd/yyyy. I am using PostGreSql 8.2 Table: Employee ------------------------- id Bigserial name Character Varying DOB TimeStamp without Timezone
0
2,202
thread by: rajinder arora | last post Sep 12 '07 by: rajinder arora
when the statement level triggers are used can you give an example where it can be implemented?
2
2,529
priyan
thread by: priyan | last post Sep 11 '07 by: priyan
hi all, I am having a doubt of how to write a function for my situation. I am having two tables portfolioscrip portfolioscripdetails i have to insert into portfolioscripdetails that table is having a column called portfolioscripid and portfolioscripdetailsid portfolioscripdetailsid is the auto generated column and...
2
3,352
thread by: henryhcface | last post Sep 10 '07 by: henryhcface
now i have a question, because in our project some tables have too records ,so the speed of the run application is very slow , we plan to use partition table. but what can we do ? the restriction condition as followers the original data in the table ,
0
2,576
thread by: thatguyNYC | last post Sep 9 '07 by: thatguyNYC
Hello-- I wrote an application in Visual Foxpro 8 that reads data from another app's database (Advantage). Recently, tho, that app has changed its backend to PostgreSQL, so I need to update my VFP app to read from PostgreSQL. I've installed the psqlODBC (8.2.4) driver and can connect and read from the database. The trouble I'm having is...
1
2,395
thread by: coolminded | last post Sep 6 '07 by: rski
hi all, i am using POSTGRES 8.0.0 . when clicked on the server it shows databases, groups, users. what i want to know is what is the use of those groups and users. i can't get anything in the help too. so if somebody could clear me what this really means what is the use of it, it will be very greatful. thanx
2
5,751
thread by: bogie | last post Sep 6 '07 by: bogie
Hello I have some problem to change my column data type in my table property from character(15) to character(100). I use Postgresql 7.4. The problem is I try to make new column with charcater(100) then i copy the data from teh original column to the new column, then i try to drop the column but i get the following ERROR : Cannot drop table...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.