Am I doing something stupid trying to escape an underscore in LIKE?
Version 7.1b3
richardh=> select * from foo;
a
-
a_c
a_d
abc
(3 rows)
richardh=> select * from foo where a like 'a_c';
a
-
a_c
abc
(2 rows)
richardh=> select * from foo where a like 'a\_c';
a
-
a_c
abc
Apologies if this appears twice - testing a new email client.
There was some discussion the other day about a desire for int8
sequences. This simulates that by providing a large base value combined
with an int4 sequence. You will need to reset the big sequence to a new
base value every once in
Title: RE: [GENERAL] Data types?
I thought:
\dT
This should do it
Ben
> -Original Message-
> From: Tom Lane [mailto:[EMAIL PROTECTED]]
> Sent: 08 March 2001 01:00
> To: Christopher Sawtell
> Cc: Flemming Frøkjær; [EMAIL PROTECTED]
> Subject: Re: [GENERAL] Data types?
>
>
>
I've got some tables:
create table interface (
machineid text,
mac macaddr,
primary key(mac)
);
create table arptable (
router text,
interface int2,
mac macaddr,
ip inet
);
They're big, 10k rows in interface, maybe 35k in arptable. I want to do
this:
hdb=> explain select * from
Ok, after some suggestions from a colleague, I've refactored the query to
use an outer join, like this:
hdb=> select host.ip as registeredip,arptable.ip as
realip,host.mac,arptable.router,arptable.interface from host,arptable where
host.mac = arptable.mac and host.ip = arptable.ip
hdb-> union
hdb
And a yet-more efficient system, I hope:
select * from arptable where not exists (select 1 from host where
arptable.mac = host.mac) order by router,interface,ip;
Could someone guarantee me that does what I think it does? If so, sorry for
the verbose emails!
Regards,
Phil
+-
hello
i received an error when someone ran an input stmt with a very long sting.
the field is of type 'text'. The error (along with the statement) are shown
below. what is the proper way do execute this insert?
The SQL Statement is too long - INSERT INTO accessor_group ( groupid,
groupname, gr
* Tom Lane <[EMAIL PROTECTED]> [010307 14:30] wrote:
> will trillich <[EMAIL PROTECTED]> writes:
> > A)
> > pg_dump -c mydb > db.out.sql
> > and then
> > psql mydb < db.out.sql
> > periodically?
>
> > or is it better to
>
> > B) merely 'reindex' on occasion?
>
> Plain old DROP INDEX / C
Alfred Perlstein <[EMAIL PROTECTED]> writes:
> * Tom Lane <[EMAIL PROTECTED]> [010307 14:30] wrote:
>> Plain old DROP INDEX / CREATE INDEX is probably the best-trodden path.
>> Your (A) seems like vastly more work than is needed. (B) might be
>> marginally easier than DROP/CREATE, but I'm not sur
Chris,
You seem to have hit the 8Kb row limit. You can fix this by editing
include/config.h and changing BLCKSZ. The maximum is 32Kb.
Note that this is redundant in 7.1
Gavin Sherry
Alcove Systems Engineering.
---(end of broadcast)---
TIP 3: if
Hi all,
I´m getting compilation errors.
The configure could not find some headers files (limits.h, netdb.h,
pwd.h...) .
i searched for them and they are in
"/usr/src/linux-2.2.17/include/linux" and " /usr/include"
i´ve tryed:
./configure --prefix="/usr/local/pgsql" --with-perl --with-odbc
--w
From: "chris markiewicz" <[EMAIL PROTECTED]>
> hello
>
> i received an error when someone ran an input stmt with a very long sting.
> the field is of type 'text'. The error (along with the statement) are
shown
> below. what is the proper way do execute this insert?
>
> The SQL Statement is too
Gavin Sherry <[EMAIL PROTECTED]> writes:
> You seem to have hit the 8Kb row limit.
No, I think he's hit some limit on the size of a query string. Before
about 7.0, there was a limit on the textual length of queries. We got
rid of it in the backend and libpq, but I think some of the lesser-used
i am using jdbc7.0-1.2...postgres 7.0.2.
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 10:28 AM
To: Gavin Sherry
Cc: chris markiewicz; [EMAIL PROTECTED]
Subject: Re: [GENERAL] length of insert stmt?
Gavin Sherry <[EMAIL PROTECTED]> writes:
[EMAIL PROTECTED] writes:
> Am I doing something stupid trying to escape an underscore in LIKE?
You need more backslashes. Don't forget the string-literal parser eats
one level of backslashes, before LIKE ever gets to see the pattern.
regards, tom lane
-
I do it this way using libpq: select count(*) from pg_class where
relname='table name goes here'
and test for a count > 1.
Tim
- Original Message -
From: "Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 07, 2001 8:48 PM
Subject: [GENERAL] How to check if a table
"chris markiewicz" <[EMAIL PROTECTED]> writes:
> i am using jdbc7.0-1.2...postgres 7.0.2.
I'm not sure what the current state of play is for query length in JDBC.
It might be fixed in the current 7.1 beta version, or not. Try asking
over on the pgsql-jdbc list.
As a short-term workaround, you c
17 matches
Mail list logo