Re: [GENERAL] surppressing column names in COPY format

2003-08-01 Thread Dave Cramer
I have some code from my project that does unload to file select and load to file insert ... Which would allow you to change column names or even table names through the load process. It wasn't submitted as a patch as I didn't think it added significant functionality, but apparently there

[GENERAL] tsearch2 parser

2003-08-01 Thread Fred Fung
Hi, I wonder if this is the mailing list to go regarding to tsearch2. If not, could somebody direct me to the proper mailing list please ? Thanks. I am looking for more in-depth documentation regarding to the default parser that comes with tsearch2. I already read the Tsearch2 Reference

Re: [GENERAL] Hardware selection

2003-08-01 Thread Francisco J Reyes
On Fri, 25 Jul 2003 [EMAIL PROTECTED] wrote: The data will be stored on an external raid, SCSI based 2.5TB with IDE disks. Configured as 1 large volume, RAID5. ( We already have this hardware) How come you did not go with SCSI disks? Specially 15K ones. Performance will be much better with

[GENERAL] COPY and domains

2003-08-01 Thread Tambet Matiisen
I noticed that COPY is getting very slow, when importing to table, which makes use of domains as column datatypes. It seems like foreign key validation is especially slow. It takes ages to import table with 25000 rows, which has foreign key reference to another table with 25000 rows. I tried the

[GENERAL] Errors from Sub-select Not Showing Up

2003-08-01 Thread Ian Harding
Has anyone else seen cases where errors from subselects are not being raised? I just had it happen again but can't find a simple case that reproduces it. The query is like this: insert into ... select (a bunch of CASE statements specifying a subselect to use if the value of the attribute is

[GENERAL] Error from Sub-Select, Simple Example.

2003-08-01 Thread Ian Harding
OK, here's the deal. It seems that in this particular situation, if you reference an UNQUALIFIED field name in a subselect, the parser thinks it is just fine as long as that field name exists SOMEWHERE in the referenced tables Then, the error that gets generated gets lost in the mail.

[GENERAL] Correct Allocation of UNICODE string in C

2003-08-01 Thread Steffen Macke
Hello All, I'm struggling with the correct allocation of a UNICODE text in a C function for PostgreSQL. The strings are sometimes truncated, sometimes garbage bytes are added at the end. Is there a code example, that takes a UNICODE (UTF-8) text of unknown length, allocates the PostgreSQL

[GENERAL] COPY and domains

2003-08-01 Thread Tambet Matiisen
I noticed that COPY is getting very slow, when importing to table, which makes use of domains as column datatypes. It seems like foreign key validation is especially slow. It takes ages to import table with 25000 rows, which has foreign key reference to another table with 25000 rows. I tried the

[GENERAL] extract and time zones

2003-08-01 Thread Oscar Estevez Lopez
Um, and what about this? $ uname -a FreeBSD caneli 4.7-RELEASE FreeBSD 4.7-RELEASE #1: Fri May 9 02:30:11 CEST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/CANELI i386 $ psql --version psql (PostgreSQL) 7.2.2 contains support for: readline, history, multibyte Portions Copyright (c)

Re: [GENERAL] Error from Sub-Select, Simple Example.

2003-08-01 Thread Peter Eisentraut
Ian Harding writes: create table one ( oneidint, onevalue text not null); create table two ( twoidint, twovalue text); insert into one (oneid, onevalue) select 1, case when two.twovalue is null then (select twovalue from one where oneid = 1) else

Re: [GENERAL] tsearch2 parser

2003-08-01 Thread Teodor Sigaev
Fred Fung wrote: Hi, I wonder if this is the mailing list to go regarding to tsearch2. If not, could somebody direct me to the proper mailing list please ? Thanks. List at http://openfts.sourceforge.net/ I am looking for more in-depth documentation regarding to the default parser that

Re: [GENERAL] COPY and domains

2003-08-01 Thread Richard Huxton
On Friday 01 August 2003 08:45, Tambet Matiisen wrote: I noticed that COPY is getting very slow, when importing to table, which makes use of domains as column datatypes. It seems like foreign key validation is especially slow. It takes ages to import table with 25000 rows, which has foreign

Bug in comment parsing? [was: Re: [GENERAL] Comments in .sql files]

2003-08-01 Thread Rory Campbell-Lange
/* Check to see if a person's code is correct */ My Postgres 7.3.2 install chokes on the ' when trying to load a function from psql \i. Rory On 31/07/03, Tom Lane ([EMAIL PROTECTED]) wrote: Chad N. Tindel [EMAIL PROTECTED] writes: 1. It obviously doesn't like the # notation for

Re: [GENERAL] Comments in .sql files

2003-08-01 Thread Tom Lane
Richard Huxton [EMAIL PROTECTED] writes: Note that you can also do multi-line comments /* like this */ That's not SQL standard AFAIK, It is standard in SQL99, but I don't see it in SQL92. regards, tom lane ---(end of

Re: [GENERAL] Table Stats

2003-08-01 Thread Ron Johnson
On Thu, 2003-07-31 at 23:23, Dennis Gearon wrote: It will only be at a given point in time, since datasbases are by design, realtime/concurrent applications. do: SELECT COUNT(*) FROM table_name; Should give you what you want. It'll give him what he wants, but not quickly, if it's a

Re: [GENERAL] UPDATE sql question

2003-08-01 Thread Ron Johnson
On Mon, 2003-07-28 at 03:24, Andrei Verovski wrote: Hi, What exactly will happen if UPDATE sql statement instructs to update some columns with the same values as already in the database? Will Postgres update only different values or it will simply modify all columns listed in UPDATE sql?

[GENERAL] PC color icon data?

2003-08-01 Thread Johnson, Shaunn
Title: PC color icon data? Howdy: Running PostgreSQL 7.2.1 on RedHat Linux 7.2. I know this will sound stupid, but can someone tell me what this means: 'PC color icon data' ? Background: I copy a table out to a .txt file by doing this: [snip] psql -U postgres -d bcn -c \\copy

Re: [GENERAL] Table Stats

2003-08-01 Thread Shridhar Daithankar
On 1 Aug 2003 at 9:14, Ron Johnson wrote: On Thu, 2003-07-31 at 23:23, Dennis Gearon wrote: It will only be at a given point in time, since datasbases are by design, realtime/concurrent applications. do: SELECT COUNT(*) FROM table_name; Should give you what you want. It'll

Re: [GENERAL] How to do?

2003-08-01 Thread Ron Johnson
On Wed, 2003-07-30 at 07:17, Robert Partyka wrote: Hi, Have question How to do such like this: I have: select column list form tables where where statement; how to make one column be row numbers in result? and second one: have select like above and I know that in result is

Re: [GENERAL] How to do?

2003-08-01 Thread Shridhar Daithankar
On 1 Aug 2003 at 9:47, Ron Johnson wrote: On Wed, 2003-07-30 at 07:17, Robert Partyka wrote: Hi, Have question How to do such like this: I have: select column list form tables where where statement; how to make one column be row numbers in result? select oid,name from a;

Re: [GENERAL] extract and time zones

2003-08-01 Thread Tom Lane
Oscar Estevez Lopez [EMAIL PROTECTED] writes: d :1059744638 d::timestamp : 1059737438 ?? This is fixed as of PG 7.3.4 ... 2003-02-27 16:37 tgl * src/backend/utils/adt/timestamp.c (REL7_3_STABLE): Change EXTRACT(EPOCH FROM timestamp) so that a timestamp without

Re: [GENERAL] PC color icon data?

2003-08-01 Thread Karsten Hilbert
How does PostgreSQL figure out what the difference when copying a file? It doesn't. 'file' does. The data you export just happens to look like the formats 'file' thinks it is in. And maybe it is. Have you tried actually *looking* at the data in question ? Karsten -- GPG key ID E4071346 @

Re: Bug in comment parsing? [was: Re: [GENERAL] Comments in .sql files]

2003-08-01 Thread Tom Lane
Rory Campbell-Lange [EMAIL PROTECTED] writes: /* Check to see if a person's code is correct */ My Postgres 7.3.2 install chokes on the ' when trying to load a function from psql \i. Works fine for me. Could we see a complete example? regards, tom lane

Re: [GENERAL] Domains (Was [PERFORM] Views With Unions)

2003-08-01 Thread Ron Johnson
On Fri, 2003-08-01 at 12:26, Francisco J Reyes wrote: On Fri, 1 Aug 2003, Tom Lane wrote: [snip] accros some tables. Currently I used inheritance to enforce the consitency since a good number of fields needed to be common among the tables AND the inheritted tables are basically a supperset of

Re: [GENERAL] last inserted raw (identity)

2003-08-01 Thread Ron Johnson
On Fri, 2003-08-01 at 18:25, b b wrote: Is there an environment variable that returns the primary key of the last inserted row. This is usefull if you insert a rwo and need the primary key to insert it into another table as a foreign key. In MS-SQL that is equivalent to @@identity

[GENERAL] plPHP -- sort of an announcement.. but not commercial

2003-08-01 Thread Joshua D. Drake
Hello, As a recent flurry of activity has commenced within Command Prompt we have released upon this rather unround earth, plPHP. Yes it is trigger safe, yes you can write UDF's in PostgreSQL with PHP now. Find it here: http://www.commandprompt.com/entry.lxp?lxpe=260 Have a glorius

Re: [GENERAL] plPHP -- sort of an announcement.. but not commercial

2003-08-01 Thread Ron Johnson
On Fri, 2003-08-01 at 19:06, Joshua D. Drake wrote: Hello, As a recent flurry of activity has commenced within Command Prompt we have released upon this rather unround earth, plPHP. Yes it is trigger safe, yes you can write UDF's in PostgreSQL with PHP now. Find it here:

Re: [GENERAL] Apache - DBI - Postgresql: Cancelling queries

2003-08-01 Thread Ian Harding
The solution I finally implemented seems to be pretty good, graying out the button after it's pushed with javascript. That means no more doubleclick problem, and no more hammering away at the same button. It does not preclude the reloading of the page (reactivating the button) or just going

[GENERAL] Help with BEGIN/COMMIT within a transaction

2003-08-01 Thread Bhavesh Jardosh
I aplogoize in the first place, if this is a silly question. But as silly as it sounds it has been giving me a hard time. I need to use BEGIN/COMMIT within a stored procedure and almost all the syntax (e.g. BEGIN ... COMMIT, START ... COMMIT, BEGIN WORK ... COMMIT WORK etc.) gives me an error

[GENERAL] error while loading shared libraries: libpq.so.3

2003-08-01 Thread Elielson Fontanezi
Hi all! I would like some suggestion on how to solve that: postgres$ createdb postgres/usr/local/postgresql-7.3.4/bin/psql: error while loading shared libraries: libpq.so.3: cannot open shared object file: No such file or directorycreatedb: database creation failedpostgres$postgres$

Re: [GENERAL] error while loading shared libraries: libpq.so.3

2003-08-01 Thread Richard Huxton
On Friday 01 August 2003 12:54, Elielson Fontanezi wrote: Hi all! I would like some suggestion on how to solve that: postgres$ createdb postgres /usr/local/postgresql-7.3.4/bin/psql: error while loading shared libraries: libpq.so.3: cannot open shared object file: No such file or

Re: [GENERAL] [SQL] ALTER TABLE ... DROP CONSTRAINT

2003-08-01 Thread Chad Thompson
Hi all! Who can tell me what postgres version supports ALTER TABLE... DROP CONSTRAINT without the need of droping the table to remove a simple coinstraint. (link) \\\!/ 55 11 5080 9283 !_"""_! Elielson Fontanezi (O) (o) PRODAM - Technical

Re: [GENERAL] [SQL] ALTER TABLE ... DROP CONSTRAINT

2003-08-01 Thread George Weaver
It works in 7.3.2. George - Original Message - From: Elielson Fontanezi To: pgsql-general ; pgsql-sql Sent: Wednesday, July 30, 2003 10:52 AM Subject: [SQL] ALTER TABLE ... DROP CONSTRAINT Hi all! Who can tell me what postgres version supports

[GENERAL] OSDL DBT-2 for PostgreSQL

2003-08-01 Thread markw
Hi everyone, I've just got our DBT-2 workload (TPC-C derivate) working with PostgreSQL using C stored functions and libpq. I'd love to get some feedback. v0.10 is available on SourceForge at: http://prdownloads.sourceforge.net/osdldbt/dbt2-v0.10.tar.gz?download We keep the source in

Re: [GENERAL] [HACKERS] OSDL DBT-2 for PostgreSQL

2003-08-01 Thread Josh Berkus
Mark, I've just got our DBT-2 workload (TPC-C derivate) working with PostgreSQL using C stored functions and libpq. I'd love to get some feedback. I'm confused. Jenny Zhang just announced OSDL-DBT3 for Postgres; is this a different test or does one of you have the name wrong? -- -Josh

Re: [GENERAL] [HACKERS] OSDL DBT-2 for PostgreSQL

2003-08-01 Thread Mark Wong
On Fri, Aug 01, 2003 at 05:05:18PM -0700, Josh Berkus wrote: Mark, I've just got our DBT-2 workload (TPC-C derivate) working with PostgreSQL using C stored functions and libpq. I'd love to get some feedback. I'm confused. Jenny Zhang just announced OSDL-DBT3 for Postgres; is this a

Re: [GENERAL] OSDL DBT-2 for PostgreSQL

2003-08-01 Thread Rod Taylor
On Fri, 2003-08-01 at 20:32, Mark Wong wrote: On Fri, Aug 01, 2003 at 05:05:18PM -0700, Josh Berkus wrote: Mark, I've just got our DBT-2 workload (TPC-C derivate) working with PostgreSQL using C stored functions and libpq. I'd love to get some feedback. I'm confused. Jenny

Re: [GENERAL] CREATE TABLE with a column of type {table name}

2003-08-01 Thread Tom Lane
elein [EMAIL PROTECTED] writes: IMNSHO a type is a type is a type. An instance of anytype can go in a column. However, having worked in some of the code to make this recursive definition work correctly I understand your No! Never! response. I don't agree, with it, but I understand it :-)

Re: [GENERAL] Monthly table partitioning for fast purges?

2003-08-01 Thread Martijn van Oosterhout
On Fri, Aug 01, 2003 at 01:46:54PM -0700, Roger Hand wrote: We are moving an application from Oracle 8i to Postgres and I've run into a problem attempting to duplicate a feature we currently use. In Oracle you can divide a table into partitions. We use this feature to break up the data by

[GENERAL] Using contrib/fulltext on multiple tables.

2003-08-01 Thread Eric Johnson
I am running into a problem with using contrib/fulltext on several tables. Here's the details... I have one sql script which drops everything and recreates the database structure, then populates it with some test data. In this script I create tables a,b and c and setup the triggers for fulltext

Re: [GENERAL] last inserted raw (identity)

2003-08-01 Thread Martijn van Oosterhout
On Fri, Aug 01, 2003 at 04:25:05PM -0700, b b wrote: Is there an environment variable that returns the primary key of the last inserted row. This is usefull if you insert a rwo and need the primary key to insert it into another table as a foreign key. In MS-SQL that is equivalent to

Re: [GENERAL] last inserted raw (identity)

2003-08-01 Thread Ron Johnson
On Fri, 2003-08-01 at 22:27, Martijn van Oosterhout wrote: On Fri, Aug 01, 2003 at 04:25:05PM -0700, b b wrote: Is there an environment variable that returns the primary key of the last inserted row. This is usefull if you insert a rwo and need the primary key to insert it into

Re: [GENERAL] plPHP -- sort of an announcement.. but not commercial

2003-08-01 Thread Alvaro Herrera
On Fri, Aug 01, 2003 at 05:06:00PM -0700, Joshua D. Drake wrote: Hello, As a recent flurry of activity has commenced within Command Prompt we have released upon this rather unround earth, plPHP. Yes it is trigger safe, yes you can write UDF's in PostgreSQL with PHP now. Very nice. Is

Re: [GENERAL] Using contrib/fulltext on multiple tables.

2003-08-01 Thread Tom Lane
Eric Johnson [EMAIL PROTECTED] writes: I am running into a problem with using contrib/fulltext on several tables. That sounds awfully weird. Could we see a complete, reproducible example? And what PG version are you using, anyway? (Might be better to continue this on pgsql-bugs than

Re: [GENERAL] last inserted raw (identity)

2003-08-01 Thread Martijn van Oosterhout
On Fri, Aug 01, 2003 at 10:43:03PM -0500, Ron Johnson wrote: On Fri, 2003-08-01 at 22:27, Martijn van Oosterhout wrote: On Fri, Aug 01, 2003 at 04:25:05PM -0700, b b wrote: Is there an environment variable that returns the primary key of the last inserted row. This is usefull if

Re: [GENERAL] Using contrib/fulltext on multiple tables.

2003-08-01 Thread Eric Johnson
Sure thing, I'll get subscribed to -bugs and send it! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Tom Lane Sent: Friday, August 01, 2003 11:06 PM To: Eric Johnson Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL] Using contrib/fulltext on multiple tables.

Re: [GENERAL] last inserted raw (identity)

2003-08-01 Thread nolan
See currval() and nextval(). What if his PK isn't a sequence? Moreover, currval() and nextval() won't guarantee that you always get the most recently inserted sequence value, either, because each connection can have a cache of sequence values to assign from. While the backend guarantees

Re: [GENERAL] last inserted raw (identity)

2003-08-01 Thread Martijn van Oosterhout
On Fri, Aug 01, 2003 at 11:18:30PM -0500, [EMAIL PROTECTED] wrote: See currval() and nextval(). What if his PK isn't a sequence? Moreover, currval() and nextval() won't guarantee that you always get the most recently inserted sequence value, either, because each connection can have

Re: [GENERAL] plPHP -- sort of an announcement.. but not commercial

2003-08-01 Thread Joshua D. Drake
Hello, Well PHP is GPL... thus we left it GPL... it belongs to the community. Enjoy :) J Alvaro Herrera wrote: On Fri, Aug 01, 2003 at 05:06:00PM -0700, Joshua D. Drake wrote: Hello, As a recent flurry of activity has commenced within Command Prompt we have released upon this rather

Re: [GENERAL] plPHP -- sort of an announcement.. but not commercial

2003-08-01 Thread Joshua D. Drake
Hello, I am in final testing now, so feel free to download the static. It is a pain in the but to compile (static is Linux). By the end of the week it should be all pacakaged etc... J Gavin M. Roy wrote: This is very exciting, is this stable, production ready, etc? Gavin Alvaro Herrera

Re: [GENERAL] last inserted raw (identity)

2003-08-01 Thread nolan
In short, I think the answer to the original question is that there is no reliable way to find out what the last record inserted was. It returns the last record *you* entered. If you want the last record entered by anyone (committed ofcourse), you'd use order by x desc limit 1. I agree