473,543 Members | 2,035 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.
1
4,547
thread by: bhavanik | last post Jun 13 '10 by: rski
haii.. How can i find the output for this query 1. List the emps whose sal is 4 digit number ending with zero --> How to count the digits in a salary number thanks bhavani
1
2,446
thread by: bhavanik | last post Jun 2 '10 by: rski
I have a question about priviliges. My super user is "hyd" and I have other users like "kit" and "max". How can i give only select privileges to "kit" and "max" from duper user "hyd"?
1
2,837
thread by: bhavanik | last post May 29 '10 by: rski
The Postgresql have stored procedures or not.If postgres contain stored procedures what is the difference between function and stored procedures in postgresql?
3
39,261
thread by: bhavanik | last post Apr 26 '18 by: salimdev
How do I decrypt the password of a user? What is the command used for decrypting the encrypted password to normal one? After entering into postgreSQL database and typing: postgres=# select * from pg_shadow; We will be getting the below listed fields.. i am a super user of the database.. password field shows...
5
2,673
thread by: sentenza | last post May 21 '10 by: sentenza
Here again with other trigger: the tables structure of the database: "database_t" (master), "azienda_vallone" (SLAVE1), "azienda_energy" (SLAVE2 ) .... all tables have identical structure. I want to create a trigger that on updates of table "database_t" I update the fields in the table "azienda_vallone" and on insert in table...
5
9,697
thread by: parry2k | last post May 14 '10 by: parry2k
I have one view with 3 fields like the view name is myview and it has following sql statement. select fn,ln,city from tablea I created a function like below:- create function myfun(in t myview, in f varchar(50)) returns varchar(100) as Now i want to pass row and name of field and let it return the value from function on basis of field...
2
5,715
thread by: vcomp | last post May 14 '10 by: vcomp
I have a table that includes BLOBs which are audio files. I need to copy the table to another database. Normally I just copy the records and insert them into the second table but I'm guessing I can't do that with a BLOB. Any suggestions on how to accomplish this task? Thanks, Vic
2
2,536
thread by: sentenza | last post May 17 '10 by: sentenza
I want to create a function that 'on update' and 'on insert' in table A column nome_tabella create another table named as the record just added in A: CREATE FUNCTION trig_creazione_tabella() RETURNS trigger AS $$ BEGIN IF (TG_OP = 'UPDATE') THEN CREATE TABLE NEW.nome_tabella (id serial NOT NULL, sigla_comune character varying(4));...
1
4,074
thread by: yogeshp2810 | last post May 7 '10 by: rski
Hi everyone, how to encrypt functions in Postgresql so i can hide all my business logic ? is there any option like with encryption present in MS SQL ? Regards, Yogesh.
5
4,206
kosaks
thread by: kosaks | last post May 4 '10 by: rski
Is it possible to read postgres sql connection string by coding it in C#? Im trying to make a system that will automatically read postgres sql connection string when the program loads. Im always using different computers and always changing my password to adopt to postgres. Im thinking is it possible?
1
5,785
thread by: redyakuza87 | last post Aug 11 '10 by: ledgehead
I have tried to install postgreSQL on my WINDOWS 7 but it just does not seems to work. When installing, it stuck at "starting services". It says, "Service 'PostgreSQL Database Server 8.0.0-rc1' (pgsql-8.0.0-rc1) failed to start. Verify that you have sufficient privilleges to start system services." I have tried the solutions for Installing...
0
1,738
thread by: Abhilash Etikala | last post Apr 24 '10 by: Abhilash Etikala
I am having a problem in displaying the image. Image is stored perfectly but not able to retrieve and display...i tried to knowledge but still not able to get it.. my code is: display.php <img src="displayimg.php?co=<?php echo $t;?>"> \\$t is some id value i am sending to displayimg.php displayimg.php
2
3,135
thread by: eim00z | last post May 3 '10 by: kosaks
hello every one i have aproblem in postgresql programm it was running easily and right but suddenly it isn't work when i make connect to server it appear connection failed any one have asolution to this problem please
7
4,040
thread by: Abhilash Etikala | last post Apr 23 '10 by: Abhilash Etikala
I am having table which contains 2 columns (qid,round) and both columns can have repeated values but one constraint is for each 'round' the 'qid' values should not be repeated. example: round:1,1,1,2,2 qid:1,2,3,1,2---should be unique for each round... can any body suggest me a query for this..??
0
2,215
thread by: gkhangelani | last post Apr 19 '10 by: gkhangelani
Hi Please assist, I got an error from a server that's running PostgreSQL 7.3.4 on CentOS5 Problem started with the database not starting up showing the following error: LOG: database system was interrupted at 2010-04-19 07:55:47 SAST LOG: ReadRecord: unexpected pageaddr 44/E43D8000 in log file 68, segment 239, offset 4030464
5
5,784
thread by: coolminded | last post Apr 20 '10 by: rski
hi all, i'm using postgresql 8.0.0 and i want to use the lead and lag window functions but it says "function doesn't exist when i run the following command select lag(selling_rate,1,'0') from currency and i again run the following command select selling_rate, lead(selling_rate) over ( order by selling_rate asc) from currency then it...
2
1,873
thread by: littlemaster | last post May 10 '10 by: littlemaster
I have a table 'a' and 'b'. If I try to delete the record from 'a', not able to do it. Because, 'b' table is referencing the 'a' table. create table a(id serial primary key,name varchar(10)); create table b(id serial,pid integer references a,comment varchar(100)); What is the way to delete a particular record from 'a' table?
3
2,520
thread by: gomathilakshmi | last post Apr 20 '10 by: rski
Hi, I am trying to return a resultset from a function and not sure how to do it but below is the function I created. create or replace function sp_servicer_piechart_testing() returns varchar as $$ select top 10 * from data where r='xxx' $$
10
3,238
thread by: gkhangelani | last post Apr 16 '10 by: gkhangelani
I am using PostgreSQL 7.3.4 running on Redhat5 there is a table that has a broken row, but now I don't know which one is broken. the table has about 20974 pages. is there a command to find this because I used select commands like: select * from table order by column desc limit X ; select * from table order by column asc limit X; but as soon as...
4
5,570
thread by: littlemaster | last post Apr 12 '10 by: littlemaster
I have two data base A, & B. If a table updated or inserted or deleted means then that data have to update in table which is in data base B. I tried with dblink module, it is not workig fully. One table only getting updated... If u know the the solution let me know it...
2
5,288
thread by: mangalv | last post Apr 10 '10 by: mangalv
CREATE TABLE books ( book_id bigint, book_title varchar(100), CONSTRAINT books_book_id_pkey PRIMARY KEY (book_id) )WITH OIDS; CREATE TABLE authors ( id bigint,
1
2,444
thread by: chsuryaprasad | last post Apr 6 '10 by: rski
I've a program running on a local machine which automatically pushes images from a camera to our webserver (linux/mysql) through FTP. I want to store those images in the database so I think I need some perlscript running as a deamon that looks for new incoming images. I tried to find a script which does the job but with no success. I've...
1
3,872
thread by: temuchin | last post Mar 31 '10 by: rski
Hi I'm using the option \o to put the query output into a file. This task is scheduled to run every night. Is there a way to automatically put the current date at the end of the name of each file? Thanks
2
118,145
thread by: weijinxian | last post Mar 30 '10 by: weijinxian
I've installed postgresql from source code successfully on opensuse11.2. and I launch gdb to debug postgresql. when I try to "run", I get the following result: "Starting program: /usr/local/pgsql/bin/postgres Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2 Try: zypper install -C...
0
2,206
thread by: blasted | last post Mar 22 '10 by: blasted
Hi all, I need to backup and restore a DB. In this particular case the data in the database is not important (strange hum...) but only the schema to put new data... I m thinking use the pg_dump: pg_dump -c -C -s schema > file.out With this i have in file.out the schema, correct?

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.