"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> After change the SQL clause to "SELECT * from mytable WHERE mykey=$1::int8",
> the binding passed!
If you had to insert an explicit cast, it means that "mykey" isn't int8,
which makes one wonder why you are bothering.
rega
RPK wrote:
> I have a table and a column that is primary key. I want to modify the
> existing index and use two other columns to be used for indexing.
> Since queries will be run using these two columns, hence I want to
> use them.
The choice of what your primary key is should arise from the schem
Yeah, I meant bytea[].
It still doesn't work. Same error:
ERROR: cannot cast type character varying to bytea[]
Not that this is not the same as doing
select '{1, 2, 3}'::int[].
This is the equivalent of doing
SELECT ('{1, 1, 1, 1}'::varchar(255))::int[];
I can
>quote author='Andreas Kretschmer-2'>
> Depends on your distribition
I am using pgsql 8.2.3 on Windows XP. I think open source programs are all
better out for Debian like thing. They work horribly strange on Windows.
--
View this message in context:
http://www.nabble.com/Schema-relationship-dia
RPK <[EMAIL PROTECTED]> schrieb:
>
> Where I can find this?
Do you mean postgresql-autodoc? Depends on your distribition, i have
Debian and can do a simple 'apt-get install postgresql-autodoc', if i
want to install this.
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a
I have a table and a column that is primary key. I want to modify the
existing index and use two other columns to be used for indexing. Since
queries will be run using these two columns, hence I want to use them.
Can I modify the existing index using pgAdmin? Which type of index will suit
this ta
Where I can find this?
am Fri, dem 20.04.2007, um 9:22:21 -0700 mailte RPK folgendes:
> Is there any feature in PGSQL to view the schema relationship diagram?
You can use tools like postgresql-autodoc for this.
--
View this message in context:
http://www.nabble.com/Schema-relationship-diag
William Garrison <[EMAIL PROTECTED]> writes:
> WHERE customerid = ANY($1);
> Results in the error:
> ERROR: op ANY/ALL (array) requires array on right side
>
> I tried casting the character string to an array afterward:
>
> WHERE customerid = ANY($1::bytea);
> which results in:
> E
Tom Lane wrote:
William Garrison <[EMAIL PROTECTED]> writes:
I'm using npgsql and C#, and I've realized it doesn't support passing
arrays. Barring things like updating npgsql, what form of hackiness
would work best here?
The customerIDs are GUIDs represented as 16-byte arrays. I can pass
t
William Garrison <[EMAIL PROTECTED]> writes:
> I'm using npgsql and C#, and I've realized it doesn't support passing
> arrays. Barring things like updating npgsql, what form of hackiness
> would work best here?
> The customerIDs are GUIDs represented as 16-byte arrays. I can pass
> them as en
I have a stored procedure that takes a list of IDs and uses the ANY
operator:
CREATE OR REPLACE FUNCTION CalculateTotals(
customerList bytea[],
out total bigint,
out most_recent_login_date date)
AS $$
BEGIN
SELECT
SUM(totalsize), MAX(last_login)
On Fri, 2007-04-20 at 18:32 -0400, Jonathan Vanasco wrote:
> On Apr 20, 2007, at 6:13 PM, Jeff Davis wrote:
>
> > This is more correct structure, and yes, it would involve a join.
>
> I know thats the 'more correct' way -- but I can't do the join ,
> which is why I posted about a 2 column uniqu
On Apr 20, 2007, at 6:13 PM, Jeff Davis wrote:
This is more correct structure, and yes, it would involve a join.
I know thats the 'more correct' way -- but I can't do the join ,
which is why I posted about a 2 column unique index.
I tested with a join before posting - i have an already larg
On Fri, 2007-04-20 at 17:56 -0400, Jonathan Vanasco wrote:
> On Apr 20, 2007, at 5:43 PM, Vladimir Zelinski wrote:
>
> > This looks like more table design problem than
> > database limitation.
> > The one column should accommodate values from both
> > columns with unique index built on this column
Jonathan Vanasco <[EMAIL PROTECTED]> writes:
> Given:
> create table test_a (
> id serial ,
> name_1 varchar(32) ,
> name_2 varchar(32)
> );
> I need name_1 and name_2 to both be unique so that:
> name_1 never appears in name_1 or name_2
On Apr 20, 2007, at 5:43 PM, Vladimir Zelinski wrote:
This looks like more table design problem than
database limitation.
The one column should accommodate values from both
columns with unique index built on this column. Your
requirements tell me that these values are the same
nature and should
"Jason Nerothin" <[EMAIL PROTECTED]> writes:
> Attempt number 2, now underway, is to pass
> LIMIT and OFFSET values to the query which Postgres handles quite
> effectively as long as the OFFSET value is less than the total number of
> rows in the table. When the value is greater than , the query
>
This looks like more table design problem than
database limitation.
The one column should accommodate values from both
columns with unique index built on this column. Your
requirements tell me that these values are the same
nature and should be placed in the same column. To
distinguish between them
"Mike Frysinger" <[EMAIL PROTECTED]> writes:
> On 4/20/07, Tom Lane <[EMAIL PROTECTED]> wrote:
>> Well, the whole thing is pretty strange, because AFAICS pg_dump will
>> never emit an UPDATE on a user table at all.
> this was my understanding of pg_dump as well ...
>> What PG version is this exac
On 4/20/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Mike Frysinger" <[EMAIL PROTECTED]> writes:
> i was experimenting with using pg_dump/pg_restore and pg_dump/psql ...
> when using psql to import, i didnt use -Fc ... but the errors were the
> same regardless of whether i used pgsl or pg_restore ;(
Jonathan Vanasco <[EMAIL PROTECTED]> writes:
> I need a certain unique constraint in pg that i can't figure out.
>
> Given:
>
> create table test_a (
> id serial ,
> name_1 varchar(32) ,
> name_2 varchar(32)
> );
>
> I need name_1 and name_2 to
I need a certain unique constraint in pg that i can't figure out.
Given:
create table test_a (
id serial ,
name_1 varchar(32) ,
name_2 varchar(32)
);
I need name_1 and name_2 to both be unique so that:
name_1 never appear
Scott Schulthess wrote:
How do I get this to work?
for r in SELECT distinct(substring(drgtitle, 1, 1)) as text from
stockdrgmeta where state ilike '%' || $1 || '%'
loop variable of loop over rows must be record or row variable at or
near "LOOP" at character 218
DECLARE
r RECOR
Hi,
In this http://archive.netbsd.se/?ml=pgsql-hackers&a=2006-10&t=2475028
thread Teodor Sigaev describes a way to make tsearch2 index substrings
of words:
> Brain storm method:
>
> Develop a dictionary which returns all substring for lexeme, for
> example for word foobar it will be 'foobar foob
Hi everyone !
I've got a little question :-)
When I try to insert too long string into some varchar(n) column,i get a
message like this:
ERROR:value too long for type character varying(10)
It's ok - but how can I get information,which column generates an error?
Is it possible ?
I don't see any
I'm trying to work my way around a large query problem.
In my system, I've created a number of large materialized views that are the
output of some computationally expensive stored procedures on other large
tables in my system. They are intended to serve as staging tables for the
next phase of co
"Steven Flatt" <[EMAIL PROTECTED]> writes:
> I can't seem to find an answer to this.
>
> If I upgrade a 32-bit Postgres build to a 64-bit Postgres build
> (same version), will the data files be compatible or do I have to do
> a dump and restore of the database?
They will not be compatible.
> I
I can't seem to find an answer to this.
If I upgrade a 32-bit Postgres build to a 64-bit Postgres build (same
version), will the data files be compatible or do I have to do a dump and
restore of the database?
Is the answer the same for 8.1 and 8.2?
Steve
Magnus Hagander wrote:
> Guy Rouillier wrote:
>> George Weaver wrote:
>>> Original Message From Guy Rouillier
>>>
http://www.postgresql.org/docs/techdocs.71. Color me dumb, but I
can't figure a way to download the document "Apache 2.0, Tomcat 5.5,
WARs & PostgreSQL 8.1 JDBC DataSour
I'm aware of that and in my case I don't think it will be a
problem. It is for a type-ahead search web interface so actually it
only requires indexing all possible substrings starting from char 1,
ie. p, po, pos, post, postg, postgr, postgre, postgres, postgresq,
postgresql.
If you want to pr
After change the SQL clause to "SELECT * from mytable WHERE mykey=$1::int8",
the binding passed!
Thanks for everyone's reply.
- Original Message
From: Tom Lane <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Cc: pgsql-general@postgresql.org
Sent: Thursday, April 19, 2007
Guy Rouillier wrote:
> George Weaver wrote:
>>
>> Original Message From Guy Rouillier
>>
>>> http://www.postgresql.org/docs/techdocs.71. Color me dumb, but I
>>> can't figure a way to download the document "Apache 2.0, Tomcat 5.5,
>>> WARs & PostgreSQL 8.1 JDBC DataSources on Windows XP". When I
George Weaver wrote:
Original Message From Guy Rouillier
http://www.postgresql.org/docs/techdocs.71. Color me dumb, but I
can't figure a way to download the document "Apache 2.0, Tomcat 5.5,
WARs & PostgreSQL 8.1 JDBC DataSources on Windows XP". When I click
on the link to the document, it
am Fri, dem 20.04.2007, um 9:22:21 -0700 mailte RPK folgendes:
>
> Is there any feature in PGSQL to view the schema relationship diagram?
You can use tools like postgresql-autodoc for this.
Description: utility to create system tables overview in HTML, DOT and XML
This is a utility which will
On Fri, 2007-04-20 at 12:00 -0400, Scott Schulthess wrote:
> create or replace function getquadalphabet(text) returns setof varchar
> as $$
>
> declare r varchar;
>
> begin
>
> for r in SELECT distinct(substring(drgtitle, 1, 1)) as text from
> stockdrgmeta where state ilike '%' || $1 || '%'
>
How do I get this to work?
create or replace function getquadalphabet(text) returns setof varchar
as $$
declare r varchar;
begin
for r in SELECT distinct(substring(drgtitle, 1, 1)) as text from
stockdrgmeta where state ilike '%' || $1 || '%'
LOOP
return next r;
END LOOP;
end;
$$ la
Is there any feature in PGSQL to view the schema relationship diagram?
--
View this message in context:
http://www.nabble.com/Schema-relationship-diagram-tf3619278.html#a10105662
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
---(end of broadcast
Tom Lane wrote:
Kevin Murphy <[EMAIL PROTECTED]> writes:
Has anybody tried making a 64-bit PostgreSQL on an Apple XServe w/
Intel Woodcrest CPU's?
creating template1 database in /usr/local/src/postgresql-8.2.3/src/
test/regress/./tmp_check/data/base/1 ... FATAL: \
could not create s
"Mike Frysinger" <[EMAIL PROTECTED]> writes:
> i was experimenting with using pg_dump/pg_restore and pg_dump/psql ...
> when using psql to import, i didnt use -Fc ... but the errors were the
> same regardless of whether i used pgsl or pg_restore ;(
Well, the whole thing is pretty strange, because
Kevin Murphy <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Hmm ... not sure if this is related, but there's something mighty fishy
>> about that "key" parameter. I'd expect to see key=5432001, or something
>> close to that depending on what port number you're using.
>>
> But is this the case w
Hi Tom,
It appears to me that the documentation suggests that: -P fieldsep='\t'
should work, but I don't think it does.
Tom Lane-2 wrote:
>
> chrisj <[EMAIL PROTECTED]> writes:
>> This helped a lot, but ideally I want a tab field delimiter and -F '\t'
>> does
>> not seem to work, any ideas
folks
I need help
my client application need to save rtf text format,
i'm codding string data into bytea format by hand
but without success need some body check this
input sample data:
'{\rtf1\ansi
}'
output codding
'\\173\\134\\162\\164\\146\\061\\134\\141\\156\\163\\151\\040\\01
Thanks Brent, very much appreciated, your first suggestion is perfect.
the translate suggestion assumes that there are no commas in the data, but
that is why I wanted to use tab.
again, thanks a lot!!
Brent Wood wrote:
>
> chrisj wrote:
>> Thanks Alan,
>> This helped a lot, but ideally I want
Original Message From Guy Rouillier
http://www.postgresql.org/docs/techdocs.71. Color me dumb, but I can't
figure a way to download the document "Apache 2.0, Tomcat 5.5, WARs &
PostgreSQL 8.1 JDBC DataSources on Windows XP". When I click on the link
to the document, it just brings me back t
Peter Neu wrote:
Thanks. This script looks good. :o)
How do I call it once a day with a cron job on my linux box?
Put the script in a file (e.g. expiry_script.sql) then add to your crontab:
/path/to/psql -U -d -f /path/to/expiry_script.sql -q
See man psql, man 5 crontab for more details.
On 4/20/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Mike Frysinger" <[EMAIL PROTECTED]> writes:
> $ pg_dump -F c -s -d database-server mydb > mydb.schema
> $ psql -d mydb < mydb.schema
>
pg_dump -Fc does not produce a file that psql can read directly.
Is the above really what you did?
i was expe
* Listmail <[EMAIL PROTECTED]> [20070420 11:25]:
> You want trigram based search.
> ie.
>
> postgresql -> 'pos', 'ost', 'stg', 'tgr', 'gre', 'res',
> 'esq', 'sql'
>
On Fri, 20 Apr 2007, Tilmann Singer wrote:
Hi,
In this http://archive.netbsd.se/?ml=pgsql-hackers&a=2006-10&t=2475028
thread Teodor Sigaev describes a way to make tsearch2 index substrings
of words:
Brain storm method:
Develop a dictionary which returns all substring for lexeme, for
example
You want trigram based search.
ie.
postgresql -> 'pos', 'ost', 'stg', 'tgr', 'gre', 'res', 'esq', 'sql'
searching for 'gresq' is searching for 'gre' and 'res' and 'esq' which
is good friends with bitmap scan. Then a little LIKE '%gresq%' to filter
the results.
P
Hi,
In this http://archive.netbsd.se/?ml=pgsql-hackers&a=2006-10&t=2475028
thread Teodor Sigaev describes a way to make tsearch2 index substrings
of words:
> Brain storm method:
>
> Develop a dictionary which returns all substring for lexeme, for
> example for word foobar it will be 'foobar foob
Karsten Hilbert wrote:
Does "psql --version" match "select version()"? There's a message in
the archive pgsql-bugs where this happened.
That was indeed part of the trouble:
Both 7.4.16 and 8.1.8 being installed on Debian I couldn't
get the default psql be 8.1 despite using
update-alternatives
On Fri, Apr 20, 2007 at 12:40:45PM +1000, Klint Gore wrote:
>> I can't spot the trouble with this function definition:
...
>> PostgreSQL 8.1.8 (Debian/Etch) is telling me:
Actually, Lenny.
>> psql:dem-identity.sql:43: ERROR: unterminated dollar-quoted string at or
>> near "$null_empty_title$
>>
tom wrote:
This is some good stuff and I can use the explain analyze going forward.
But I can't get these VALUES queries to work.
I checked and I am on version 8.1. but I think from the docs that I
should still be able to do this.
Multiple VALUES was introduced in 8.2 as others mentioned so
2007. 04. 19, csütörtök keltezéssel 16.09-kor Alvaro Herrera ezt írta:
> Andrew Toth wrote:
> > 2007. 04. 18, szerda keltezéssel 18.21-kor Alvaro Herrera ezt írta:
> >
> > > Andrew Toth wrote:
> > > > Dear List,
> > > >
> > > > I would like to download the version of source code containing
> > >
54 matches
Mail list logo