I'm likely overlooking something, but I can't seem to find a function
to sort a varchar array. Something like "select
sort('{y,z,x}'::varchar[])" => {'x','y','z'}.
You've got it right. On Pg 8.3.3 I get
SELECT sort(array['z','y','x']) -> {x,y,z}
Crap. There's a sort function included for in
Artacus wrote:
On pgadmin, when you click on a table or function, you get the source
code (DDL) to create that table or function.
I want to take that and check it into subversion so I have one file for
each table, function, view, etc. My question is, how do you get that
source code? I've been
2008/7/8 Matthew Dennis <[EMAIL PROTECTED]>:
> I'm likely overlooking something, but I can't seem to find a function to
> sort a varchar array. Something like "select sort('{y,z,x}'::varchar[])" =>
> {'x','y','z'}.
>
create function sort(anyarray)
returns anyarray as $$
select array(select $1[i]
Artacus wrote:
On pgadmin, when you click on a table or function, you get the source
code (DDL) to create that table or function.
I want to take that and check it into subversion so I have one file for
each table, function, view, etc. My question is, how do you get that
source code? I've been
"Jonathan Bond-Caron" <[EMAIL PROTECTED]> writes:
> It would be quite useful to implement a database queue. Although FOR UPDATE
> NOWAIT and trying again can work as well as other techniques,
> just skipping over the locks has its advantages (simplicity and zero wait)
And disadvantages, such as
On Tue, Jul 8, 2008 at 8:09 PM, Ow Mun Heng <[EMAIL PROTECTED]> wrote:
> It was varchar(4) for a _long_ time until there came a need recently to
> move it to a 5 characters.
> Hence the issue, I've already changed it to varchar() instead to make it
> more open (and less problematic in the future)
I'm been reading up on FOR UPDATE NOWAIT and it looks like it was added in
8.1.
How difficult is it to add FOR UPDATE SKIP LOCKED or something similar?
(basically skip locked rows / oracle syntax)
More background here:
http://forge.mysql.com/worklog/task.php?id=3597
It would be quite u
Artacus wrote:
> On pgadmin, when you click on a table or function, you get the source
> code (DDL) to create that table or function.
>
> I want to take that and check it into subversion so I have one file for
> each table, function, view, etc. My question is, how do you get that
> source cod
On pgadmin, when you click on a table or function, you get the source
code (DDL) to create that table or function.
I want to take that and check it into subversion so I have one file for
each table, function, view, etc. My question is, how do you get that
source code? I've been playing with pg
I'm likely overlooking something, but I can't seem to find a function to
sort a varchar array. Something like "select
sort('{y,z,x}'::varchar[])" => {'x','y','z'}.
You've got it right. On Pg 8.3.3 I get
SELECT sort(array['z','y','x']) -> {x,y,z}
--
Sent via pgsql-general mailing list (pgsql-g
On Mon, 2008-07-07 at 02:10 -0400, Lew wrote:
> Ow Mun Heng wrote:
> >> I want to change a column type from varchar(4) to varchar(5) or should I
> >> just use text instead.
> The choice of TEXT for the column would seem to be supported in the PG
> manual,
> which stresses that TEXT and VARCHAR a
If I have an expression (a or b)a where a=TRUE and b=FALSE, why is b
evaluated? Any true operand before an or operator means the entire
expression is true .
EXAMPLE
create or replace function pinsusers() returns trigger as
$$
declare msg varchar;
begin
If I'm not mistaken 8th July is official birthday of PostgreSQL. 12
years, great!
(i'm a bit late here in Russia, but it's OK for US ;-) )
Kudos PostgreSQL!
--
Best regards,
Nikolay
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
htt
I'm likely overlooking something, but I can't seem to find a function to
sort a varchar array. Something like "select sort('{y,z,x}'::varchar[])" =>
{'x','y','z'}.
On 08/07/2008 19:44, aravind chandu wrote:
I just need to load pre-defined animations and pre-recorded
sounds in postgresql.Can you please tell how to do this.I appreciate
your help.
You need the bytea data type, which lets you store binary data. How you
get it in and out depends
Hello,
I
just need to load pre-defined animations and pre-recorded sounds in
postgresql.Can you please tell how to do this.I appreciate your help.
Thank You,
Aravind.
Michael Enke <[EMAIL PROTECTED]> writes:
> I create a dynamic library with the PG_MODULE_MAGIC under Linux.
> No problem in normal situation, but if I strip the .o file,
> that information seems to get lost and I get:
> ERROR: incompatible library "...so": missing magic block
> TIP: Extension lib
Any suggestion everyone?
Sorry, i was to fast sending this email out ;-)
change the first parameter in the first line to '_id_depth'
CREATE OR REPLACE FUNCTION listofemployeebasedondepartment(_id_dept
int)
RETURNS SETOF employee AS
$BODY$
BEGIN
RETURN QUERY
SELECT
*
F
Hi Hendra,
create function listofemployeebasedondepartment(id_dept int) $$
declare
resultset ??;
begin
select * into resultset from employee where id_dept = id_dept;
return resultset;
end
$$ language 'plpgsql';
I believe you get what I want
But I just couldn't finish the code since I mi
If you're coming to OSCON, why not come a day early & join us for PDXPUG PgDay!
http://spreadsheets.google.com/viewform?key=paoTJ9uEi8vIqumUzwzrCAw&email=true
Please sign up for free admission to the after-party at the Gotham
Tavern, and to reserve a tshirt. We are requesting a $20 donation
that
Michael Enke wrote:
> Hi list,
> I create a dynamic library with the PG_MODULE_MAGIC under Linux.
> No problem in normal situation, but if I strip the .o file,
> that information seems to get lost and I get:
> ERROR: incompatible library "...so": missing magic block
> TIP: Extension libraries are
Ow Mun Heng wrote:
I want to change a column type from varchar(4) to varchar(5) or should I
just use text instead.
Eric Bangug wrote:
ALTER TABLE tablename ALTER COLUMN columnname TYPE VARCHAR(5);
Please post in plain text, not HTML, particularly not HTML with
It's also both polite and hel
Hi Everyone.
I'm just subscribe to the mailing list
I'm new to Postgresql and
I have a question
I intend to make a function that returns more than a row
I tried something like below
create function listofemployeebasedondepartment(id_dept int) $$
declare
resultset ??;
begin
select * into res
Hi list,
I create a dynamic library with the PG_MODULE_MAGIC under Linux.
No problem in normal situation, but if I strip the .o file,
that information seems to get lost and I get:
ERROR: incompatible library "...so": missing magic block
TIP: Extension libraries are required to use the PG_MODULE_
It looks like the indexes are blown Which may indicate some corruption in
the pg_indexes system catalog table?
Is there a way to check the integrity of pg_indexes for possible page
corruption? Nothing is being reported in the postgresql log file that would
indicate there is a corruption i
On Mon, Jul 7, 2008 at 7:21 PM, Henry - Zen Search SA <[EMAIL PROTECTED]> wrote:
> On Tue, July 8, 2008 3:14 am, spellberg_robert wrote:
>> at the risk of ridicule, i don't read release notes online.
>> i read them when i unpack a tarball.
>
> Consider yourself ridiculed! :))
>
> I remember years a
> Roberts, Jon wrote:
> >> Not having looked at the internals of db_link, I'd say it's
certainly
> >> possible that this is the reason for the failed restart. If db_link
is
> >> blocking something, the postmaster can't kill it off, and it'll
still
> > be
> >> sitting there holding a reference to th
--On Dienstag, Juli 08, 2008 15:12:44 +0200 "Leif B. Kristensen"
<[EMAIL PROTECTED]> wrote:
Is this the case on both Windows and Linux? - that psql uses more for
paging, as opposed to doing it itself?
It uses "less" on Linux.
Seems to me that less is the default on cygwin, only. For others
On Tuesday 8. July 2008, Raymond O'Donnell wrote:
>On 08/07/2008 13:17, Bernd Helmle wrote:
>> psql uses more to paginate results of your SELECT command. Seems
>> like
>
>Is this the case on both Windows and Linux? - that psql uses more for
>paging, as opposed to doing it itself?
It uses "less" on
In response to Keaton Adams <[EMAIL PROTECTED]>:
> Good point. But
>
> This is a database used to capture logged information, such as
> success/failure of an operation. Daily tables are rolled up to weekly
> tables, weekly tables are rolled up to monthly tables. All logged
> activity are d
On 08/07/2008 13:17, Bernd Helmle wrote:
psql uses more to paginate results of your SELECT command. Seems like
Is this the case on both Windows and Linux? - that psql uses more for
paging, as opposed to doing it itself?
Ray.
-
Good point. But
This is a database used to capture logged information, such as success/failure
of an operation. Daily tables are rolled up to weekly tables, weekly tables
are rolled up to monthly tables. All logged activity are done by inserts,
never any updates or deletes, to avoid havi
--On Dienstag, Juli 08, 2008 21:46:53 +1000 Long Cui
<[EMAIL PROTECTED]> wrote:
I installed Postgresql 8.3.3 in windows XP, try to input some commands in
windows command prompt. The create, update and insert command work all
right, just select command.got the error message: "more" is not inte
Dmitry Melekhov wrote:
> So, if I have database backup and WAL generated after this backup, I can
> do recovery, this mean WAL already contains all changes to database,
> without vacuum. Could you tell me what is wrong in my sentence?
VACUUM *is* a change to the database.
Yours,
Laurenz Albe
--
On Tuesday 8. July 2008, Long Cui wrote:
>HI
>
>I installed Postgresql 8.3.3 in windows XP, try to input some commands
> in windows command prompt. The create, update and insert command
> work all right, just select command.got the error message: "more" is
> not internal or external command, not
am Tue, dem 08.07.2008, um 21:46:53 +1000 mailte Long Cui folgendes:
> HI
>
> I installed Postgresql 8.3.3 in windows XP, try to input some commands in
> windows command prompt. The create, update and insert command work all right,
> just select command.got the error message: "more" is not inte
HI
I installed Postgresql 8.3.3 in windows XP, try to input some commands in
windows command prompt. The create, update and insert command work all
right, just select command.got the error message: "more" is not internal or
external command, not runnable program or bat file. Why did I input like
Dmitry Melekhov wrote:
> I tried to ask this question in novice list.
> Just because there are no replies I try here.
> This is really novice question- I'm oracle dba :-)
>
> > I just installed 8.3 with WAL enabled.
> > But I can't understand why postgres generated many archive logs during
> > vac
On Tue, Jul 8, 2008 at 12:06 AM, Keaton Adams <[EMAIL PROTECTED]> wrote:
> An analyze is run on the tables every day (even several times a day because
> they are updated very frequently) and a vacuum analyze is run on the
> weekends. I also tried to run an analyze specifically on the customer_id
>
Dmitry Melekhov wrote:
> Glyn Astill пишет:
>> WAL is the journal for postgres, so every event that happens goes into the
>> WAL. Using it for backup or replication simply uses it to replay all events
>> on the backup / replicated database.
> As I thought, thank you.
> But why vacuum generates W
Simon Riggs пишет:
> Vacuum performs an essential function and its changes are WAL-logged.
> Those changes are an essential part of the structure of the database and
> must be included as part of recovery also.
>
Now I understand. Thank you!
--
Sent via pgsql-general mailing list (pgsql-gene
Glyn Astill пишет:
> WAL is the journal for postgres, so every event that happens goes into the
> WAL. Using it for backup or replication simply uses it to replay all events
> on the backup / replicated database.
>
>
>
>
As I thought, thank you.
But why vacuum generates WAL ? As I understand
On Tue, 2008-07-08 at 13:54 +0500, Dmitry Melekhov wrote:
> > What do you mean "WAL is enabled"? That's not a term I recognize
> since
> > WAL is always enabled.
> >
> >
> AFAIK, it can be disabled. May be I'm wrong...
Maybe you mean archiving? That *can* be disabled.
> > Best read this
> >
WAL is the journal for postgres, so every event that happens goes into the WAL.
Using it for backup or replication simply uses it to replay all events on the
backup / replicated database.
- Original Message
> From: Dmitry Melekhov <[EMAIL PROTECTED]>
> To: Simon Riggs <[EMAIL PROTECT
Simon Riggs пишет:
> On Tue, 2008-07-08 at 13:09 +0500, Dmitry Melekhov wrote:
>
>> Hello!
>>
>> I tried to ask this question in novice list.
>> Just because there are no replies I try here.
>> This is really novice question- I'm oracle dba :-)
>>
>>
>>> I just installed 8.3 with WAL enable
On Tue, 2008-07-08 at 13:09 +0500, Dmitry Melekhov wrote:
> Hello!
>
> I tried to ask this question in novice list.
> Just because there are no replies I try here.
> This is really novice question- I'm oracle dba :-)
>
> > I just installed 8.3 with WAL enabled.
> > But I can't understand why pos
Hi,
Tom Lane sss.pgh.pa.us> writes:
> Dushyanth gmail.com> writes:
> >> Tom Lane sss.pgh.pa.us> writes:
> >> Then the only other possibility is that autovacuum is being launched to
> >> prevent XID wraparound. Are there any tables in that database with
> >> particularly old relfrozenxid?
>
>
Hello!
I tried to ask this question in novice list.
Just because there are no replies I try here.
This is really novice question- I'm oracle dba :-)
> I just installed 8.3 with WAL enabled.
> But I can't understand why postgres generated many archive logs during
> vacuum, if WAL is enabled.
> Cou
On Tue, July 8, 2008 3:14 am, spellberg_robert wrote:
> at the risk of ridicule, i don't read release notes online.
> i read them when i unpack a tarball.
Consider yourself ridiculed! :))
I remember years ago (must be 6.x days) moaning about (to the pg people,
either in the list, or as an email t
49 matches
Mail list logo