Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id DD7659FB27E for ; Mon, 28 May 2007 21:24:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 76878-02 for ; Mon, 28 May 2007 21:24:06 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.231]) by postgresql.org (Postfix) with ESMTP id B4B959FA468 for ; Mon, 28 May 2007 21:24:11 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id m22so440958nzf for ; Mon, 28 May 2007 17:24:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=SkkCaR2Ru8vccZ8STobi6btTRVbdA9zovii5+xt9cU8Fk5l+MNbHMX/Op5bYU7ji4sP3ZcBNANlUo8P5qDysi17qkzSqalE6/vroJr39VMNTumhfBwqRiiZLpYcqVha9D7+hTfscqqEjSsG5q0HOz9pfKKpN3hD3eQ4psP2i0VM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=N2p5qYmDihBCxJOPGFkdOjDe7gix+uDc9UScV9F0LaKa9g6+2UZmVzoBe1FJCVh7y5o1wlgA4SRGy6/RnEdfXw3VH5eyAfU3v6lEC/v/OhrIfplqkiB3s1jq4XGg81bTVNjsHX90vYsLJBLEtqIiEjkOr5BDupQMsdmIEGJn0Nw= Received: by 10.114.160.1 with SMTP id i1mr3168489wae.1180397860501; Mon, 28 May 2007 17:17:40 -0700 (PDT) Received: from ?10.1.1.11? ( [203.217.18.65]) by mx.google.com with ESMTP id n20sm1597094pof.2007.05.28.17.17.39; Mon, 28 May 2007 17:17:40 -0700 (PDT) Message-ID: <465B716F.10506@gmail.com> Date: Tue, 29 May 2007 10:18:55 +1000 From: Chris User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Junior CC: pgsql-php@postgresql.org Subject: Re: Get Extension in Bytea Type References: <4822bcbf0705281233i48e3e58em854f87f63d642228@mail.gmail.com> In-Reply-To: <4822bcbf0705281233i48e3e58em854f87f63d642228@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/13 X-Sequence-Number: 3802 Junior wrote: > Hi, I need get the extension in bytea type, my web system save in > database one file, the file can be many extensions, i need get de > extension from this file for the users can download this file.. If you're not saving the filename you'll have to resort to saving the file & then using something like: exec('file /path/to/file', $out); print_r($out); to work it out. -- Postgresql & php tutorials http://www.designmagick.com/