[SQL] copy into serial field with auto_increment

2001-04-19 Thread Andy
ent the serial field. I come from mysql and pushed a 0 into the serial field. But it doesn't work. I tested it with an empty field, but it failed to. How could i make it work ?? Thanx for every help -- Andy - Kim Möller Leiter Lastminute / Pauschal - Deutschland ypsilon.net AG Leiter Entwick

Re: [SQL] Create trigger for auto update function

2005-07-19 Thread Andy
CREATE FUNCTION update_pass() RETURNS integer AS $$ UPDATE hoy SET pass_md5=md5(pass) WHERE id=new.id; SELECT 1; $$ LANGUAGE SQL; CREATE TRIGGER triger_users_pass_md5 AFTER INSERT OR UPDATE ON hoy FOR EACH ROW EXECUTE PROCEDURE update_pass; I understand the ideea, but don't know ho

Re: [SQL] Create trigger for auto update function >> SOLVED!!!

2005-07-19 Thread Andy
Took some time to figure it out. (ignore the function names --- test functions) Best regards, Andy. - Original Message - From: "daq" <[EMAIL PROTECTED]> To: "Andrei Bintintan" <[EMAIL PROTECTED]> Cc: Sent: Monday, July 18, 2005 4:32 PM Subject: Re: [SQ

Re: [SQL] Create trigger for auto update function

2005-07-19 Thread Andy
Off topic :) I think we posted in the same time :)) - Original Message - From: "Richard Huxton" To: "Andrei Bintintan" <[EMAIL PROTECTED]> Cc: Sent: Tuesday, July 19, 2005 12:11 PM Subject: Re: [SQL] Create trigger for auto update function Andrei Bintintan wrote: Now, I want to w

[SQL] Strange join...maybe some improvements???

2005-10-12 Thread Andy
le information(the same o.id) in the situation in which the o.id_ag and m.id_hersteller are different, but still both in the AG_LIST.     Is there any way to speed up this query???   Regards, Andy.

Re: [SQL] Strange join...maybe some improvements???

2005-10-13 Thread Andy
Indexes are on all join fields. In the shown example on all fields I have indexes.   Yes I vacuum the database regulary.   Andy.   - Original Message - From: Thomas F. O'Connell To: Andy Cc: pgsql-sql@postgresql.org Sent: Thursday, October 13, 2005 7:58

[SQL] plpgsql record as parameter ???

2006-10-18 Thread Andy
d');   WARNING:  value = 504   ERROR:  type of "rec.xx" does not match that when preparing the planCONTEXT:  PL/pgSQL function "zahlavis_rech_list" line 14 at assignment   EXECUTION ERROR!   Both id, and nummer are columns from the table.   I tried different solutions but no result.   Help && regards, Andy.

Re: [SQL] Re: Still don't know how to build this string ? how to concat ??

2001-03-27 Thread Andy Corteen
adding to it with each iteration of the "for loop". Would: ... list := list || ',' || text(rec.z_u_umfang) ... be what your solution is missing? -- Best regards, Andymailto:[EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Re: Still don't know how to build this string ? how to concat ??

2001-03-27 Thread Andy Corteen
Hello Andy, Tuesday, March 27, 2001, 3:22:37 PM, you wrote: AC> Tuesday, March 27, 2001, 10:20:18 AM, you wrote: jrpc>> jrpc>> Result: jrpc>> 01 1440 jrpc>> 02 1460 jrpc>> 03 1398 jrpc>> The values (1440, ...) are the last entries of z_u_umfang f

Re: [SQL] getting some tech skills?

2001-09-27 Thread Andy Hibbins
pplications will earn the most > money but I prefer playing with hardware instead of typing at a > workstation all day. > It looks like I'll be getting up to speed with the above mentioned scripting langurages. Thanks Larry Andy H ---

Re: [SQL] [OT] Inventory systems (private)

2002-12-03 Thread Andy Tawse
While I'm not expert what I would do is something like this Items table fields: item_id item_name Attributes table fields: attribute_id attribute_name Item_Attr table fields: item_id attribute_id attribute_value Now an item can be associated with any number of attributes. 03/12/2002 13:17

[SQL] function replace doesnt exist

2002-12-12 Thread Andy Morrow
Hi im trying to execute an update command on a postgresql DB table using pgAdmin II im using the following statement UPDATE commandlist SET command = REPLACE (command,'A','B') commandlist is the table name command is the column and i want to change the value A to B but it's giving me the fol

[SQL] Point and function help

2003-12-25 Thread Andy Lewis
43.0718,70.7634)   And nothing returned but an empty row:   my_db=# select public.map_point('portsmouth','nh','00211'); map_point --- (1 row)     I'm running 7.3.x on Slackware.   Any ideas why this is happening?   Thanks,   Andy

Re: [SQL] Point and function help

2003-12-25 Thread Andy Lewis
Thanks Tom, worked like a charm. Appreciate your time on Christmas day! Best Regards and Merry Christmas to all. Andy -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Thursday, December 25, 2003 10:44 AM To: Andy Lewis Cc: [EMAIL PROTECTED] Subject: Re: [SQL] Point

[SQL] Radius of a zip code

2003-12-26 Thread Andy Lewis
k:   -- 20 Miles --select 20 * 360.0 / (7900.0 * atan2(1,1) * 4.0);select * from zip_code where map_loc @ circle(map_point('dallas','tx','75201'), .290105212724467 ) order by city   Anyone that has this experience, can you validate this for correctness?   Thanks in advance,   Andy

Re: [SQL] Radius of a zip code

2003-12-27 Thread Andy Lewis
Thanks All for your suggestions, I have enough information to construct what I need. -Original Message- From: Michael Fuhr [mailto:[EMAIL PROTECTED] Sent: Friday, December 26, 2003 8:43 PM To: Andy Lewis Cc: [EMAIL PROTECTED] Subject: Re: [SQL] Radius of a zip code On Fri, Dec 26, 2003

Re: [SQL] postgreSQL editors

2003-12-31 Thread Andy Lewis
I would have to agree with EMS-HiTech's product also. A feature rich, product, very responsive tech support/bug report. PGManager beats the competition hands down. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich Hall Sent: Wednesday, Dec

[SQL] sort by on two columns

2004-01-02 Thread Andy Lewis
).   Is this possible?   Thanks,   Andy

Re: [SQL] sort by on two columns

2004-01-02 Thread Andy Lewis
Hi Michael, Yes, I understand this but, I would like to have the results of both "table1.name, table2.name" sorted as one column. Is this possible? Thanks, Andy -Original Message- From: Michael Glaesemann [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 8:40 PM To:

[SQL] sqlstate 02000 while declaring cursor/freeing prepared statements

2005-08-29 Thread andy rost
I'm new to the PostgreSQL community so please pardon what is probably a silly question. Also, this is my first attempt at posting so you might have seen this already (Sorry!) ... I'm in the process of porting Informix ESQL to PostgreSQL. I occasionally get sqlcode = 100 and sqlstate = 02000 wh

Re: [SQL] sqlstate 02000 while declaring cursor/freeing prepared

2005-08-29 Thread andy rost
nds of commands. Thanks ... Andy Michael Fuhr wrote: On Mon, Aug 29, 2005 at 02:28:24PM -0500, andy rost wrote: I'm in the process of porting Informix ESQL to PostgreSQL. I occasionally get sqlcode = 100 and sqlstate = 02000 when declaring cursors or freeing prepared statements. Is this

Re: [SQL] sqlstate 02000 while declaring cursor/freeing prepared

2005-08-29 Thread andy rost
o 0 before calling the declare statement, the declare statement works fine. It appears as though the declare statement is not updating the sqlca structure. Is this by design for the ecpg options that I'm using? Did I pick up bad habits while using Informix? Thanks ... Andy andy rost w

Re: [SQL] sqlstate 02000 while declaring cursor/freeing prepared

2005-08-30 Thread andy rost
Just so that we can snip this thread, we've confirmed that free cursor and free statement do not affect sqlca structure elements sqlcode and sqlstate. Michael Fuhr wrote: On Mon, Aug 29, 2005 at 04:39:36PM -0500, andy rost wrote: I worked on my problem a little further and have a little

[SQL] Using descriptor areas to insert

2005-09-22 Thread andy rost
I'm in the final stages of porting a large body of ESQL software from Informix to PostgreSQL (V8). The last few Informix-based functions involve Informix descriptor areas to insert rows into a table. I've sorted out the logic for using PostgreSQL descriptor areas for select statements. How do y

[SQL] idea for a geographically distributed database: how best to implement?

2005-11-17 Thread Andy Ballingall
scheme is that if I can distribute my application over large numbers of small servers, I'll end up with more bangs for the buck, and it'll be much easier to manage growth by managing the number of servers, and number of cells hosted on each server. Thanks for any suggestion

Re: [SQL] idea for a geographically distributed database: how best to implement?

2005-11-17 Thread Andy Ballingall
Unlike many data sets, mine is almost totally partitioned geographically. There is only *one* little detail - that of visibility of data in neighbouring cells, and that is sorted out with my idea of duplicating information between neighbours. Hope that fills in some gaps... Thanks for your c

Re: [SQL] idea for a geographically distributed database: how best

2005-11-17 Thread Andy Ballingall
>Andy, i agree with what codeWarrior says. But if you are interested in replication, dbmirror is very elegant (altho not as trendy) simple, and highly customizable replication solution. I have heavily modified dbmirror to even support Asynchronous Conditional row grained Foreign

Re: [SQL] idea for a geographically distributed database: how best to implement?

2005-11-18 Thread Andy Ballingall
st to node local storage and thence to safer, remote storage) Cheers, Andy - -Original Message- From: Aidan Van Dyk [mailto:[EMAIL PROTECTED] Sent: 17 November 2005 19:54 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: idea for a geographically distributed database: how bes

[SQL] idea for a geographically distributed database: how best to implement?

2005-11-18 Thread Andy Ballingall
if I can distribute my application over large numbers of small servers, I’ll end up with more bangs for the buck, and it’ll be much easier to manage growth by managing the number of servers, and number of cells hosted on each server.   Thanks for any suggestions! Andy Ballingall   'pgsq

[SQL] Is it possible to redirect an update/insert/delete to a different table?

2005-11-19 Thread Andy Ballingall
it simply substitutes the table name for a different table name before executing the command, no matter what the command looks like.   Thanks Andy Ballingall

Re: [SQL] Is it possible to redirect an update/insert/delete to a different table?

2005-11-20 Thread Andy Ballingall
Hello Peter, I'm glad it's possible, but I can't see how from the documentation. Say if I have a table called 'apples' and a table called 'pears'. What would the rule look like that would remap all updates on apples so that they were appl

Re: [SQL] Is it possible to redirect an update/insert/delete to a different table?

2005-11-20 Thread Andy Ballingall
ransparently update the pears table with whatever values happened to be defined by the original update command? Is there a special keyword that I've missed? Regards, Andy Ballingall -Original Message- From: Jaime Casanova [mailto:[EMAIL PROTECTED] Sent: 20 November 2005 14:23 To: [EMAIL

Re: [SQL] Is it possible to redirect an update/insert/delete to a different table?

2005-11-20 Thread Andy Ballingall
rules, but it may not be the case. Thanks! Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Kretschmer Sent: 20 November 2005 16:17 To: pgsql-sql@postgresql.org Subject: Re: [SQL] Is it possible to redirect an update/insert/delete to

Re: [SQL] Is it possible to redirect an update/insert/delete to a different table?

2005-11-20 Thread Andy Ballingall
nding if the table column definition later changes. (E.g. if I add 'stalk_length' to my apples and pears tables)... Thanks very much for your help. Andy ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] idea for a geographically distributed database: how best to implement?

2005-11-22 Thread Andy Ballingall
he replication between adjacent regions, and not only is it asynchronous (I was hoping otherwise...slony-2 seems a long way off), but changing the db schema has ramifications too. (I.e. changing the schema means redefining each replication). Still - no show stoppers yet. Thanks for your insights

Re: [SQL] drop PW

2009-06-13 Thread Andy Shellam
in pg_hba.conf and bounce PostgreSQL. An alternative approach is to add the required password to your user's .pgpass file however I've never used those so cannot comment. Andy Mark Fenbers wrote: I have created a new 8.3 version DB and populated it. A specific user of this database

Re: [SQL] PHP pg_escape_string

2009-06-15 Thread Andy Shellam
value 0) cannot be sent or received in a SQL command, because a null byte represents an end-of-string in C. Other byte values similarly cannot be sent in a string because they cannot be converted to a character (e.g. ASCII newline/linefeed.) Regards, Andy -- Sent via pgsql-sql mai

[SQL] CHECK constraint removing brackets

2010-01-11 Thread Andy Shellam
rder state of "confirmed" and a NULL invoice_id. How can I achieve the above? Thanks, Andy -- 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] CHECK constraint removing brackets

2010-01-11 Thread Andy Shellam
and I hadn't switched my C++ brain off. I know about the <> and !=, for some reason != has always made better sense to me to read, so I tend to write it that way. Cheers, Andy -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] Storing null bytes in bytea

2009-04-27 Thread Andy Shellam
lumns are fine, but when it comes to the session_data column, all I end up with is 'IsLoggedIn|b:1;CurrentUser|O:17:"Class_SystemUser":4:{s:26:"'. Everything past the first "\\" byte sequence is ignored. I've tried this with and without the 'E

Re: [SQL] Storing null bytes in bytea

2009-04-28 Thread Andy Shellam
ent side (and caused me to examine it in more detail in the database) was because it wasn't unescaping correctly in the application code when it read the data back out of the database. Next time I won't be so lazy and try it out in psql first... Regards, Andy -- Sent via pgsql-sql mailin

Re: [SQL] Obtaining a limited number of records from a long query

2009-05-25 Thread Andy Shellam
ctive/queries-limit.html Regards, Andy Oliveiros Cristina wrote: Dear List, Is there any way to force a query to return just a few records? For ex, returning just the first ten rows from a long ORDER BY query ? And then, eventually, obtaining the remaining records at a later time, or in backg