[SQL] RE: [SQL] RE : [SQL] Convert text from U TF8 to ASCII

2009-03-16 Thread Paul Dam
Sebastien, I know by looking at the data using PgAdmin. Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl <http://www.amyyon.nl/> Van: pgsql-

Re: [SQL] Convert text from UTF8 to ASCII

2009-03-13 Thread Paul Dam
UTF8 Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl -Oorspronkelijk bericht- Van: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] Namens Claus Guttesen Verzonden: woensdag 11 maart

Re: [SQL] Convert text from UTF8 to ASCII

2009-03-11 Thread Paul Dam
UNICODE. Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl -Oorspronkelijk bericht- Van: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] Namens Leif B. Kristensen Verzonden: woensdag

[SQL] Convert text from UTF8 to ASCII

2009-03-11 Thread Paul Dam
before insert or when selecting? Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl <http://www.amyyon.nl/> <>

Re: [SQL] wired behaviour

2008-11-28 Thread Paul Dam
NULL values? Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Lutz Steinborn Verzonden: vrijdag 28 november 2008 14:52 Aan

Re: [SQL] BULK COLLECT

2008-11-24 Thread Paul Dam
Scott and others, The following article by Steven Feuerstein from 2004 explains it quite clear, I think. http://www.oracle.com/technology/oramag/oracle/04-jan/o14tech_plsql.html Paul Dam -Oorspronkelijk bericht- Van: Scott Marlowe [mailto:[EMAIL PROTECTED] Verzonden: vrijdag 21

[SQL] BULK COLLECT

2008-11-21 Thread Paul Dam
Hoi, Is there an equivalent in PL/pgSQL for BULK COLLECT in PL/SQL of Oracle? Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl <http://www.amyyon.nl/> <>

Re: [SQL] cross-database references are not implemented

2008-06-03 Thread Paul Dam
Thanks Adrian, I casted a column to a type with "value::..%type" That was the problem. Met vriendelijke groet, Paul Dam -Oorspronkelijk bericht- Van: Adrian Klaver [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 3 juni 2008 15:57 Aan: pgsql-sql@postgresql.org CC: Paul Dam Ond

[SQL] cross-database references are not implemented

2008-06-03 Thread Paul Dam
export in the public table. If I do an insert I get the error message: "ERROR: cross-database references are not implemented". How can I solve this? Met vriendelijke groet, Paul Dam

Re: [SQL] Asking GO on SQL SERVER

2008-04-02 Thread paul rivers
Otniel Michael wrote: Hi All.. Anybody knows what is "GO" (SQL Server) on Postgres? Thanks. -- --- "He who is quick to become angry will commit folly, and a crafty man is hated" semi-colon. -- Sent via pgsql-sql mailing lis

Re: [SQL] Create on insert a unique random number

2008-03-18 Thread paul rivers
do to make the serial number random? Thanks, Why do you want a random number? Would a guid work? Paul -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] JOIN a table twice for different values in the same query

2008-01-10 Thread Paul Lambert
Colin Wetherbee wrote: Greetings. I have two tables I'm having a little trouble figuring out how to JOIN. One contains a list of airports along with their IATA codes, cities, names, and so forth. This table also contains an id column, which is a serial primary key. The other table contains

Re: [SQL] Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...)

2008-01-10 Thread Paul Lambert
Ken Johanson wrote: Interesting thread(s)! What I didn't see discussed was the possibility of making a server and/or session option, where we could elect to turn-off the old behavior (PG specific behavior) and enable the standard/shorthand syntax. Users need a migration path. I personally c

Re: [SQL] Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...)

2008-01-09 Thread Paul Lambert
Ken Johanson wrote: I notice PG doesn't allow shorthand column labels -- it requires the 'AS' operand. SELECT col1 foo, ...; -> ERROR: syntax error at or near "foo" For compatibility with other databases, what objections might be argued in allowing this syntax in the future? On the 'pros' s

Re: [SQL] Query design assistance - getting daily totals

2007-12-11 Thread Paul Lambert
A. Kretschmer wrote: am Wed, dem 12.12.2007, um 10:34:35 +0900 mailte Paul Lambert folgendes: year_id integer month_id integer working_day integer Why this broken data types? We have date and timestamp[tz]. It's a financial application which needs to work using a concept of '

Re: [SQL] Function result using execute

2007-12-11 Thread Paul Lambert
t would be an issue. Having the test at is not null seems to be doing the job. Thanks. -- Paul Lambert Database Administrator AutoLedgers - A Reynolds & Reynolds Company ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ign

[SQL] Function result using execute

2007-12-11 Thread Paul Lambert
XECUTE command and should therefore I just be using a test of IF curr_amount IS NOT NULL? Cheers, Paul. -- Paul Lambert Database Administrator AutoLedgers - A Reynolds & Reynolds Company ---(end of broadcast)--- TIP 1: if posting/reading t

[SQL] Query design assistance - getting daily totals

2007-12-11 Thread Paul Lambert
anyone have any alternate suggestions that would be better still? Cheers, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Select into with dynamic criteria in a plpgsql function

2007-10-28 Thread Paul Lambert
Paul Lambert wrote: I've got a function defined in PL/PgSQL to update some fields in a record where the criteria for pulling out some other values from a table is dynamic. I define a string called account_criteria to which I assign a normal SQL WHERE clause based on some work done earli

[SQL] Select into with dynamic criteria in a plpgsql function

2007-10-28 Thread Paul Lambert
um. :( Can anyone offer some suggestion(s) on how can I make my function behave? Non-violent suggestions would be preferable. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Quick question re foreign keys.

2007-10-24 Thread Paul Lambert
Paul Lambert wrote: It's marked not null as a result of being part of the primary key for that table which I can't really get around. I can get away with not having the foreign key though, so I'll have to go down that path. Cheers, P. Ignore this whole thread actua

Re: [SQL] request for help with COPY syntax

2007-10-24 Thread Paul Lambert
quotes will be loaded with those quote characters in the string. Something similar may help with your case. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] Quick question re foreign keys.

2007-10-23 Thread Paul Lambert
wn that path. Cheers, P. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

[SQL] Quick question re foreign keys.

2007-10-23 Thread Paul Lambert
key that is conditional, i.e. only enforce the foreign key where the value in that table is not null. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Extracting hostname from URI column

2007-09-16 Thread Paul Lambert
Paul Lambert wrote: chester c young wrote: I'm trying to use substr() and position() functions to extract the full host name (and later a domain) from a column that holds URLs. substring( href from '.*://\([^/]*)' ); Ok, your solution looks better than mine... but I have

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
Paul Lambert wrote: Just use distinct... test=# select distinct count(*),substring( href from '.*://([^/]*)' ) as domain from url group by domain order by domain; OK so distinct was redundant there... it gives the same results without it. AutoDRS=# select count(*) as occurances

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
1 | dictionary.reference.com 2 | forums.mozillazine.org 1 | groups.google.com 4 | texturizer.net 11 | www.google.com 2 | www.mozillazine.org (7 rows) -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
looking for) ... and everything AFTER a slash will be omitted. Cheers, Andrej Thanks - that makes a bit more sense. I'm in the middle of reading chapter 9.3.7 of the manual - POSIX Regular Expressions - which I'm assuming is dealing with this, so it's looking clearer. -- Paul L

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
t that, time to consult some manuals. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Extracting hostname from URI column

2007-09-11 Thread Paul Lambert
le.com | http://www.google.com/search?q=%s&btnI=I'm+Feeling+L ucky dictionary.reference.com | http://dictionary.reference.com/search?q=%s (10 rows) -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Re: [SQL] Implementing an regex filter

2007-08-08 Thread Paul Lambert
Enrico Weigelt wrote: Hi folks, Any hints for futher optimization appreciated :) thx It doesn't look like you have any indexes - I'd add one to at least articles.title and blacklist.title to start with and probably also user_results.article_id and articles.inode_id. -- Pa

[SQL] Count of rows

2007-08-02 Thread Paul Lambert
ves a count of 1 for each table in the public schema. Can it be done or would I have to write a function? -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropr

Re: [SQL] Join question

2007-07-26 Thread Paul Lambert
done it for me again Phillip, thanks. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

[SQL] Join question

2007-07-26 Thread Paul Lambert
customeritem amount line | abc 457ABC 10.00 sundry| abc FREIGHT 5.00 line | abc FGOIL 15.00 What would be the best method of joining to create a result-set such as this? TIA for any assistance, P. -- Paul

Re: [SQL] Assistance with a trigger

2007-07-25 Thread Paul Lambert
EDURE fn_update_so_tran(); I'm liking PostgreSQL more and more with each new thing I try :) Thanks muchly. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by dona

[SQL] Assistance with a trigger

2007-07-25 Thread Paul Lambert
d give me a starting point that would be highly appreciated. Cheers, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Re: [SQL] Using escape strings in an insert statement.

2007-07-02 Thread Paul Lambert
Michael Glaesemann wrote: On Jul 2, 2007, at 17:45 , Paul Lambert wrote: tester=# insert into testing (test_text) values ('abcE'\\'123'); This should be INSERT INTO testing (test_text) values (E'abc\123'); The help itself (ch 4.1.2.1) tells me to use double

[SQL] Using escape strings in an insert statement.

2007-07-02 Thread Paul Lambert
er, write two backslashes (\\). " Which one is the correct syntax and how can I make it not return anything other than a successful insert? Noob question, I know... But TIA. (Version is 8.2.3 on Weenblowz if that is of any relevance) -- Paul Lambert Database Administrator AutoLedgers ---

Re: [SQL] ignoring primary key violations in COPY command

2007-05-19 Thread Paul Lambert
elds in the destination table. If your record length in the load file is going to vary you may need to consider writing a program to read the data from the file and load it in. Regards, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)

Re: [SQL] pg_dump?

2007-05-14 Thread Paul Lambert
SERT INTO statements whereas copy will give you a flat delimited file. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command t

[SQL] Passing input to a view?

2007-05-09 Thread Paul Lambert
27;t find anything in the documentation that answers this, but maybe I'm not looking hard enough. Thanks in advance. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please se

Re: [SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
onto my side in the near future, just looking for a workaround until then. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Re: [SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
icularly if it is only one or two columns in each table that that the client doesn't need. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

[SQL] Query RE using COPY

2007-05-07 Thread Paul Lambert
bad design for a database, but we'll skip that point for now) thus I am not concerned if the load procedure doesn't supply it. BTW, this is done on Weendoze. Thanks, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)-

Re: [SQL] Windows postgres

2007-04-22 Thread Paul Lambert
Senthil wrote: Respected sir/madam, Please can you send me link of windows postgres sql download page. thanks senthil ---(end of broadcast)--- TIP 6: explain analyze is your friend http://www.postgresql.org/ftp/binary/v8.2.4/win32/ -- Paul

Re: [SQL] Moving a simple function to pl/pgsql (Novice question)

2007-04-04 Thread Paul Lambert
Richard Broersma Jr wrote: --- Paul Lambert <[EMAIL PROTECTED]> wrote: The purpose being when a row in a table in one database is updated, it will copy (or replicate I guess) the record into a different table into another database in the same server. (deleting said record first if it a

[SQL] Moving a simple function to pl/pgsql (Novice question)

2007-04-03 Thread Paul Lambert
ns or rules yet. :-) (BTW: No I am not trying to get someone to do my work for me :-P - I have about 30ish triggers of various nature to convert, I just need somewhere to start so I can figure out how it's done then I can do the rest myself) TIA, P. -- Paul Lambert D

Re: [SQL] Issue with copying data from a text file.

2007-03-19 Thread Paul Lambert
racter to form-feed which is not going to appear in the file and that appears to do the trick without any changes to the source file. Thanks, P. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 7: You can help support

Re: [SQL] Issue with copying data from a text file.

2007-03-19 Thread Paul Lambert
Andrej Ricnik-Bay wrote: On 3/20/07, Paul Lambert <[EMAIL PROTECTED]> wrote: The source file comes from extracts on our main application which sits inside an in-house pretending-to-be-a-dbms file system. The content of these extracts would be difficult to change - the extract program

Re: [SQL] Issue with copying data from a text file.

2007-03-19 Thread Paul Lambert
tten would require a few dozen lines of code to each extract, and theres about 40ish extracts. Plus I don't maintain that side of our code, and those that do can be a bit lazy and I'd likely be waiting months to get it done - if they even decide to do it. -- Paul Lambert Database Admin

[SQL] Issue with copying data from a text file.

2007-03-19 Thread Paul Lambert
e any way to get a copy to have no quote character? I.e. read the file and put whatever is between the caret characters straight into the appropriate field exactly as is. TIA, Paul. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)---

Re: [SQL] COPY FROM query.

2007-02-11 Thread Paul Lambert
re the O/S gets to deal with it :) -p OK, that makes sense, cheers for the help. -- Paul Lambert Database Administrator AutoLedgers ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] COPY FROM query.

2007-02-11 Thread Paul Lambert
Joe wrote: Hi Paul, On Mon, 2007-02-12 at 08:19 +0900, Paul Lambert wrote: I'm attempting to copy from a table into a file using a select query inside the copy. The following is my command: COPY (SELECT DISTINCT ON (dealer_id,appraisal_id) * FROM appraisals_temp)

Re: [SQL] COPY FROM query.

2007-02-11 Thread Paul Lambert
An INSERT INTO will fix my problem with needing the extra copy from and copy to. I'm still curious as to why i was being told I couldn't specify a relative path though. P. -- Paul Lambert Database Administrator AutoLedgers ---(end of

[SQL] COPY FROM query.

2007-02-11 Thread Paul Lambert
CSV HEADER; COPY appraisals FROM 'c:\autodrs_appraisal_new.txt' WITH DELIMITER AS '^' CSV HEADER; I'd be greatful if anyone could explain why my copy to does not work, also greatful if anyone can offer any suggestions on a better way to do what I am doing (if such a w

Re: [SQL] Removing duplicate rows

2007-02-06 Thread Paul Lambert
Andrew Sullivan wrote: On Wed, Feb 07, 2007 at 07:15:02AM +0900, Paul Lambert wrote: I'm assuming the best way to get around this is to load the data into a temporary table with "copy from" and then do a "select distinct into" my real table. You might find that

[SQL] Removing duplicate rows

2007-02-06 Thread Paul Lambert
definition of a table. Apologies if this is a stupid question, I'm still fairly new to Postgres so I'm not sure what system tables are available for pulling out this kind of information. Thanks in advance for any assistance you can offer. Regards, Paul. -- Paul Lambert Databa

Re: [SQL] Changing character set when the damage is done

2006-12-24 Thread Alexis Paul Bertolini
Michael Fuhr wrote: Are you sure that's not a tilde (a wavy line above the A) instead of a cedilla (a hook below the A)? The UTF-8 encoding for lowercase e with grave is 0xc3 0xa8, which in ISO-8859-1 (LATIN1) or Windows-1252 is uppercase A with tilde followed by a diaeresis (an umlaut on its ow

Re: [SQL] Changing character set when the damage is done

2006-12-24 Thread Alexis Paul Bertolini
Ragnar wrote: On lau, 2006-12-23 at 00:12 +0100, Alexis Paul Bertolini wrote: depends on whether all imports have been in the same encoding or not. SQL_ASCII basically accepts and stores the characters without interpretation, so if all imorts were done with one client_encoding, you should

[SQL] Changing character set when the damage is done

2006-12-22 Thread Alexis Paul Bertolini
Dear all, I set up a DB with default values and it now uses the SQL_ASCII character set (as per "show client_encoding;"). I have copied in quite a lot of data from various Access databases but only now have I realized that all accented vowels show up differently from what I expected (I dare

[SQL] Crosstab question

2006-10-22 Thread Leendert Paul Diterwich
prijs from artcredinkoopprijzen where int_crednr = 2 OR int_crednr = 3') as c(int_artnr integer, supp1 float4, supp2 float4);    Am I doing something wrong or is this a limitation of the function?   With kind regards,   Paul     

Re: [SQL] age() vs. timestamp substraction

2006-10-06 Thread Jean-Paul Argudo
mer's (bad) code :-) Cheers, -- Jean-Paul Argudo www.PostgreSQLFr.org www.dalibo.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Querying for name/value pairs in reverse

2006-07-15 Thread Paul S
ble had to include the foreign key called ErrorID that actually relates to attribute ID in the Errors table.  When your looking at miles and miles of code or reviewing JOIN syntax " a.ID = b.ErrorID" sometimes it's easier to validate if it looks like this. "a.ErroID = b.ErrorI

[SQL] Update Problem

2006-06-05 Thread Christian Paul Cosinas
Hi,   I’m encountering some weird problem on Update.   I have a program that updates a table and it updates more than 1 column at a single query. Like this one:   Update table1 set column1 = ‘a’, column2 = ‘b’, column3 = time ’08:00 AM’ where column1 = ‘c’   Sometimes only column1

Re: [SQL] PL/PGSQL - How to pass in variables?

2006-05-14 Thread Jean-Paul Argudo
Scott Yohonn wrote: > Jean-Paul, > > Thanks! This did work. The output put the name of the function > (get_table_count) as the header. How would I display the name of the table > that I am requesting the row count of? The only way I know is to alias the output in the query calli

Re: [SQL] PL/PGSQL - How to pass in variables?

2006-05-14 Thread Jean-Paul Argudo
e 'SELECT count(*) FROM '||tablename into rowcount; return rowcount; END; $$ LANGUAGE 'plpgsql'; select get_table_count('bar'); get_table_count - 3 (1 row) Cheers, -- Jean-Paul Argudo www.PostgreSQLFr.org www.dalibo.com

[SQL] ORDER BY question

2006-05-10 Thread Christian Paul Cosinas
Hi, For example I have a table like this ID Name 1 A 1 B 2 C 2 D And I have a Query like this: SELECT * FROM table ORDER BY ID. Would my result always give me the same order or is there may be a possible different result? For example? 1 B 1 A 2 D

Re: [SQL] set return function is returning a single record, multiple

2006-04-28 Thread Alexis Paul Bertolini
CREATE or replace FUNCTION ftoc9() RETURNS setof structrankmaster2 LANGUAGE 'plpgsql' AS' DECLARE rowdata pss%rowtype; BEGIN for i in 1..3 loop select * into rowdata from pss ; return next rowdata ; end loop; return; end'; The query should be outside the loop, otherwise you are re

[SQL] Programatically Backup Database Using Visual Basic

2006-04-19 Thread Christian Paul B. Cosinas
Hi is there a way wherein I can interface the pg_dump of PostgreSQL Server in Visual basic. I mean for example I want to backup Databases "DB1", "BD12", "DB3" using pg_dump Thank You, Ian I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html ---

[SQL] References NULL field

2006-04-02 Thread Paul M Foster
FROM registrars, notes WHERE regname = 'blah' no matter that I put after the 'blah' (or nothing), I get no results. As soon as I add notes into the tables being queried, I get nothing. There's some special way I need to shape this query, but I don't know what it is. Any

Re: [SQL] Function Parameters in GROUP BY clause cause errors

2006-03-22 Thread Christian Paul B. Cosinas
Title: Function Parameters in GROUP BY clause cause errors Just Put aggregate function to the fields you selected. Like this:   select to_char(to_timestamp(EXTRACT(HOUR FROM max(em.email_creation_datetime)) || ':' || (EXTRACT(MINUTE FROM max(em.email_creation_datetime))::integer/30) * 30

[SQL] Job queue, how would you implement this?

2006-03-21 Thread Alexis Paul Bertolini
Dear all, I have implemented a job queue table where various apps can add jobs to the queue and other daemons then execute them. A basic producer-consumer pattern. Each tuple in the queue has the basic info such as job to be done, when it should be done, who should do it, a flag marking it com

Re: [SQL] PostgreSQL Handling of Special Characters

2006-03-19 Thread Christian Paul B. Cosinas
Hi Markus, Can you please elaborate more on this. I'm really lost. Thank You So Much. -Original Message- From: Markus Bertheau [mailto:[EMAIL PROTECTED] Sent: Sunday, March 19, 2006 8:09 PM To: Christian Paul B. Cosinas Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] PostgreSQL Han

[SQL] PostgreSQL Handling of Special Characters

2006-03-19 Thread Christian Paul B. Cosinas
Hi to all, I am currently using PostgreSQL 8.0.3 My Database uses SQL_ASCII encoding. I have a program in Visual Basic that connects to PostgreSQL using ODBC Connection through File DSN. I insert a text in one fields of my table. For example, I insert a special character to that field. Let's s

Re: [SQL] connectby documentation

2006-03-14 Thread Jean-Paul Argudo
onvinced this method is the best so far. I used it in 3 different projects where I had to implement big trees structures on a table. They all still work with no problem of any kind. Just to let you know in case you missed that ;-) My 2 ¢ -- Jean-Paul Argudo www.Argudo.o

[SQL] Constraint Error effect on PostgreSQL

2006-03-13 Thread Christian Paul B. Cosinas
Hi Fellow PostgreSQL users, Just a question here. Is there any bad effect on the PostgreSQL performance If I encounter many fails on inserting records to database with primary key column. For example I have this table CREATE TABLE unique_items ( item_id text NOT NULL, CONSTRAINT unique_item

Re: [SQL] Obtaining client IP address

2006-02-25 Thread Alexis Paul Bertolini
Michael Fuhr wrote: On Sat, Feb 25, 2006 at 12:16:31AM +0100, Alexis Paul Bertolini wrote: The client has no idea what public IP it has. The server ought to know... however I haven't found how I could get this info into my query. What version of PostgreSQL are you running? In 8.

[SQL] Obtaining client IP address

2006-02-24 Thread Alexis Paul Bertolini
Hi, I need to have a db table containing all connected clients (of a distributed application) and among other info, their IP. If both the client and the server are on the same LAN, no problem, the client can supply it's own info. But if they are connected via some sort of bridge/router/NAT?

Re: [SQL] Characters that needs escape characters when inserting to database

2006-01-17 Thread Christian Paul B. Cosinas
- From: Michael Fuhr [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 17, 2006 9:57 AM To: Michael Glaesemann Cc: Christian Paul B. Cosinas; pgsql-sql@postgresql.org Subject: Re: [SQL] Characters that needs escape characters when inserting to database On Tue, Jan 17, 2006 at 04:20:23PM +090

[SQL] Characters that needs escape characters when inserting to database

2006-01-16 Thread Christian Paul B. Cosinas
Hi, Can anyone give me a list of characters that needs to be preceded by an escape character before inserting to database. Aside from characters listed below what are the other characters? "\" "'" Thanks I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html

Re: [SQL] Problem with "NOT IN (subquery)

2005-11-13 Thread Christian Paul B. Cosinas
I think that query should work. Hmmm... Weird... I tried that in my database and it is working. What do you mean by this? " If i use a list instead of a subquery it works normaly but it's not easy to manage it like this." -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

Re: [SQL] How to speed up the database query?

2005-10-27 Thread Christian Paul B. Cosinas
Of course as long as your table increases its records, the longer will take your query. I think what you want is to minimize the run time even though you have large tables. You should fine tune your database server (which I am still looking for the best configuration for my server haha). And get t

[SQL] SETOF RECORD RETURN VALUE

2005-10-26 Thread Christian Paul B. Cosinas
Hi I am having some problem with function that returns SETOF RECORD Here is my function: CREATE OR REPLACE FUNCTION test_record(text) RETURNS SETOF RECORD AS $BODY$ DECLARE p_table_name ALIAS FOR $1; temp_rec RECORD; v_query text; BEGIN v_query = 'SELECT * FROM ' || p_table_name; FOR temp_

[SQL] How to know a temp table exists ?

2005-02-08 Thread Antony Paul
Hi all, If using a connection pool how to know a temp table exists ? rgds Antony Paul ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

[SQL] Maximum length of a query

2005-02-08 Thread Antony Paul
Hi all, What is the maximum length allowed for a query in PG 7.3.3 ?. I need arbitrarily long queries to be executed through JDBC. rgds Antony Paul ---(end of broadcast)--- TIP 8: explain analyze is your friend

[SQL] Can tsearch replace ilike queries ?

2005-02-08 Thread Antony Paul
Hi all, I read in another thread about using tsearch for ilike queries. My question is can it rprovide the full ilike functionality with a better performance than ilike ?. rgds Antony Paul ---(end of broadcast)--- TIP 8: explain analyze is your

Re: [SQL] Doubt

2004-09-28 Thread Paul Thomas
; language. When i select 'pgsql' as language for creating query, an error poping up. How to create Query using 'pgsql' language. if any new tools need to be installed. Plz rectify. Mail me back at [EMAIL PROTECTED] I bet you haven't enabled pl/pgsql use create

[SQL] v7.2 triggers and foreign keys

2004-05-20 Thread Paul Gimpelj
with these tables.   Thanks. paul  

Re: [SQL] \D TO FILE

2004-05-03 Thread Paul Thomas
On 03/05/2004 12:49 Eric Anderson Vianet SAO wrote: How could I record the ´ \d table ´ command to a file? \o file HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for Business

Re: [SQL] Performance issue

2004-04-27 Thread Paul Thomas
the number of dead tuples you are trying to reclaim so the vacuum is not clearing all the dead stuff out. There's plenty of stuff about this in the archives and the docs. -- Paul Thomas +--+-+ | Thomas Micro Systems Li

Re: [SQL] problem porting MySQL SQL to Postgres

2004-04-18 Thread Paul Thomas
On 18/04/2004 19:37 Markus Bertheau wrote: В Чтв, 15.04.2004, в 13:15, Paul Thomas пишет: > On 15/04/2004 11:25 Dan Field wrote: > Your "= NULL" tests are also not valid SQL (should be IS NULL). I think = NULL _is_ valid SQL, it just doesn't do what you think. It's valid

Re: [SQL] problem porting MySQL SQL to Postgres

2004-04-15 Thread Paul Thomas
d comparison according to the SQL specs. You need to use the SQL OR operator e.e., (DEWEY_POINT_TENS = 0 OR DEWEY_POINT_TENS = NULL) AND ~~ Your "= NULL" tests are also not valid SQL (should be IS NULL). MySQL does not follow the specs in a number or areas. PostgreS

Re: [SQL] partial unique constraint

2004-04-06 Thread Paul Thomas
retty sure I could do this with an external trigger, but am wondering about a constraint oriented approach What about create table foo (bar integer, baz boolean); create unique index foo_bar_baz on foo(bar, baz) where baz = true; -- P

Re: [SQL] how to turn off autocommit in psql

2004-03-26 Thread Paul Thomas
On 26/03/2004 01:25 Kemin Zhou wrote: I search far and wide and found a lot of disscussions about the autocommit, but none about how to do it. After reading 50 pages, my brain is numb. Could any one give me a simple help? Thanks Kemin Use tranactions. -- Paul Thomas

Re: [SQL] Invalid Characters

2004-03-15 Thread Paul Thomas
me to my webpage while displaying. Regards Raman Garg Use UNICODE as the db encoding. You'll have to drop and re-create the db though. HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for

Re: [SQL] where not unique

2004-03-12 Thread Paul Thomas
Something like select regno from mytable group by regno having count(stockno) > 1; might do it. HTH -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultant

Re: [SQL] Index not used - now me

2004-02-09 Thread Paul Thomas
e. How many rows are there in the table? -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-mic

Re: [SQL] Index not used - now me

2004-02-09 Thread Paul Thomas
PG doing a seqscan if there's no alternative plan. All set enable_seqscan = false does is make a seqscan appear very expensive so that the planner is less likely to pick it. HTH -- Paul Thomas +--+-+ | Thomas M

[SQL] SQL query

2004-02-03 Thread Paul Czubilinski
ing record should be choosed: sample | 2003-05-16 11:10:15 | en (it has mofication date later then record with id = sample and lang_id = pl) If you have any idea how to make SQL query for this, please help me. Thanx, Paul Czubilinski ---(end of broadcast)-

Re: [SQL] Help! Error with postgresql!

2004-02-01 Thread Paul Hart
Would you mind telling us what's in your SQL file? it seems that there's a problem in it. On 28 Jan 2004, at 05:12, [EMAIL PROTECTED] wrote: Hello, I have problem when i execute the .sql file in my psql command prompt. The error code is below: pylori=# \i log-clinique.sql CREATE psql:log-cliniqu

  1   2   >