[SQL] 7.0.2: Arrays

2000-09-05 Thread Larry Rosenman
able ia_standby (hsrp_group int2, ler(# router_interfaces[] text, ler(# routers[] text); ERROR: parser: parse error at or near "[" ler=# -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 (voice) Internet: [EMAIL PROTECTED] US Mail: 1905 Steamboat S

[SQL] Re: [HACKERS] 7.0.2: Arrays

2000-09-05 Thread Larry Rosenman
Ok, so I can't read. Thanks! LER * Kristofer Munn <[EMAIL PROTECTED]> [000905 15:27]: > On Tue, 5 Sep 2000, Larry Rosenman wrote: > > > Greetings, > > I was trying to use arrays today, and can't seem to get it right. > > > > What am I doing

[SQL] Display of RI triggers

2000-11-07 Thread Larry Rosenman
Is there a NICE way to display Referential integrity triggers? I know about select * from pg_trigger;, but that output is, err, ugly... (7.0.2, but I suspect it's the same in 7.1devel). -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 (voice) Int

Re: [SQL] Requests for Development

2000-11-17 Thread Larry Rosenman
acc tokens. I was reading the O'Reilly Lex & YACC book over the weekend, and they have some tricks that should make this easier. If someone wants to look into it LER -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 (voice) Internet: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Re: [SQL] calling a shell script from pl/pgsql

2001-09-10 Thread Larry Rosenman
an also look at Peter Eisentraut's PL/sh, but there are portability issues with it: I can't seem to find the correct page at the moment, but it's out there. LER > > > > ---(end of broadcast)------- > TIP 1: subscribe

Re: [SQL] calling a shell script from pl/pgsql

2001-09-10 Thread Larry Rosenman
. I do want the trigger to wait for the script it called to complete > > before returning a value. > > > > Any ideas would be greatly appreciated. > > > > Thanks, > > > > Jeff Barrett > > > > > > > > ---(end

Re: [SQL] [ADMIN] Incredible..

2002-06-21 Thread Larry Rosenman
- END HEADERS -- > -- > Cliff Wells, Software Engineer > Logiplex Corporation (www.logiplex.net) > (503) 978-6726 x308 (800) 735-0555 x308 > > ---(end of broadcast)--- > TIP 6: Have you sea

Re: [SQL] LIMIT 1 FOR UPDATE or FOR UPDATE LIMIT 1?

2002-08-27 Thread Larry Rosenman
x27;t you try a little harder to > support either order? If you change this you break me. I do this **A LOT** in the IP address allocation system I wrote. PLEASE DO NOT BREAK EXISTING APPS WITHOUT AT LEAST ONE RELEASE CYCLE'S WARNING, and preferably NOT AT ALL. -- Larry Rosenman

Re: [SQL] Latitude / Longitude

2002-09-12 Thread Larry Rosenman
rge > GPG Public Key: http://www.perdue.net/personal/pgp.php > Perdue, Inc. / Immortal LLC > 515-554-9520 -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75

Re: [SQL] timestamp

2002-10-07 Thread Larry Rosenman
ve an example of a table creation script that has a timestamp > column? "comment_timestamp" timestamp(0) with time zone DEFAULT now() that's a live one from a table I have. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-M

[SQL] Messy Casts, Is there a better way?

2002-10-15 Thread Larry Rosenman
xt) || '' month'' as interval) as date) FROM circuit WHERE internal_id = $1;' LANGUAGE 'sql'; Is there a better way? -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mai

Re: [SQL] Messy Casts, Is there a better way?

2002-10-17 Thread Larry Rosenman
;. > > That's on the TODO list, I'm afraid. From the sound of it, you should > stick with your current schema and custom function. Thanks. At least I know I'm not missing something here. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +

Re: [SQL] Messy Casts, Is there a better way?

2002-10-17 Thread Larry Rosenman
On Tue, 2002-10-15 at 13:54, Peter Eisentraut wrote: > Larry Rosenman writes: > > > I have a table with the following, in part: > > > > contract_start date > > contract_term int (term in MONTHS) > > Store contract_term as interval? If I do that, and enter &#

Re: [GENERAL] [SQL] Database Design tool

2002-11-04 Thread Larry Rosenman
> > > > > > HTH > > > > > > Johannes Lochmann > > > > > > > > > ---(end of > > broadcast)--- > > > TIP 2: you can get off all lists at once with the unregister command &

Re: [SQL] SQL to list databases?

2003-01-23 Thread Larry Rosenman
ou searched our list archives? http://archives.postgresql.org -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Re: [SQL] Postgres MD5 Function

2003-01-31 Thread Larry Rosenman
adcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 7504

Re: [SQL] nearest match

2003-03-13 Thread Larry Rosenman
mighty quick. (184 points takes 1.80 msec to check) I didn't even know about those geometric operators (I find new stuff every day I swear). Are they SQL standard or postgres specific? postgres specific. There are a WHOLE bunch of geometric operators and functions in PG. LER -- Lar

[SQL] weird(to me) request

2003-09-25 Thread Larry Rosenman
nique index on it, so that's fine. I'm not sure how to do this Thanks! LER -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 pgp0.

Re: [SQL] weird(to me) request

2003-09-25 Thread Larry Rosenman
--On Thursday, September 25, 2003 20:59:25 +0200 Adam Wieckowski <[EMAIL PROTECTED]> wrote: U¿ytkownik Larry Rosenman napisa³: I have the following rows (in addition to others): acct_num text, master_acct_num text, These are in the same table. What I want to enforce is that

Re: [SQL] weird(to me) request

2003-09-25 Thread Larry Rosenman
--On Thursday, September 25, 2003 20:09:35 +0100 Richard Huxton <[EMAIL PROTECTED]> wrote: On Thursday 25 September 2003 19:51, Larry Rosenman wrote: I have the following rows (in addition to others): acct_num text, master_acct_num text, These are in the same table. What I want to enfo

Re: [SQL] how to show table structure?

2004-01-09 Thread Larry Rosenman
your message can get through to the mailing list cleanly -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 pgp0.pgp Description: PGP signature

Re: [SQL] date function problem

2004-02-03 Thread Larry Rosenman
http://www.postgresql.org/docs/faqs/FAQ.html -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 pgp0.pgp Description: PGP signature

Re: [SQL] Reverse String in sql or pgplsql

2005-02-26 Thread Larry Rosenman
On Saturday 26 February 2005 11:55 am, Oisin Glynn wrote: > Did some searching on forums archives to no avail, I found a PL/Perl > example but would like to do this in plpgsql if possible. Does somebody > have this sitting around, I just dont want to reinvent the wheel. But if > need to I will. >

[SQL] Query issue/8.0.1/Serendipity

2005-03-08 Thread Larry Rosenman
ersion(); version - PostgreSQL 8.0.1 on i686-unknown-sysv5UnixWare7.1.4, compiled by cc (1 row) serendipity=# -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-351-4152 E-Mail: ler@lerctr.org US Mail: 3535 Gaspar Drive, Dallas, TX 75220-3611 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Query issue/8.0.1/Serendipity

2005-03-08 Thread Larry Rosenman
On Tuesday 08 March 2005 05:48 am, Larry Rosenman wrote: > I have an 8.0.1 server running the Blogging software serendipity, and the > following query fails with "relation e not defined", but it is on the first > line: [snip] I can put up a pg_dump -s if that would help any..

Re: [SQL] Query issue/8.0.1/Serendipity

2005-03-08 Thread Larry Rosenman
= 1110241185 it's definitely going to > be <= 1112335200 this query is machine generated, so I'm sure it's based on timestamps. > > Hope this helps. I find white space helps me read my own SQL much more > easily. understood, as I said, it's machine g

Re: [SQL] Query issue/8.0.1/Serendipity

2005-03-08 Thread Larry Rosenman
On Tuesday 08 March 2005 06:17 am, Richard Huxton wrote: > Larry Rosenman wrote: > > I have an 8.0.1 server running the Blogging software serendipity, and the > > following query fails with "relation e not defined", but it is on the > > first line:

Re: [SQL] Query issue/8.0.1/Serendipity

2005-03-08 Thread Larry Rosenman
On Tuesday 08 March 2005 06:35 am, Michael Glaesemann wrote: > On Mar 8, 2005, at 21:28, Larry Rosenman wrote: > > On Tuesday 08 March 2005 06:21 am, Michael Glaesemann wrote: > >> Larry, > >> > >> Restating your SQL in a more reader-friendly form: > > >

Re: [SQL] Query issue/8.0.1/Serendipity

2005-03-08 Thread Larry Rosenman
On Tuesday 08 March 2005 09:37 am, Tom Lane wrote: > Larry Rosenman writes: > > I have an 8.0.1 server running the Blogging software serendipity, and the > > following query fails with "relation e not defined", but it is on the > > first line: > > > > &

Re: [SQL] Query issue/8.0.1/Serendipity

2005-03-08 Thread Larry Rosenman
log-devs list. LER > > Ian Barwick > [EMAIL PROTECTED] -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-351-4152 E-Mail: ler@lerctr.org US Mail: 3535 Gaspar Drive, Dallas, TX 75220-3611 ---(end of broadcast)

Re: [SQL] best way to auto-update a field when row is updated

2005-03-10 Thread Larry Rosenman
re FIELD_A='x'; > should automatically set TSTAMP to now) > trigger on update/insert. > ---(end of broadcast)--- > TIP 5: Have you checked our extensive FAQ? > >http://www.postgresql.org/docs/faq --

Re: [SQL] How to add 1 hour in a date or time stamp?

2005-04-18 Thread Larry Rosenman
On Monday 18 April 2005 08:38 am, Dinesh Pandey wrote: > How to add 1 hour in a date or time stamp? timestamp + '1 hour'::interval is one way. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-351-4152 E-Mail: ler@lerctr.org US Mail

Re: [SQL] Locking row

2006-03-10 Thread Larry Rosenman
E TICKET > TICKET_NUMBER | MARK > 1 |1 > 2 |0 > > I need to select the first row with 0 in MARK column and then mark it > with 1. look at the FOR UPDATE in the select docs. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +

[SQL] Can I simplify this somehow?

2013-09-27 Thread Larry Rosenman
x27; when 3 then 'Wednesday' when 4 then 'Thursday' when 5 then 'Friday' when 6 then 'Saturday' end AS "Day", count(*) AS "#LoggedIn" FROM timestamps,user_session WHERE thet

Re: [SQL] Can I simplify this somehow?

2013-09-27 Thread Larry Rosenman
On 2013-09-27 14:24, Adam Jelinek wrote: Are you looking for something like this for the result for the last 45 days or something else? TIME  MON   TUE  WED ... 09:00     1        3       4 10:00     5        0       8 That would be cool, but just a list is good too. -- Larry Rosenman