> A related question is: is there a way to time a query in psql, like the
> client of MySQL does?
use the explain commmand
explain select * from foo;
>
>
> ---(end of broadcast)---
> TIP 2: you can get off all lists at once with the unregister co
uw.id=9
and the error
ERROR: copyObject: don't know how to copy 704
can anyone shed a little light please ?
jeff.
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
i actually found the problem,
SELECT o.name,o,contactname
should be
SELECT o.name,o.contactname
jeff
On Wed, 13 Jun 2001, Robby Slaughter wrote:
> What happens when you don't join quite so much? That is, take off the AND
> blah blocks,
> one by one?
> -Robby
>
>
Hello folks,
wondering how to display any constraints that a table may have,
as well i know alter table add constraint works, but what's the
syntax to remove one ?
i assume /alter table remove constraint, but i can't find any examples.
jeff
---(end of
?)");
$query->execute($md5, $origin, $name, $value);
This way you don't have to deal with double quoting and all that. (You can
also call bind_param, but I find it easier to just pass args into execute)
--
J
Hello,
I need to create a view in Postgres that has a where clause of the
date < beginning of month.
i.e.:
SELECT supplier_number, Sum(amount) AS due
FROM purchase_orders
WHERE date < '2003-12-1' AND paid = 0
GROUP BY supplier_number
ORDER BY supplier_number ASC
As you can see, I've specifi
On Nov 3, 2004, at 10:56 AM, Ameen - Etemady wrote:
I like to do it like this:
create table mytmp(name myvarchar(10,"en_US"));
you can't unless you modify the parser.
It has special cases to support varchar (and numeric) syntax.
--
Jeff Trout <[EMAIL PROTECTED]>
http://ww
it only runs on linux and it must run on the same box as pg itself.
You may want to look at it and see if you can get anything good out
of it.
queries / second is tricky. You could look at my pgspy utility but
it is in C. It can give you queries / second data
--
Jeff Trout <[EMAI
ething else' end
as blah, public.Z_documents as d ...
--
Jeff Trout <[EMAIL PROTECTED]>
http://www.jefftrout.com/
http://www.stuarthamm.net/
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
t_transaction
from log_tb l, prod_tb p
where l.prod_id=p.prod_id
group by p.prod_name, l.prod_id;
i think that's what you want, at least...
--
Jeff Hoffmann
PropertyKey.com
how would i select all rows where a boolean value is neither
t nor f.. ?
ie if someone inserted without setting the boolean tag.
Jeff MacDonald,
-
PostgreSQL Inc | Hub.Org Networking Services
[EMAIL PROTECTED] | [EMAIL
, Indraneel Majumdar wrote:
> Hi,
>
> AFAIK, you can't enter a null value in a bool field, it has to be 1 or 0.
>
> \Indraneel
>
> On Sat, 23 Sep 2000, Jeff MacDonald wrote:
>
> > how would i select all rows where a boolean value is neither
> > t
bingo,
thaks
On Sat, 23 Sep 2000, Stephan Szabo wrote:
>
> I'd assume this would work:
> select * from table where booleanfield is null;
>
> Stephan Szabo
> [EMAIL PROTECTED]
>
> On Sat, 23 Sep 2000, Jeff MacDonald wrote:
>
> > how would i select all
e indexes are automatcally created on serials.
> 2. Can I define my own index on the OIDs of a table?
sure, create index oid_idx on table(oid);
Jeff MacDonald,
-
PostgreSQL Inc | Hub.Org Networking Services
[EMAIL
"Brian C. Doyle" wrote:
>
> Hello all,
>
> I am trying to find a query to retrive the attributes of a table as in \d
> tablename but as a select command. Is this possible?
run "psql -E" -- it will echo all of the sql queries that those commands
use.
--
Jeff Hoffmann
PropertyKey.com
i noticed that substr behaves a bit different in pgsql than perl
ie select foo from table where substr(foo,1,1) = 'X';
initially i thought it should be substr(foo,0,1)
just wondering on the reasoning for this offset ?
Jeff
> Jeff MacDonald <[EMAIL PROTECTED]> writes:
> > i noticed that substr behaves a bit different in pgsql than perl
> > ie select foo from table where substr(foo,1,1) = 'X';
>
> > just wondering on the reasoning for this offset ?
>
> Larry Wall a
t how I can fetch rows from 26 to 50? I mean withou fetching first 25. Or
> can I skip first 25?
you can't do that with a cursor, but you can use they mysql-ism called a
limit clause. for example, to fetch rows 26-50 from that query, you'd
do:
select * from films limit 25,26;
or
s
hi folks..
i want to do this to a datetime field..
select foo from table where substr(datefoo,1,11) = '2000-12-14';
it returns no results yet..
select substr(datefoo,1,11) does return some values that say
2000-12-14
any clues ?
Jeff
My script is below.
I thought (based on recent posts) that this use of RETURN is allowed, but
when trying an insert to report_table, I get the following error:
ERROR: control reaches end of trigger procedure without RETURN
I have solved several problems in getting to this point, but have now r
nsider
every mystery, I'd never get any work done:-).
Thanks very much for your help (again).
> -Original Message-
> From: Tom Lane [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 12:48 PM
> To: Jeff Eckermann
> Cc: '[EMAIL PROTECTED]'
>
I have a tab delimited file that I'm trying to import
into an empty table.
I've set the table up as follows:
create table member (
member_id serial not null,
fname varchar(25) not null,
lname varchar(25) not null,
member_since date not null,
Primary Key (member_id)
);
My member.txt file looks l
using gmake instead of make (cd /usr/ports/devel/gmake, make)
thanks ! works great.
Jeff MacDonald,
-
PostgreSQL Inc | Hub.Org Networking Services
[EMAIL PROTECTED] | [EMAIL PROTECTED]
w
uot;../../../src/Makefile.global", line 292: Missing dependency operator
"../../../src/Makefile.global", line 294: Need an operator
"../../../src/Makefile.global", line 296: Need an operator
"../../../src/Makefile.global", line 299: Need an operator
"../..
A person recent pointed this out to me..
seems a bit funny, because limit 1 pretty much
say's it't not gonna return multiple values.
jeff
> This doesn't work:
>
> CREATE FUNCTION vuln_port(int4) RETURNS int4 AS 'SELECT port FROM
> i_host_vuln WHERE vuln = $1 G
>
> DROP
> DROP
> DROP
> CREATE
> CREATE
> CREATE
>
On UNIX/UNIX-like machines, use the script(1) command (man script for
details).
Jeff
--
Errors have occurred.
We won't tell you where or why.
Lazy programmers.
-- Hacking haiku
I want to build my tables by placing all the sql
statements in a file. What is the correct way to use
this file with psql?
Example: My text file has this in it:
CREATE TABLE table1 (
table1_id serial,
field1 char(5),
PRIMARY KEY (table1_id)
);
I want to be able to use the file to crea
eplacement, but get an error:
NOTICE: current transaction is aborted, queries ignored
until end of transaction block
As noted earlier, any guidance will be most appreciated.
Thanks,
Jeff.
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
Still learning this stuff, so please be gentle...
jeff=# select * from test_it;
typ | diam
-+--
01 | 800
01 | 840
01 | 870
01 | 1120
02 | 760
02 | 780
02 | 800
02 | 900
03 | 1200
03 | 1234
03 | 1352
(11 rows)
jeff=# \! cat test_it
drop function test_it_too(text
As a workaround, you can insert your row into an existing table, then
retrieve it from there later. I think you need to enumerate all of the
fields, as in 'INSERT INTO table VALUES (ret.field1,
ret.field2,...ret.fieldn);'. At least, I haven't succeeded any other way.
Messy, but the best method a
I don't think this will necessarily work:
field1 | field2
aa | ab
a | aab
These are two distinct rows, so should be counted as two.
The proposed method would count them as one.
You can get around this problem by doing:
count (distinct (a || x || b))
where x is some character not foun
Probably just me: but I don't see the point. Consider:
* User 1 commences insert transaction: grabs nextval(sequence),
max(foo)
* User 2 commences insert transaction: grabs nextval(sequence),
max(foo)
* User 1 commits
* User 2 commits (insert has sequence value one higher
il 04, 2001 7:24 PM
> To: Jeff Eckermann; 'Andrew Perrin'
> Cc: PgSQL-SQL
> Subject: RE: [SQL] RE: serial type; race conditions
>
>
> It seems to just feel like conflicting requirements, so it's a tug-of-war.
>
> I've always done it by doing all t
s
will become a problem.
> -Original Message-
> From: Jeff Eckermann
> Sent: Thursday, April 05, 2001 10:36 AM
> To: 'Gerald Gutierrez'; 'Andrew Perrin'
> Cc: PgSQL-SQL
> Subject: RE: [SQL] RE: serial type; race conditions
>
>
Regular expressions make this much easier. The below could be shortened to:
create function ComparisonString(text) returns text as '
declare
t alias for $1;
r text;
c char;
begin
if t is null or t !~ ''[^a-zA-Z0-9
And if you have plperl installed, something like this is even easier:
create function texttrim(text) returns text as '$_[0] =~ s/\\W//g; return
$_[0]' language 'plperl';
(I just read the docs) :-)
> -Original Message-
> From: Jeff Eckermann [SMTP:[EMAIL PROTECTE
ically return
> NULL as the result, doesn't it?
>
> Albert.
>
>
> On Tue, Apr 10, 2001 at 05:41:26PM -0500, Jeff Eckermann wrote:
> > Regular expressions make this much easier. The below could be shortened
> to:
> >
> > create fun
a query by shutting off the sequential scans (set
enable_seqscan=off) and retrying the query. essentially, this forces it
to use an index scan if at all possible.
--
Jeff Hoffmann
PropertyKey.com
---(end of broadcast)---
TIP 5: Have you checked o
work, but there doesn't seem to be
a lot of usage of the geometric functions by the developers to look at
missing features -- they're mostly just reactive to problems. i really
have never dug into tweaking access methods to get this to work, but i
would imagine it's not that hard
but i thought there used to be at
least a gist_box_ops. or was that another contrib item that got
dropped?
--
Jeff Hoffmann
PropertyKey.com
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
ny built-in way of using it, if for no
other reason than to be able to test if the feature even works.
--
Jeff Hoffmann
PropertyKey.com
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-noma
on in the standard distribution because it'd
be easy to test -- you already have to run rtree tests anyway, you can
just duplicate them with gist & gist_box_ops.
--
Jeff Hoffmann
PropertyKey.com
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
created when you create a new database using that template
(look at "createdb -T" to see how this works). this may not be what
you're looking for because they wouldn't be shared across databases,
they would just be copied into the new database when it was created. i
don
Does anybody know why?
>
because the documentation is wrong. the variable name is
ENABLE_SEQSCAN, i.e.:
SET ENABLE_SEQSCAN TO OFF;
should work.
--
Jeff Hoffmann
PropertyKey.com
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Hi folks,
say i have a text field with teh values
1,2,3,10,20,30,1a,1b,2a,2b
and i want to sort it so i get,
1
1a
1b
2
2a
2b
3
10
20
30
is there anyway to do that with postgresql ?
below is what actually happens.
jeff=> select * from foo order by var1;
var1
--
1
10
1a
1b
2
ut
of course you won't be able to use characters in that. Therefore, create a
second field called revision or whatever of text. Now you can sort
correctly with:
select * from foo order by var1,revision;
On Thu, 3 May 2001, Jeff
MacDonald wrote:
> Hi folks,
>
> say i have a text fi
I assume that you want to do this within the database, i.e. with a query.
You would need to use a function, but I don't think a builtin function would
do it.
Try:
CREATE FUNCTION email_order (text) RETURNS text AS '
select substr ($1, strpos ($1, ''@'') + 1) || substr ($1, 1, strpos ($1,
''@'') -1
???
I don't think anyone suggested adding a new builtin function.
Yes, your suggestion is good for an occasional use.
Where this kind of functionality is likely to be needed on a continuing
basis, my experience is that wrapping the code up in a custom function is
easier and cleaner than writing it
you could hack the pg_dump bit out of phpPgAdmin
i think the license permits it.
just my 2 cents.
jeff
On Wed, 9 May 2001, Jack wrote:
> Date: Wed, 9 May 2001 09:45:46 +1000
> From: Jack <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [SQL] execute client applica
hi,
phpPGAdmin is a web based php driven postgresql
admin tool. not sure of the exact url, try
google :)
it has a pg_dump option in it.
jeff
On Sat, 12 May 2001, datactrl wrote:
> Date: Sat, 12 May 2001 10:23:39 +1000
> From: datactrl <[EMAIL PROTECTED]>
> To: [EMAIL PROTE
:
I want all dates between 05-29-2001 and 06-02-2001
The result set would be:
05-30-2001
05-31-2001
06-01-2001
Thanks for the help.
-Jeff
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs
it is natively built in or some 3rd party
> tool that I can use.
Depends on what platform you want to run the report generator on. If
you're happy with a Windows platform, you could connect Access or Crystal
Reports, or a large number of other query
ids and then write my queries to use this table. How can I do this in
postgresql, I did not see any support for a type table.
Anyone know of any good tutorials or how-tos for doing this type of stuff in
postgresql?
Thanks - Jeff
---(end of broadcast
I don't think there is any way to do this using any of the generally
available tools.
You could do a workaround using pl/pgsql, in the following way:
* insert your data into a temp table
* output the data to a file using COPY
pl/pgsql allows INSERT statements, but does not allow CREA
I haven't seen anything on this list to say that pl/perlu is being worked
on. Is it?
> -Original Message-
> From: Alex Pilosov [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 10:03 AM
> To: Peter Eisentraut
> Cc: R Vijayanath; [EMAIL PROTECTED]
> Subject: Re: can we wr
I think you need to use syntax:
raise exception ''Member % Not Found'', unitno;
> -Original Message-
> From: Gary Stainburn [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 10:24 AM
> To: pgsql-sql
> Subject: Re: pl/pgsql - code review + question
>
> Okay, I've been hit r
If the string will always be in that general form, use substring & position
functions (see "String Functions and Operators" in the docs.
Example: unit_number := substr(team_number, strpos(team_number, ''-'') + 1);
If you don't want the leading zero, you could make make the "+1" into "+2".
If you m
If you include "oid" in your GROUP BY clause, you will get each distinct
record.
That will get you by for right now, but Josh's point is correct. You need
some kind of unique key in your table.
But... if you want to see every distinct record: why are you using a GROUP
BY?
> -Original Message
You could make your FROM clause something like:
FROM members m
INNER JOIN address a ON m.madd = a.aid
INNER JOIN teams t ON m.team = t.tid
LEFT JOIN emails e ON m.memail = e.eid
I think that should work: if not, try putting everything between (but not
including) FROM and LE
You will need to use "EXECUTE" to create the sequence. The docs on pl/pgsql
cover it: basically, "EXECUTE string" will cause that string to be executed
as a SQL statement.
> -Original Message-
> From: Dado Feigenblatt [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, July 20, 2001 2:26 PM
> To:
The content of your record is not limited to user data. Including a field
that provides a unique key is simple: look at the documentation for data
type SERIAL for an easy way to do this.
You can also include information about when the record was inserted, and by
whom, just by including fields in
You are confusing the syntax of two similar functions:
position ('substring' in 'string')
strpos ('string', 'substring').
I have a feeling that "position" actually calls "strpos", but I am guessing
on that.
> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Mo
> Thanks in advance.
>
this probably isn't what you want, but would it speed things up if you
did an "order by distance" instead of doing the "distance <= 60", then
having your application cut the results at 60? that should work from a
language perspective, at le
the column getfile. So the question I have is how would I create the
retstriction of the min(datetime), sid and only return the value of getfile?
The english of what I am looking for is.
Select the getfile for the earliest of each sid.
Any help would be greatly appreciated.
--Jeff
) and I want this for every row in the table.
Thanks for the quick response Josh, hopefully above will help out some.
--Jeff
""Josh Berkus"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Jeff,
>
> > The query I ha
With version 7.2 we will have pl/perlu (untrusted), which will allow use of
the various Perl modules which do this sort of thing.
> -Original Message-
> From: Josh Berkus [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, July 31, 2001 1:16 PM
> To: Joe Conway; Bruce Momjian
> Cc: Josh Berkus;
The WHERE clause is evaluated before your SELECT list is determined, so the
aliased value cannot be used.
You can put further NOT NULL tests into the subqueries to make sure that
null values are not returned.
Question: why not just join the tables explicitly? The more usual SQL
approach would be
day, August 08, 2001 9:41 AM
> To: [EMAIL PROTECTED]
> Subject: Re: RE: Referencing named attribute in where clause doesn't
> work with7.1.2?
>
> Jeff Eckermann wrote:
> >
> > The WHERE clause is evaluated before your SELECT list is determined, so
> the
The "create function" syntax is the same. The language syntax is straight
SQL:
CREATE FUNCTION getteamno(int4) RETURNS varchar AS '
SELECT tregion || ''/'' || to_char(tnumber, ''FM000'')
FROM teams
WHERE tid = $1
' LANGUAGE 'sql';
You don't get to build in error checking, but there has to be a
7;:testvar
Which is then used in: select * from table where id in (:testvar);
Thanks,
--Jeff
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
Why not just include examples of DATEDIFF and DATEADD functions?
For example:
CREATE FUNCTION datediff(timestamp, timestamp)
RETURNS integer AS '
BEGIN
RETURN $2 - $1;
END;
' LANGUAGE 'plpgsql';
And similarly with DATEADD.
You will increase the scope (and length) of your article, but only slightly
I have encountered this problem (in a different context), and could not find
a way to insert entire rows/records in the way that you appear to want. But
it worked fine if I INSERTed explicitly, like:
INSERT INTO table VALUES (OLD.field1, OLD.field2, ..., OLD.fieldn);
That should work fine inside
UPDATE TableA SET nrA = TableB.nrB WHERE nrA =
TableB.nrA;
UPDATE statements don't take FROM
clauses. I don't think they like aliasing, either.
- Original Message -
From:
Fredrik
Thunberg
To: [EMAIL PROTECTED]
Sent: Monday, August 20, 2001 6:15
AM
Subject: Sim
Select id from T where name = 'bleh'
UNION ALL
Select id from T where description = 'bleh';
Will get you the resultset you want, but: I don't believe that you can do a
GROUP BY on it.
If you just want counts, as you describe below, you could do something like:
SELECT 'Only One', (SELECT count (i
Not amongst the builtin functions. You will need to create your own using a
procedural language. Easiest is plperl, since Perl already has a very
functional "split" function.
- Original Message -
From: "omid omoomi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 20
SELECT *
FROM table
ORDER BY field DESC
LIMIT 1
OFFSET 1;
This way you don't need to know the value of "n" in advance.
The descending ORDER BY is to indicate a reversal of your intended ordering,
so as to make the n-1'th record the second record.
Note that getting the n-1'th record from an unorde
a) Look at "Date/Time Functions" in the docs:
specifically, listed under "Functions and Operators" in the Users
Guide.
b) "Serial" type will do this. Look under
"Numeric Types" , in the "Data Types" section of the Users Guide.
- Original Message -
From:
Jaydip
To: [EMAIL
I learned SQL from Sam's "Teach Yourself SQL in 21 Days", and am happy to
recommend it. Which book is "best" is very subjective and situation
dependent; all I can say is that this one did the job for me.
Pros: clearly written; knowledgable authors; good coverage
Cons: all due to space limitations
I have an update statement (no transaction controls surround these
statements):
update sessions set sessdate = 0 where sessid in ( long list of ids);
How long will the rows being updated be locked for this statement? Will all
be locked until all updates are completed or will the row locking only
.
Thanks,
Jeff Barrett
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
!
Jeff Barrett
"Jeff Barrett" <[EMAIL PROTECTED]> wrote in message
9nip2p$1s5o$[EMAIL PROTECTED]">news:9nip2p$1s5o$[EMAIL PROTECTED]...
> How can I call a shell script from within a pl/pgsql function that is
called
> as from a trigger. I do not want to interact with the
You need to qualify "DENOM" with the table name: just write "xi.DENOM".
I find this to be good general practice when selecting from more than one
table.
- Original Message -
From: "Olle Wijk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 12, 2001 4:06 AM
Subject:
If you want "the third maximum value", easist to do:
SELECT * FROM table ORDER BY whatever DESC OFFSET 2 LIMIT 1;
- Original Message -
From: "Yoann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 7:05 AM
Subject: Number the lines
> how can I number the res
--- James Orr <[EMAIL PROTECTED]> wrote:
> I think he might be talking about mine. The region
> values will not be
> duplicated, the WHERE clause prevents it.
If you are saying that I didn't read the original
query closely enough, you're probably right.
Unfortunately I deleted the original me
Josh,
I don't see how you got the result you quote below.
My query sums the volume figures, grouping by scanid:
that worked as expected (one line per scanid) on my
system when I tested it (version 7.1.2, though I don't
think that matters).
Jeff
--- Josh Berkus <[EMAIL PROTECTED]&
Maybe the reason is that you defined the function to return bool, but are
attempting to return text?
You need conditional logic, which suggests pl/pgsql is the way to go.
Something simple should do it, like:
create function check_loan (text,int,int)
returns bool
as '
begin
select * from loans whe
causing this update statement to not complete?
Why are the costs so different since it seems to me that besides the cost of
the update they are the same query?
Any help would be great!
Jeff Barrett
---(end of broadcast)---
TIP 3: if posting
That did the trick. Thank you for the quick detailed answer. It runs in
about a minute now.
Jeff Barrett
"Stephan Szabo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, 21 Sep 2001, Jeff Barrett wrote:
>
> > I ha
In article <PXEu7.602317$[EMAIL PROTECTED]>, "Bob
Swerdlow" <[EMAIL PROTECTED]> wrote:
> How do I get the rows sorted in a case insensitive way?
> SELECT * FROM MyTable ORDER BY Name;
Try
SELECT * FROM MyTable ORDER BY upper(Name);
(or
try:
f_count_var := count(empno) from employee;
--- Joseph Syjuco <[EMAIL PROTECTED]> wrote:
>
> i want to put my count() result in a plpgsql
> declared integer variable
>
>
> declare f_count_var integer;
> begin
> select into f_count_var count(empno) from employee
> end;
>
> tried this
Perhaps this was covered in the 7.2.x release notes, but it's mystifying us:
select to_char(time_link,'999.99') from stat_fetch
where time_link is not null
order by 1 desc limit 10;
(time_link is a double-precision column.) Under 7.1.3, this returns results like:
to_char
-
9.99
I'll second the suggestion about looking at Oracle
PL/SQL materials. I used an introductory PL/SQL text
when learning about PLpgSQL, and found it very useful.
The syntax/functionality is highly similar (by design,
apparently). Much of the Oracle PL/SQL functionality
is not (yet) implemented in P
h (iscachable);
The same approach can be used to provide a regex match with Perl syntax,
but I don't have an example of that coded up and at hand.
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer f
--- friedrich nietzsche <[EMAIL PROTECTED]>
wrote:
> Hi all,
> I'm in trouble with the same problem, but in PHP..
> With your solution, I cannot be totally sure that
> last
> inserted raw was mine...
> Because I'm on a web page, it could be that, as soon
> as I've inserted my record, another one
ect second_val
union ...) as TEMP_TABLE
using (SECONDARY_KEY_FLD)
likewise, either taking some number of my desired values in "chunks" or
all at once.
What's likely to work better, and why? (I'm going off to write a
benchmark script, but I'd like to hear some theoretic
--- [EMAIL PROTECTED] wrote:
> I need to sort the query by the log_date desc
> (log_date is char(10)). I
> tried the following without success :
>
> select id, log_date from userlog order by cast
> (log_date as date) desc
>
> select id, log_date from userlog order by
> date(log_date) desc
>
>
--- Gaetano Mendola <[EMAIL PROTECTED]> wrote:
>
> "Gaetano Mendola" <[EMAIL PROTECTED]> wrote in
> message
> alq3mr$2s7o$[EMAIL PROTECTED]">news:alq3mr$2s7o$[EMAIL PROTECTED]...
> > Hi all,
> >
> > Suppose that I have a table like this:
> >
> >
> > att_1 |att_2 |att_3 | att_4
> >
elect a.relname, b.relname, 0, b.relpages
from pg_class a
join pg_class b
on (b.relname like 'pg_toast_' || a.relfilenode || '%')
where a.relkind = 'r'
) as pg_class
group by relname
order by sum(relpages) desc offset 20) as "Others") as rows
o
(142 rows)
How can I write a query that will return these as
1 | aaa | 1251
2 | aba | 1197
3 | cax | 1042
... | ... | ...
142 | axq | 23
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer fax 616.349.9076
Nexcerpt
way.
>
The easiest way would be to write a function in a language that supports
some kind of date library. I'm most familiar with Perl and its
Date::Manip library, so that's what I would turn to.
--
Jeff Boes vox 616.226.9550 ext 24
Database Engi
1 - 100 of 253 matches
Mail list logo