473,544 Members | 2,345 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.
11
7,490
thread by: Jean-Christian Imbeault | last post Nov 11 '05 by: Nigel J. Andrews
I have a table with a primary field and a few other fields. What is the fastest way to do an insert into that table assuming that sometimes I might try to insert a record with a duplicate primary key and want that to fail? I know that if I try a plain insert this will work, but in the case where I am trying to insert a duplicate key, the...
1
7,475
thread by: Joseph Santaniello | last post Jul 19 '05 by: Jeff Boes
Hello all, I have a table with among other things a timestamp field. To get the count of records per hour I do: select count(*) as c, date_trunc('hour', timestmp) as h from mytable
6
7,432
thread by: pgnovice | last post Oct 26 '07 by: jengka
I've greated my table with "not null default 0000" on several fields. Some of them are char and others numeric. When loading my flat file, and there is no data between the delimiters, shouldn't the default value get loaded? By having a default value defined, and the section on the flat file is comming in null, will the default value get loaded?...
2
7,413
thread by: Johann Robette | last post Nov 23 '05 by: Johann Robette
Hi, I'm trying to call the array_to_string function like this : SELECT array_to_string(array, '~^~') --> it comes directly from the doc. I get this error msg : ERROR: parser: parse error at or near ", text) does not exist Unable to identify a function that satisfies the given argument types
5
7,412
thread by: nd02tsk | last post Nov 23 '05 by: Jan Wieck
Hello MySQL has information about several storage engines. MEMORY to handle temporary tables, InnoDB to handle transactions and which also can split its table data over several files/partitions. Splitting of storage is something which according to the following article, PostgreSQL does not support: http://www.devx.com/dbzone/Article/20743
3
7,375
thread by: Eric Anderson Vianet SAO | last post Nov 11 '05 by: Eric Anderson Vianet SAO
hello all When i tried ´pg_dump -v -f dump.dmp dtbtransporte´ I got the error: pg_dump: restoring data for table tbdmovimento pg_dump: dumping out the contents of table tbdmovimento pg_dump: ERROR: unexpected chunk number 8 (expected 0) for toast value 6935693
1
7,364
thread by: zeny | last post May 11 '08 by: rski
Hello, Quoting postgresql documentation: "13.4.1. Disable Autocommit Turn off autocommit and just do one commit at the end. (In plain SQL, this means issuing BEGIN at the start and COMMIT at the end. Some client libraries may do this behind your back, in which case you need to make sure the library does it when you want it done.) " ...
4
7,356
thread by: Vikram | last post Nov 23 '05 by: Reko Turja
Hi, I am using postgresql 8.0beta in a freebsd jail environment. My inittdb gives me a message like: --- creating template1 database in /home/..../db/base/1 ... FATAL: could not create shared memory segment: Function not implemented DETAIL: Failed system call was shmget(key=1, size=1187840, 03600). child process exited with exit code 1...
2
7,343
thread by: Morten K. Poulsen | last post Nov 23 '05 by: Morten K. Poulsen
(re-post) Dear list, Please let me know if this is not the list to ask this kind of question. I am trying to optimize a query that joins two relatively large (750000 rows in each) tables. If I do it using a subselect, I can "force" the planner to choose the fastest path. Now, my question is:
7
7,340
thread by: CSN | last post Nov 12 '05 by: Christopher Browne
How do you get the last value of a sequence without having called nextval? phppgadmin displays last value for sequences (I haven't found out how yet rooting through the code). CSN __________________________________
2
7,303
thread by: clearissues | last post Apr 23 '08 by: clearissues
Hi All, I have a python script which takes dump of postgres and restores the same. When i take a dump there is no problem. command to take dump: pg_dump -b -c -C --format=c -d -h <<hostname>> -p 5432 -U postuser -f /tmp/april_23/abc.sql abc Restore command: pg_restore -c --format=c -h <<hostname>> -p 5432 -U postuser -d sfdb...
3
7,298
gauravgmbhr
thread by: gauravgmbhr | last post Mar 9 '07 by: ronverdonk
can some one plz tell me how to merger two strings in PostgreSQL OR pl/Pgsql
2
7,294
thread by: GeoX | last post May 27 '07 by: michaelb
Hi, I am new to psql so i am having a little trouble acommodating with the language. Here is the problem: I have created a small functions that returns true or false: CREATE OR REPLACE FUNCTION DriverLogin(VARCHAR, VARCHAR) RETURNS BOOLEAN AS ' DECLARE l_username ALIAS FOR $1; l_password ALIAS FOR $2;
6
7,280
thread by: Rory Campbell-Lange | last post Nov 12 '05 by: Stephan Szabo
I have to file a bug about the implementation of some delivery report database calls in the Kannel (open source WAP/SMS) server code. Essentially the call (as defined below) asks for an update and adds a LIMIT parameter on the end of the UPDATE. (eg update where x=1 limit 1). Postgres doesn't like this and I assume it isn't SQL standards...
1
7,258
thread by: djdevx | last post Jan 26 '08 by: rski
Dear all PostgreSQL xperts! Hi, I am newbie in PostgreSQL. I am currently developing an app that use PostgreSQL as a BackEnd Database. Now I am having problem with the function trigger since last week. Here's the case: create table nr_tr (tr_type character(3), period character(6), nr_tr integer); create table h_trsale(nr_tr integer,...
3
7,244
thread by: pw | last post Nov 12 '05 by: pw
Hello, How can I typecast a date generated from VARCHAR fields into a date field ie: UPDATE inventory SET date_field = vc_year||'-'||vc_month||'-'||vc_day;
2
7,209
thread by: My Internet | last post Nov 12 '05 by: Richard Huxton
Hello, I want to know if in PostgreSQL, there is a command equivalent to START WITH... CONNECT BY from Orcale? This command is used to traverse a tree. Thank you, Jean-Marc _________________________________________________________________
4
7,189
thread by: John Siracusa | last post Nov 12 '05 by: Gaetano Mendola
How can I create a non-null date column that defaults to 'now' as computed at the time the row is inserted? -John ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get...
1
7,187
thread by: John French | last post Nov 23 '05 by: Nikolay A Mirin
I just installed postgresql 7.4.5 and pgadmin3 1.0.2 on FreeBSD and noticed that pgadmin allows the pgsql user to log in while ignoring the password. You can enter a wrong password or no password and still get into postgresql. I started the postmaster as a FreeBSD user named pgsql by running postmaster -i -D /usr/local/pgsql/data I changed...
3
7,182
thread by: ashokakr | last post Jul 20 '07 by: michaelb
Hi all This my procedure, when i try to run the procedure it says "coitem_linenumber" is not a scalar variable. Can any one say what is the error and how i can correct it declare wotype CHARACTER; id integer;
2
7,180
thread by: Roger Gordon | last post Nov 12 '05 by: Stephan Szabo
Hi, When we use WITH (NOLOCK) at the end of table list in a SELECT query, a Cartesian join is returned (i.e. approximately 6,500 records instead of 57, which is distressing.
3
7,178
thread by: Neil Zanella | last post Nov 12 '05 by: Tom Lane
Hello, I would like to ask the about the following... PostgreSQL allows tables resulting from subselects to be renamed with an optional AS keyword whereas Oracle 9 will report an error whenever a table is renamed with the AS keyword. Furthermore, in PostgreSQL when the result of a subselect is referenced in an outer select it is required...
2
7,178
thread by: Daniel Secomb | last post Nov 23 '05 by: Jeff Eckermann
Hi, I'm using PostgreSQL 7.3.4 on phpPgAdmin 2.4.2 and I'm getting the following error when I try and run a SQL query on a script: Error - /usr/local/psa/admin/htdocs/domains/databases/phpPgAdmin/db_readdump.php -- Line: 33 PostgreSQL said: ERROR: parser: unterminated quoted string at or near "'Black Tea\015\012Fresh range of leaf tea...
2
7,175
thread by: S.Peppe | last post Nov 11 '05 by: S.Peppe
Hi there! I'm really new at this game, so please forgive me if my request is at all irritating. I have installed PostgreSQL onto a Debian/Linux machine, and I have just upgraded PostgreSQL via the apt-get update & upgrade commands. However, whenever I get into the PostgreSQL interactive terminal thus sp@vanthoff:~$ psql -U postgres SHG
2
7,173
thread by: Karl O. Pinc | last post Nov 23 '05 by: Joe Conway
I'd like to write: SELECT larger(colA, colB) FROM foo and am wondering the best way to go about it. (Really, I'd like the larger() function to take an arbitrary number of arguments but I don't see how to do that.) Are there significant performance penalities if I were to use a

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.