Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5Swu-0007Br-69 for pgsql-general@arkaria.postgresql.org; Tue, 11 Aug 2020 12:00:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5Swt-0006Jz-5x for pgsql-general@arkaria.postgresql.org; Tue, 11 Aug 2020 12:00:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5Sws-0006Js-Qw for pgsql-general@lists.postgresql.org; Tue, 11 Aug 2020 12:00:10 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k5Swq-0005vC-9Q for pgsql-general@lists.postgresql.org; Tue, 11 Aug 2020 12:00:09 +0000 Received: by mail-ej1-x62a.google.com with SMTP id bo3so12753178ejb.11 for ; Tue, 11 Aug 2020 05:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=zkCTL0BpO6C802CnrbIiGQ7NHqHRfUZ3G+nV5Fw722o=; b=za+iX0oaYqq/p0pYj3QfQiiaz7mKfmPuDYVDzauTKU5lXDm6RNivGt6Ugr1/g5iJZ5 FK9TjQVj83/J6mCvKoApzSMb5/F0kIBUuUC2+IPP92pOiwMjDT2Ee7EmEoFZ6iuKBOdZ +7Ko7v1NIlrrGhEjdNjWstZXp089BxbThIfUp6jx92SVGkFnNOGBkBANuA0o5+jK+Vr8 qkvHSrwyMR2tUXYiwBv8RcV4WYhz0zhwoa9N+rcGNhJ4h56K+j3n1gzUQwcIrZiFBR1E eIGuHqUWNvP4LQimcLQccWn8FfiEtMP2DiFhctoEnoTrlS1QzqqoMA/8Fgbw0SdnkFbo b0eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=zkCTL0BpO6C802CnrbIiGQ7NHqHRfUZ3G+nV5Fw722o=; b=hMrQL/CaXGvrB6/Ea7tbvjJIvvLssDyIUugJL6Y3G2Y5dI49Tj3SJncP0vcke0bZWu hRSzCxT9B01u76XDy8QULHRD2yAdZtoqpHRP0optVD1A+Ir++dRp8FKPKjJBfiOu36c3 yNCksQInfwPKO7NWwrOc8Me0Jqzx5B/QiHmlQW/irQS1fKSm6HC5X7o6JwBl7NH3NRb3 qwBOrVi0w67lWJ9pO4OrWVJrAzBZAwsPKyxeFwJ9pFFprjRr6aCO/aGWf0JGQS3y9pzT wdNENmgcf0T9OviB0vo6FbeOvFjUTX1BTE+El53zn73op+SbPkTI/F/zGQvr4XBRXAIk pBzw== X-Gm-Message-State: AOAM532gKZC7G3/Z31vWmUle1ClyYWsjN5OxkzbpKLzNlbKMRiPLGqPw nafu4H/1oIB3FBUoFw8n9BJ4nw== X-Google-Smtp-Source: ABdhPJwaMAJWPkFH7LJEzLN5ROniwYy95vOttd/5dHPAEzVe1UmtUVW6+WSaoHHS0NBdf0dYkUddIA== X-Received: by 2002:a17:906:386:: with SMTP id b6mr25763245eja.538.1597147205981; Tue, 11 Aug 2020 05:00:05 -0700 (PDT) Received: from localhost.localdomain (217-149-170-169.nat.highway.telekom.at. [217.149.170.169]) by smtp.gmail.com with ESMTPSA id kt27sm15101782ejb.15.2020.08.11.05.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 05:00:05 -0700 (PDT) Message-ID: <433af6fe4eca58b472a6872d3cee2d6e2a7e759a.camel@cybertec.at> Subject: Re: Implement a new data type From: Laurenz Albe To: mohand oubelkacem makhoukhene , "pgsql-general@lists.postgresql.org" Date: Tue, 11 Aug 2020 14:00:04 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4 (3.36.4-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 2020-08-11 at 11:31 +0000, mohand oubelkacem makhoukhene wrote: > I whould like to implement a new data type next to char, number, varchar... A Money type. > So i'll have to change the source code, but i don't know which fonctions i need to change and which part to work on. You don't need to change the source, you could create an extension using a shared library that can be loaded into the server at run time. The documentation has more: https://www.postgresql.org/docs/current/xfunc-c.html#XFUNC-C-BASETYPE https://www.postgresql.org/docs/current/extend-extensions.html https://www.postgresql.org/docs/current/extend-pgxs.html Yours, Laurenz Albe