hello
2008/7/25 Chris Hoy <[EMAIL PROTECTED]>:
>
>
> Hi
>
> I am having trouble passing arrays of types to a store procedure
> I have the following type
>
>CREATE TYPE IndexElement AS (
>keyname text,
>keytype integer
>);
>
> and the header for the
On Thu, Dec 29, 2005 at 01:23:28PM -0500, Ken Winter wrote:
> That works. (Odd that the initialization seems to be necessary to make it
> work.) Thanks! Yes, I'm using version 7.4.
7.4.what? Absence of initialization shouldn't cause a syntax error;
at least it doesn't in 7.4.10. However, in 7
"Ken Winter" <[EMAIL PROTECTED]> writes:
> That works. (Odd that the initialization seems to be necessary to make it
> work.) Thanks! Yes, I'm using version 7.4.
Possibly what you're running into is that 7.4 is restrictive about what
you can do with an array that's NULL. Until pretty recently,
: Ken Winter
> Cc: PostgreSQL pg-sql list
> Subject: Re: [SQL] Arrays in PL/pgSQL routines?
>
> Ken Winter wrote:
> > Can arrays be declared in PL/pgSQL routines? If so, how?
> >
>
> > DECLARE
> >
> try:
> my_array VARCHAR[] := '{}';
>
> no
On Thu, Dec 29, 2005 at 12:46:28PM -0500, Ken Winter wrote:
> Can arrays be declared in PL/pgSQL routines? If so, how?
>
> Section 8.10 of the documentation
> (http://www.postgresql.org/docs/7.4/static/arrays.html) tells how to declare
> and use arrays as table columns. But I don't find any part
Ken Winter wrote:
Can arrays be declared in PL/pgSQL routines? If so, how?
DECLARE
try:
my_array VARCHAR[] := '{}';
not sure if this works in 7.4 though, if that's the version that you are
using.
---(end of broadcast)---
TIP 9: In versio
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
> SELECT * FROM customers WHERE monthly_balance[6] = 0.00;
This, like the other poster said, can be accomplished with a set of simple
expression indexes.
> As an example ... or
>
> SELECT * FROM customers WHERE 0.00 = any (monthly_balance);
This w
On Tue, Aug 16, 2005 at 01:54:13AM -0300, Marc G. Fournier wrote:
>
> CREATE TABLE customers (
> customer_id SERIAL,
> monthly_balance DECIMAL(7,2)[12]
> );
>
> Is it possible to create an INDEX on customers.monthly_balance such that I
> could do something like:
>
> SELECT * FROM customers W
Tom Lane wrote:
"David" <[EMAIL PROTECTED]> writes:
INSERT INTO species (location) VALUES ('{((432,89), (45,87), (89,87)),
((54,78), (34,98))};
I think you'd need to double-quote each polygon within the array
literal.
'{"((432,89), (45,87), (89,87))", "..."}'
The array parser doesn't think parens
Thanks to you both that helped enormously,
Dave
- Original Message -
From: "Joe Conway" <[EMAIL PROTECTED]>
To: "Tom Lane" <[EMAIL PROTECTED]>
Cc: "David" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004
"David" <[EMAIL PROTECTED]> writes:
> ALTER TABLE species ADD COLUMN location polygon[];
> INSERT INTO species (location) VALUES ('{((432,89), (45,87), (89,87)),
> ((54,78), (34,98))};
I think you'd need to double-quote each polygon within the array
literal.
'{"((432,89), (45,87), (89,87
Michael Shapiro <[EMAIL PROTECTED]> writes:
> I have tried the following (which doesn't work)
> dn[1] := \'a\';
> The parser doesn't like the [ that follows dn.
I believe Joe Conway fixed this in 7.4. Note that you also need to
initialize the array to something, because assigning to an elem
Hello,
I don't think there's any reason you should use arrays. You can do
everything using tables, and it probably would be easier to use tables
instead. Extracting information from arrays is also more
difficult if you're using something like JDBC or the connectivity
available in PHP. I don't kn
O kyrios Yasir Malik egrapse stis Nov 18, 2003 :
> Hello,
> I don't think there's any reason you should use arrays. You can do
> everything using tables, and it probably would be easier to use tables
> instead. Extracting information from arrays is also more
> difficult if you're using something
Hello,
I don't think there's any reason you should use arrays. You can do
everything using tables, and it probably would be easier to use tables
instead. Extracting information from arrays is also more
difficult if you're using something like JDBC or the connectivity
available in PHP. I don't kn
Aspire,
> 2. Can we use array for the above thing as
> a. Make an array of the valid roll_numbers. such as
> ('IDX'=>'ROLL_NUMBER')
> b. Now select the array element by the index which will produce the
> roll_number and work on it.
> c. Array could be build by for loop
>
On Tue, 24 Sep 2002, Madhavi wrote:
> How do I pass an array as an aruments in a postgres function? And how do I
> use it in the function??
Well, I've only got a 7.3devel machine to test, but:
create function f(int[]) returns int as
'select $1[1];' language 'sql';
select f('{3,4}');
seems to
Wait some time. We have something you need - we implement RD-tree
using GiST interface. Unfortunately, GiST was very poorly tested
and supported, so we have to understand, fix and rewrite some part of code.
There are still some problems but we hope to get working code in January.
Oleg
On
18 matches
Mail list logo